From 2789563a317ff37d9a3ec6867dfd43d5b57ed280 Mon Sep 17 00:00:00 2001
From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Mon, 30 Oct 2023 19:24:43 +0000
Subject: [PATCH 1/7] Update generated code for v629
---
OPENAPI_VERSION | 2 +-
tests/Stripe/GeneratedExamplesTest.php | 5326 ++++++++++++------------
2 files changed, 2664 insertions(+), 2664 deletions(-)
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index 0e0942b4f..32401f20f 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v623
\ No newline at end of file
+v629
\ No newline at end of file
diff --git a/tests/Stripe/GeneratedExamplesTest.php b/tests/Stripe/GeneratedExamplesTest.php
index ad4d20bce..d7aa463cc 100644
--- a/tests/Stripe/GeneratedExamplesTest.php
+++ b/tests/Stripe/GeneratedExamplesTest.php
@@ -21,2086 +21,1769 @@ protected function setUpService()
$this->client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL, 'files_base' => MOCK_URL]);
}
- public function testListSecret()
+ public function testAccountLinksPost()
{
- $this->expectsRequest('get', '/v1/apps/secrets');
- $result = $this->client->apps->secrets->all([
- 'scope' => ['type' => 'account'],
- 'limit' => 2,
- ]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Apps\Secret::class, $result->data[0]);
- }
-
- public function testCreateSecret()
- {
- $this->expectsRequest('post', '/v1/apps/secrets');
- $result = $this->client->apps->secrets->create([
- 'name' => 'sec_123',
- 'payload' => 'very secret string',
- 'scope' => ['type' => 'account'],
+ $this->expectsRequest('post', '/v1/account_links');
+ $result = $this->client->accountLinks->create([
+ 'account' => 'acct_xxxxxxxxxxxxx',
+ 'refresh_url' => 'https://example.com/reauth',
+ 'return_url' => 'https://example.com/return',
+ 'type' => 'account_onboarding',
]);
- static::assertInstanceOf(\Stripe\Apps\Secret::class, $result);
+ static::assertInstanceOf(\Stripe\AccountLink::class, $result);
}
- public function testDeleteWhereSecret()
+ public function testAccountsCapabilitiesGet()
{
- $this->expectsRequest('post', '/v1/apps/secrets/delete');
- $result = $this->client->apps->secrets->deleteWhere([
- 'name' => 'my-api-key',
- 'scope' => ['type' => 'account'],
- ]);
- static::assertInstanceOf(\Stripe\Apps\Secret::class, $result);
+ $this->expectsRequest(
+ 'get',
+ '/v1/accounts/acct_xxxxxxxxxxxxx/capabilities'
+ );
+ $result = $this->client->accounts->allCapabilities(
+ 'acct_xxxxxxxxxxxxx',
+ []
+ );
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\Capability::class, $result->data[0]);
}
- public function testFindSecret()
+ public function testAccountsCapabilitiesGet2()
{
- $this->expectsRequest('get', '/v1/apps/secrets/find');
- $result = $this->client->apps->secrets->find([
- 'name' => 'sec_123',
- 'scope' => ['type' => 'account'],
- ]);
- static::assertInstanceOf(\Stripe\Apps\Secret::class, $result);
+ $this->expectsRequest(
+ 'get',
+ '/v1/accounts/acct_xxxxxxxxxxxxx/capabilities/card_payments'
+ );
+ $result = $this->client->accounts->retrieveCapability(
+ 'acct_xxxxxxxxxxxxx',
+ 'card_payments',
+ []
+ );
+ static::assertInstanceOf(\Stripe\Capability::class, $result);
}
- public function testCreateSession()
+ public function testAccountsCapabilitiesPost()
{
- $this->expectsRequest('post', '/v1/checkout/sessions');
- $result = $this->client->checkout->sessions->create([
- 'success_url' => 'https://example.com/success',
- 'cancel_url' => 'https://example.com/cancel',
- 'mode' => 'payment',
- 'shipping_options' => [
- ['shipping_rate' => 'shr_standard'],
- [
- 'shipping_rate_data' => [
- 'display_name' => 'Standard',
- 'delivery_estimate' => [
- 'minimum' => [
- 'unit' => 'day',
- 'value' => 5,
- ],
- 'maximum' => [
- 'unit' => 'day',
- 'value' => 7,
- ],
- ],
- ],
- ],
- ],
- ]);
- static::assertInstanceOf(\Stripe\Checkout\Session::class, $result);
+ $this->expectsRequest(
+ 'post',
+ '/v1/accounts/acct_xxxxxxxxxxxxx/capabilities/card_payments'
+ );
+ $result = $this->client->accounts->updateCapability(
+ 'acct_xxxxxxxxxxxxx',
+ 'card_payments',
+ ['requested' => true]
+ );
+ static::assertInstanceOf(\Stripe\Capability::class, $result);
}
- public function testExpireSession()
+ public function testAccountsDelete()
{
- $this->expectsRequest('post', '/v1/checkout/sessions/sess_xyz/expire');
- $result = $this->client->checkout->sessions->expire('sess_xyz', []);
- static::assertInstanceOf(\Stripe\Checkout\Session::class, $result);
+ $this->expectsRequest('delete', '/v1/accounts/acct_xxxxxxxxxxxxx');
+ $result = $this->client->accounts->delete('acct_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\Account::class, $result);
}
- public function testListLineItemsSession()
+ public function testAccountsGet()
{
- $this->expectsRequest(
- 'get',
- '/v1/checkout/sessions/sess_xyz/line_items'
- );
- $result = $this->client->checkout->sessions->allLineItems(
- 'sess_xyz',
- []
- );
+ $this->expectsRequest('get', '/v1/accounts');
+ $result = $this->client->accounts->all(['limit' => 3]);
static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\LineItem::class, $result->data[0]);
+ static::assertInstanceOf(\Stripe\Account::class, $result->data[0]);
}
- public function testRetrieveCashBalance()
+ public function testAccountsGet2()
{
- $this->expectsRequest('get', '/v1/customers/cus_123/cash_balance');
- $result = $this->client->customers->retrieveCashBalance('cus_123', []);
- static::assertInstanceOf(\Stripe\CashBalance::class, $result);
+ $this->expectsRequest('get', '/v1/accounts/acct_xxxxxxxxxxxxx');
+ $result = $this->client->accounts->retrieve('acct_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\Account::class, $result);
}
- public function testUpdateCashBalance()
+ public function testAccountsLoginLinksPost()
{
- $this->expectsRequest('post', '/v1/customers/cus_123/cash_balance');
- $result = $this->client->customers->updateCashBalance(
- 'cus_123',
- ['settings' => ['reconciliation_mode' => 'manual']]
+ $this->expectsRequest(
+ 'post',
+ '/v1/accounts/acct_xxxxxxxxxxxxx/login_links'
);
- static::assertInstanceOf(\Stripe\CashBalance::class, $result);
+ $result = $this->client->accounts->createLoginLink(
+ 'acct_xxxxxxxxxxxxx',
+ []
+ );
+ static::assertInstanceOf(\Stripe\LoginLink::class, $result);
}
- public function testCreateFundingInstructionsCustomer()
+ public function testAccountsPersonsDelete()
{
$this->expectsRequest(
- 'post',
- '/v1/customers/cus_123/funding_instructions'
+ 'delete',
+ '/v1/accounts/acct_xxxxxxxxxxxxx/persons/person_xxxxxxxxxxxxx'
);
- $result = $this->client->customers->createFundingInstructions(
- 'cus_123',
- [
- 'bank_transfer' => [
- 'requested_address_types' => ['zengin'],
- 'type' => 'jp_bank_transfer',
- ],
- 'currency' => 'usd',
- 'funding_type' => 'bank_transfer',
- ]
+ $result = $this->client->accounts->deletePerson(
+ 'acct_xxxxxxxxxxxxx',
+ 'person_xxxxxxxxxxxxx',
+ []
);
- static::assertInstanceOf(\Stripe\FundingInstructions::class, $result);
+ static::assertInstanceOf(\Stripe\Person::class, $result);
}
- public function testListAccount()
+ public function testAccountsPersonsGet()
{
- $this->expectsRequest('get', '/v1/financial_connections/accounts');
- $result = $this->client->financialConnections->accounts->all([]);
+ $this->expectsRequest('get', '/v1/accounts/acct_xxxxxxxxxxxxx/persons');
+ $result = $this->client->accounts->allPersons(
+ 'acct_xxxxxxxxxxxxx',
+ ['limit' => 3]
+ );
static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\FinancialConnections\Account::class, $result->data[0]);
+ static::assertInstanceOf(\Stripe\Person::class, $result->data[0]);
}
- public function testRetrieveAccount()
+ public function testAccountsPersonsGet2()
{
$this->expectsRequest(
'get',
- '/v1/financial_connections/accounts/fca_xyz'
+ '/v1/accounts/acct_xxxxxxxxxxxxx/persons/person_xxxxxxxxxxxxx'
);
- $result = $this->client->financialConnections->accounts->retrieve(
- 'fca_xyz',
+ $result = $this->client->accounts->retrievePerson(
+ 'acct_xxxxxxxxxxxxx',
+ 'person_xxxxxxxxxxxxx',
[]
);
- static::assertInstanceOf(\Stripe\FinancialConnections\Account::class, $result);
+ static::assertInstanceOf(\Stripe\Person::class, $result);
}
- public function testDisconnectAccount()
+ public function testAccountsPersonsPost()
{
$this->expectsRequest(
'post',
- '/v1/financial_connections/accounts/fca_xyz/disconnect'
- );
- $result = $this->client->financialConnections->accounts->disconnect(
- 'fca_xyz',
- []
- );
- static::assertInstanceOf(\Stripe\FinancialConnections\Account::class, $result);
- }
-
- public function testListOwnersAccount()
- {
- $this->expectsRequest(
- 'get',
- '/v1/financial_connections/accounts/fca_xyz/owners'
+ '/v1/accounts/acct_xxxxxxxxxxxxx/persons'
);
- $result = $this->client->financialConnections->accounts->allOwners(
- 'fca_xyz',
- ['ownership' => 'fcaowns_xyz']
+ $result = $this->client->accounts->createPerson(
+ 'acct_xxxxxxxxxxxxx',
+ [
+ 'first_name' => 'Jane',
+ 'last_name' => 'Diaz',
+ ]
);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\FinancialConnections\AccountOwner::class, $result->data[0]);
+ static::assertInstanceOf(\Stripe\Person::class, $result);
}
- public function testRefreshAccount()
+ public function testAccountsPersonsPost2()
{
$this->expectsRequest(
'post',
- '/v1/financial_connections/accounts/fca_xyz/refresh'
+ '/v1/accounts/acct_xxxxxxxxxxxxx/persons/person_xxxxxxxxxxxxx'
);
- $result = $this->client->financialConnections->accounts->refresh(
- 'fca_xyz',
- ['features' => ['balance']]
+ $result = $this->client->accounts->updatePerson(
+ 'acct_xxxxxxxxxxxxx',
+ 'person_xxxxxxxxxxxxx',
+ ['metadata' => ['order_id' => '6735']]
);
- static::assertInstanceOf(\Stripe\FinancialConnections\Account::class, $result);
+ static::assertInstanceOf(\Stripe\Person::class, $result);
}
- public function testCreateSession2()
+ public function testAccountsPost()
{
- $this->expectsRequest('post', '/v1/financial_connections/sessions');
- $result = $this->client->financialConnections->sessions->create([
- 'account_holder' => [
- 'type' => 'customer',
- 'customer' => 'cus_123',
+ $this->expectsRequest('post', '/v1/accounts');
+ $result = $this->client->accounts->create([
+ 'type' => 'custom',
+ 'country' => 'US',
+ 'email' => 'jenny.rosen@example.com',
+ 'capabilities' => [
+ 'card_payments' => ['requested' => true],
+ 'transfers' => ['requested' => true],
],
- 'permissions' => ['balances'],
]);
- static::assertInstanceOf(\Stripe\FinancialConnections\Session::class, $result);
+ static::assertInstanceOf(\Stripe\Account::class, $result);
}
- public function testRetrieveSession()
+ public function testAccountsPost2()
{
- $this->expectsRequest(
- 'get',
- '/v1/financial_connections/sessions/fcsess_xyz'
- );
- $result = $this->client->financialConnections->sessions->retrieve(
- 'fcsess_xyz',
- []
+ $this->expectsRequest('post', '/v1/accounts/acct_xxxxxxxxxxxxx');
+ $result = $this->client->accounts->update(
+ 'acct_xxxxxxxxxxxxx',
+ ['metadata' => ['order_id' => '6735']]
);
- static::assertInstanceOf(\Stripe\FinancialConnections\Session::class, $result);
+ static::assertInstanceOf(\Stripe\Account::class, $result);
}
- public function testUpcomingInvoice()
+ public function testAccountsRejectPost()
{
- $this->expectsRequest('get', '/v1/invoices/upcoming');
- $result = $this->client->invoices->upcoming([
- 'customer' => 'cus_9utnxg47pWjV1e',
- ]);
- static::assertInstanceOf(\Stripe\Invoice::class, $result);
+ $this->expectsRequest('post', '/v1/accounts/acct_xxxxxxxxxxxxx/reject');
+ $result = $this->client->accounts->reject(
+ 'acct_xxxxxxxxxxxxx',
+ ['reason' => 'fraud']
+ );
+ static::assertInstanceOf(\Stripe\Account::class, $result);
}
- public function testCreatePaymentIntent()
+ public function testApplicationFeesGet()
{
- $this->expectsRequest('post', '/v1/payment_intents');
- $result = $this->client->paymentIntents->create([
- 'amount' => 1099,
- 'currency' => 'eur',
- 'automatic_payment_methods' => ['enabled' => true],
- ]);
- static::assertInstanceOf(\Stripe\PaymentIntent::class, $result);
+ $this->expectsRequest('get', '/v1/application_fees');
+ $result = $this->client->applicationFees->all(['limit' => 3]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\ApplicationFee::class, $result->data[0]);
}
- public function testVerifyMicrodepositsPaymentIntent()
+ public function testApplicationFeesGet2()
{
- $this->expectsRequest(
- 'post',
- '/v1/payment_intents/pi_xxxxxxxxxxxxx/verify_microdeposits'
- );
- $result = $this->client->paymentIntents->verifyMicrodeposits(
- 'pi_xxxxxxxxxxxxx',
+ $this->expectsRequest('get', '/v1/application_fees/fee_xxxxxxxxxxxxx');
+ $result = $this->client->applicationFees->retrieve(
+ 'fee_xxxxxxxxxxxxx',
[]
);
- static::assertInstanceOf(\Stripe\PaymentIntent::class, $result);
- }
-
- public function testCreatePaymentLink()
- {
- $this->expectsRequest('post', '/v1/payment_links');
- $result = $this->client->paymentLinks->create([
- 'line_items' => [
- [
- 'price' => 'price_xxxxxxxxxxxxx',
- 'quantity' => 1,
- ],
- ],
- ]);
- static::assertInstanceOf(\Stripe\PaymentLink::class, $result);
- }
-
- public function testRetrievePaymentLink()
- {
- $this->expectsRequest('get', '/v1/payment_links/pl_xyz');
- $result = $this->client->paymentLinks->retrieve('pl_xyz', []);
- static::assertInstanceOf(\Stripe\PaymentLink::class, $result);
+ static::assertInstanceOf(\Stripe\ApplicationFee::class, $result);
}
- public function testListLineItemsPaymentLink()
+ public function testApplicationFeesRefundsGet()
{
- $this->expectsRequest('get', '/v1/payment_links/pl_xyz/line_items');
- $result = $this->client->paymentLinks->allLineItems('pl_xyz', []);
+ $this->expectsRequest(
+ 'get',
+ '/v1/application_fees/fee_xxxxxxxxxxxxx/refunds'
+ );
+ $result = $this->client->applicationFees->allRefunds(
+ 'fee_xxxxxxxxxxxxx',
+ ['limit' => 3]
+ );
static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\LineItem::class, $result->data[0]);
+ static::assertInstanceOf(\Stripe\ApplicationFeeRefund::class, $result->data[0]);
}
- public function testCreatePrice()
+ public function testApplicationFeesRefundsGet2()
{
- $this->expectsRequest('post', '/v1/prices');
- $result = $this->client->prices->create([
- 'unit_amount' => 2000,
- 'currency' => 'usd',
- 'currency_options' => [
- 'uah' => ['unit_amount' => 5000],
- 'eur' => ['unit_amount' => 1800],
- ],
- 'recurring' => ['interval' => 'month'],
- 'product' => 'prod_xxxxxxxxxxxxx',
- ]);
- static::assertInstanceOf(\Stripe\Price::class, $result);
+ $this->expectsRequest(
+ 'get',
+ '/v1/application_fees/fee_xxxxxxxxxxxxx/refunds/fr_xxxxxxxxxxxxx'
+ );
+ $result = $this->client->applicationFees->retrieveRefund(
+ 'fee_xxxxxxxxxxxxx',
+ 'fr_xxxxxxxxxxxxx',
+ []
+ );
+ static::assertInstanceOf(\Stripe\ApplicationFeeRefund::class, $result);
}
- public function testListSetupAttempt()
+ public function testApplicationFeesRefundsPost()
{
- $this->expectsRequest('get', '/v1/setup_attempts');
- $result = $this->client->setupAttempts->all([
- 'limit' => 3,
- 'setup_intent' => 'si_xyz',
- ]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\SetupAttempt::class, $result->data[0]);
+ $this->expectsRequest(
+ 'post',
+ '/v1/application_fees/fee_xxxxxxxxxxxxx/refunds'
+ );
+ $result = $this->client->applicationFees->createRefund(
+ 'fee_xxxxxxxxxxxxx',
+ []
+ );
+ static::assertInstanceOf(\Stripe\ApplicationFeeRefund::class, $result);
}
- public function testVerifyMicrodepositsSetupIntent()
+ public function testApplicationFeesRefundsPost2()
{
$this->expectsRequest(
'post',
- '/v1/setup_intents/seti_xxxxxxxxxxxxx/verify_microdeposits'
+ '/v1/application_fees/fee_xxxxxxxxxxxxx/refunds/fr_xxxxxxxxxxxxx'
);
- $result = $this->client->setupIntents->verifyMicrodeposits(
- 'seti_xxxxxxxxxxxxx',
- []
+ $result = $this->client->applicationFees->updateRefund(
+ 'fee_xxxxxxxxxxxxx',
+ 'fr_xxxxxxxxxxxxx',
+ ['metadata' => ['order_id' => '6735']]
);
- static::assertInstanceOf(\Stripe\SetupIntent::class, $result);
+ static::assertInstanceOf(\Stripe\ApplicationFeeRefund::class, $result);
}
- public function testListShippingRate()
+ public function testAppsSecretsDeletePost()
{
- $this->expectsRequest('get', '/v1/shipping_rates');
- $result = $this->client->shippingRates->all([]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\ShippingRate::class, $result->data[0]);
+ $this->expectsRequest('post', '/v1/apps/secrets/delete');
+ $result = $this->client->apps->secrets->deleteWhere([
+ 'name' => 'my-api-key',
+ 'scope' => ['type' => 'account'],
+ ]);
+ static::assertInstanceOf(\Stripe\Apps\Secret::class, $result);
}
- public function testCreateShippingRate()
+ public function testAppsSecretsFindGet()
{
- $this->expectsRequest('post', '/v1/shipping_rates');
- $result = $this->client->shippingRates->create([
- 'display_name' => 'Sample Shipper',
- 'fixed_amount' => [
- 'currency' => 'usd',
- 'amount' => 400,
- ],
- 'type' => 'fixed_amount',
+ $this->expectsRequest('get', '/v1/apps/secrets/find');
+ $result = $this->client->apps->secrets->find([
+ 'name' => 'sec_123',
+ 'scope' => ['type' => 'account'],
]);
- static::assertInstanceOf(\Stripe\ShippingRate::class, $result);
+ static::assertInstanceOf(\Stripe\Apps\Secret::class, $result);
}
- public function testListConfiguration()
+ public function testAppsSecretsGet()
{
- $this->expectsRequest('get', '/v1/terminal/configurations');
- $result = $this->client->terminal->configurations->all([]);
+ $this->expectsRequest('get', '/v1/apps/secrets');
+ $result = $this->client->apps->secrets->all([
+ 'scope' => ['type' => 'account'],
+ 'limit' => 2,
+ ]);
static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Terminal\Configuration::class, $result->data[0]);
+ static::assertInstanceOf(\Stripe\Apps\Secret::class, $result->data[0]);
}
- public function testDeleteConfiguration()
+ public function testAppsSecretsGet2()
{
- $this->expectsRequest('delete', '/v1/terminal/configurations/uc_123');
- $result = $this->client->terminal->configurations->delete('uc_123', []);
- static::assertInstanceOf(\Stripe\Terminal\Configuration::class, $result);
+ $this->expectsRequest('get', '/v1/apps/secrets');
+ $result = $this->client->apps->secrets->all([
+ 'scope' => ['type' => 'account'],
+ 'limit' => 2,
+ ]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\Apps\Secret::class, $result->data[0]);
}
- public function testRetrieveConfiguration()
+ public function testAppsSecretsPost()
{
- $this->expectsRequest('get', '/v1/terminal/configurations/uc_123');
- $result = $this->client->terminal->configurations->retrieve(
- 'uc_123',
- []
- );
- static::assertInstanceOf(\Stripe\Terminal\Configuration::class, $result);
+ $this->expectsRequest('post', '/v1/apps/secrets');
+ $result = $this->client->apps->secrets->create([
+ 'name' => 'sec_123',
+ 'payload' => 'very secret string',
+ 'scope' => ['type' => 'account'],
+ ]);
+ static::assertInstanceOf(\Stripe\Apps\Secret::class, $result);
}
- public function testUpdateConfiguration()
+ public function testAppsSecretsPost2()
{
- $this->expectsRequest('post', '/v1/terminal/configurations/uc_123');
- $result = $this->client->terminal->configurations->update(
- 'uc_123',
- ['tipping' => ['usd' => ['fixed_amounts' => [10]]]]
- );
- static::assertInstanceOf(\Stripe\Terminal\Configuration::class, $result);
+ $this->expectsRequest('post', '/v1/apps/secrets');
+ $result = $this->client->apps->secrets->create([
+ 'name' => 'my-api-key',
+ 'payload' => 'secret_key_xxxxxx',
+ 'scope' => ['type' => 'account'],
+ ]);
+ static::assertInstanceOf(\Stripe\Apps\Secret::class, $result);
}
- public function testFundCashBalanceCustomer()
+ public function testBalanceTransactionsGet()
{
- $this->expectsRequest(
- 'post',
- '/v1/test_helpers/customers/cus_123/fund_cash_balance'
- );
- $result = $this->client->testHelpers->customers->fundCashBalance(
- 'cus_123',
- [
- 'amount' => 30,
- 'currency' => 'eur',
- ]
- );
- static::assertInstanceOf(\Stripe\CustomerCashBalanceTransaction::class, $result);
+ $this->expectsRequest('get', '/v1/balance_transactions');
+ $result = $this->client->balanceTransactions->all(['limit' => 3]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\BalanceTransaction::class, $result->data[0]);
}
- public function testDeliverCardCard()
+ public function testBalanceTransactionsGet2()
{
$this->expectsRequest(
- 'post',
- '/v1/test_helpers/issuing/cards/card_123/shipping/deliver'
+ 'get',
+ '/v1/balance_transactions/txn_xxxxxxxxxxxxx'
);
- $result = $this->client->testHelpers->issuing->cards->deliverCard(
- 'card_123',
+ $result = $this->client->balanceTransactions->retrieve(
+ 'txn_xxxxxxxxxxxxx',
[]
);
- static::assertInstanceOf(\Stripe\Issuing\Card::class, $result);
+ static::assertInstanceOf(\Stripe\BalanceTransaction::class, $result);
}
- public function testFailCardCard()
+ public function testBillingPortalConfigurationsGet()
{
- $this->expectsRequest(
- 'post',
- '/v1/test_helpers/issuing/cards/card_123/shipping/fail'
- );
- $result = $this->client->testHelpers->issuing->cards->failCard(
- 'card_123',
- []
- );
- static::assertInstanceOf(\Stripe\Issuing\Card::class, $result);
+ $this->expectsRequest('get', '/v1/billing_portal/configurations');
+ $result = $this->client->billingPortal->configurations->all([
+ 'limit' => 3,
+ ]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\BillingPortal\Configuration::class, $result->data[0]);
}
- public function testReturnCardCard()
+ public function testBillingPortalConfigurationsGet2()
{
$this->expectsRequest(
- 'post',
- '/v1/test_helpers/issuing/cards/card_123/shipping/return'
+ 'get',
+ '/v1/billing_portal/configurations/bpc_xxxxxxxxxxxxx'
);
- $result = $this->client->testHelpers->issuing->cards->returnCard(
- 'card_123',
+ $result = $this->client->billingPortal->configurations->retrieve(
+ 'bpc_xxxxxxxxxxxxx',
[]
);
- static::assertInstanceOf(\Stripe\Issuing\Card::class, $result);
+ static::assertInstanceOf(\Stripe\BillingPortal\Configuration::class, $result);
}
- public function testShipCardCard()
+ public function testBillingPortalConfigurationsPost2()
{
$this->expectsRequest(
'post',
- '/v1/test_helpers/issuing/cards/card_123/shipping/ship'
+ '/v1/billing_portal/configurations/bpc_xxxxxxxxxxxxx'
);
- $result = $this->client->testHelpers->issuing->cards->shipCard(
- 'card_123',
- []
+ $result = $this->client->billingPortal->configurations->update(
+ 'bpc_xxxxxxxxxxxxx',
+ [
+ 'business_profile' => [
+ 'privacy_policy_url' => 'https://example.com/privacy',
+ 'terms_of_service_url' => 'https://example.com/terms',
+ ],
+ ]
);
- static::assertInstanceOf(\Stripe\Issuing\Card::class, $result);
+ static::assertInstanceOf(\Stripe\BillingPortal\Configuration::class, $result);
}
- public function testExpireRefund()
+ public function testBillingPortalSessionsPost()
{
- $this->expectsRequest('post', '/v1/test_helpers/refunds/re_123/expire');
- $result = $this->client->testHelpers->refunds->expire('re_123', []);
- static::assertInstanceOf(\Stripe\Refund::class, $result);
+ $this->expectsRequest('post', '/v1/billing_portal/sessions');
+ $result = $this->client->billingPortal->sessions->create([
+ 'customer' => 'cus_xxxxxxxxxxxxx',
+ 'return_url' => 'https://example.com/account',
+ ]);
+ static::assertInstanceOf(\Stripe\BillingPortal\Session::class, $result);
}
- public function testListTestClock()
+ public function testChargesCapturePost()
{
- $this->expectsRequest('get', '/v1/test_helpers/test_clocks');
- $result = $this->client->testHelpers->testClocks->all([]);
+ $this->expectsRequest('post', '/v1/charges/ch_xxxxxxxxxxxxx/capture');
+ $result = $this->client->charges->capture('ch_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\Charge::class, $result);
+ }
+
+ public function testChargesGet()
+ {
+ $this->expectsRequest('get', '/v1/charges');
+ $result = $this->client->charges->all(['limit' => 3]);
static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\TestHelpers\TestClock::class, $result->data[0]);
+ static::assertInstanceOf(\Stripe\Charge::class, $result->data[0]);
}
- public function testCreateTestClock()
+ public function testChargesGet2()
{
- $this->expectsRequest('post', '/v1/test_helpers/test_clocks');
- $result = $this->client->testHelpers->testClocks->create([
- 'frozen_time' => 123,
- 'name' => 'cogsworth',
- ]);
- static::assertInstanceOf(\Stripe\TestHelpers\TestClock::class, $result);
+ $this->expectsRequest('get', '/v1/charges/ch_xxxxxxxxxxxxx');
+ $result = $this->client->charges->retrieve('ch_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\Charge::class, $result);
}
- public function testDeleteTestClock()
+ public function testChargesPost()
{
- $this->expectsRequest(
- 'delete',
- '/v1/test_helpers/test_clocks/clock_xyz'
- );
- $result = $this->client->testHelpers->testClocks->delete(
- 'clock_xyz',
- []
- );
- static::assertInstanceOf(\Stripe\TestHelpers\TestClock::class, $result);
+ $this->expectsRequest('post', '/v1/charges');
+ $result = $this->client->charges->create([
+ 'amount' => 2000,
+ 'currency' => 'usd',
+ 'source' => 'tok_xxxx',
+ 'description' => 'My First Test Charge (created for API docs at https://www.stripe.com/docs/api)',
+ ]);
+ static::assertInstanceOf(\Stripe\Charge::class, $result);
}
- public function testRetrieveTestClock()
+ public function testChargesPost2()
{
- $this->expectsRequest('get', '/v1/test_helpers/test_clocks/clock_xyz');
- $result = $this->client->testHelpers->testClocks->retrieve(
- 'clock_xyz',
- []
+ $this->expectsRequest('post', '/v1/charges/ch_xxxxxxxxxxxxx');
+ $result = $this->client->charges->update(
+ 'ch_xxxxxxxxxxxxx',
+ ['metadata' => ['order_id' => '6735']]
);
- static::assertInstanceOf(\Stripe\TestHelpers\TestClock::class, $result);
+ static::assertInstanceOf(\Stripe\Charge::class, $result);
}
- public function testAdvanceTestClock()
+ public function testChargesSearchGet()
{
- $this->expectsRequest(
- 'post',
- '/v1/test_helpers/test_clocks/clock_xyz/advance'
- );
- $result = $this->client->testHelpers->testClocks->advance(
- 'clock_xyz',
- ['frozen_time' => 142]
- );
- static::assertInstanceOf(\Stripe\TestHelpers\TestClock::class, $result);
+ $this->expectsRequest('get', '/v1/charges/search');
+ $result = $this->client->charges->search([
+ 'query' => 'amount>999 AND metadata[\'order_id\']:\'6735\'',
+ ]);
+ static::assertInstanceOf(\Stripe\SearchResult::class, $result);
+ static::assertInstanceOf(\Stripe\Charge::class, $result->data[0]);
}
- public function testFailInboundTransfer()
+ public function testCheckoutSessionsExpirePost()
{
- $this->expectsRequest(
- 'post',
- '/v1/test_helpers/treasury/inbound_transfers/ibt_123/fail'
- );
- $result = $this->client->testHelpers->treasury->inboundTransfers->fail(
- 'ibt_123',
- ['failure_details' => ['code' => 'account_closed']]
- );
- static::assertInstanceOf(\Stripe\Treasury\InboundTransfer::class, $result);
+ $this->expectsRequest('post', '/v1/checkout/sessions/sess_xyz/expire');
+ $result = $this->client->checkout->sessions->expire('sess_xyz', []);
+ static::assertInstanceOf(\Stripe\Checkout\Session::class, $result);
}
- public function testReturnInboundTransferInboundTransfer()
+ public function testCheckoutSessionsExpirePost2()
{
$this->expectsRequest(
'post',
- '/v1/test_helpers/treasury/inbound_transfers/ibt_123/return'
+ '/v1/checkout/sessions/cs_test_xxxxxxxxxxxxx/expire'
);
- $result = $this->client->testHelpers->treasury->inboundTransfers->returnInboundTransfer(
- 'ibt_123',
+ $result = $this->client->checkout->sessions->expire(
+ 'cs_test_xxxxxxxxxxxxx',
[]
);
- static::assertInstanceOf(\Stripe\Treasury\InboundTransfer::class, $result);
+ static::assertInstanceOf(\Stripe\Checkout\Session::class, $result);
}
- public function testSucceedInboundTransfer()
+ public function testCheckoutSessionsGet()
{
- $this->expectsRequest(
- 'post',
- '/v1/test_helpers/treasury/inbound_transfers/ibt_123/succeed'
- );
- $result = $this->client->testHelpers->treasury->inboundTransfers->succeed(
- 'ibt_123',
- []
- );
- static::assertInstanceOf(\Stripe\Treasury\InboundTransfer::class, $result);
+ $this->expectsRequest('get', '/v1/checkout/sessions');
+ $result = $this->client->checkout->sessions->all(['limit' => 3]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\Checkout\Session::class, $result->data[0]);
}
- public function testFailOutboundTransfer()
+ public function testCheckoutSessionsGet2()
{
$this->expectsRequest(
- 'post',
- '/v1/test_helpers/treasury/outbound_transfers/obt_123/fail'
+ 'get',
+ '/v1/checkout/sessions/cs_test_xxxxxxxxxxxxx'
);
- $result = $this->client->testHelpers->treasury->outboundTransfers->fail(
- 'obt_123',
+ $result = $this->client->checkout->sessions->retrieve(
+ 'cs_test_xxxxxxxxxxxxx',
[]
);
- static::assertInstanceOf(\Stripe\Treasury\OutboundTransfer::class, $result);
+ static::assertInstanceOf(\Stripe\Checkout\Session::class, $result);
}
- public function testPostOutboundTransfer()
+ public function testCheckoutSessionsLineItemsGet()
{
$this->expectsRequest(
- 'post',
- '/v1/test_helpers/treasury/outbound_transfers/obt_123/post'
+ 'get',
+ '/v1/checkout/sessions/sess_xyz/line_items'
);
- $result = $this->client->testHelpers->treasury->outboundTransfers->post(
- 'obt_123',
+ $result = $this->client->checkout->sessions->allLineItems(
+ 'sess_xyz',
[]
);
- static::assertInstanceOf(\Stripe\Treasury\OutboundTransfer::class, $result);
- }
-
- public function testReturnOutboundTransferOutboundTransfer()
- {
- $this->expectsRequest(
- 'post',
- '/v1/test_helpers/treasury/outbound_transfers/obt_123/return'
- );
- $result = $this->client->testHelpers->treasury->outboundTransfers->returnOutboundTransfer(
- 'obt_123',
- ['returned_details' => ['code' => 'account_closed']]
- );
- static::assertInstanceOf(\Stripe\Treasury\OutboundTransfer::class, $result);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\LineItem::class, $result->data[0]);
}
- public function testCreateReceivedCredit()
+ public function testCheckoutSessionsPost()
{
- $this->expectsRequest(
- 'post',
- '/v1/test_helpers/treasury/received_credits'
- );
- $result = $this->client->testHelpers->treasury->receivedCredits->create([
- 'financial_account' => 'fa_123',
- 'network' => 'ach',
- 'amount' => 1234,
- 'currency' => 'usd',
+ $this->expectsRequest('post', '/v1/checkout/sessions');
+ $result = $this->client->checkout->sessions->create([
+ 'success_url' => 'https://example.com/success',
+ 'cancel_url' => 'https://example.com/cancel',
+ 'mode' => 'payment',
+ 'shipping_options' => [
+ ['shipping_rate' => 'shr_standard'],
+ [
+ 'shipping_rate_data' => [
+ 'display_name' => 'Standard',
+ 'delivery_estimate' => [
+ 'minimum' => [
+ 'unit' => 'day',
+ 'value' => 5,
+ ],
+ 'maximum' => [
+ 'unit' => 'day',
+ 'value' => 7,
+ ],
+ ],
+ ],
+ ],
+ ],
]);
- static::assertInstanceOf(\Stripe\Treasury\ReceivedCredit::class, $result);
+ static::assertInstanceOf(\Stripe\Checkout\Session::class, $result);
}
- public function testCreateReceivedDebit()
+ public function testCheckoutSessionsPost2()
{
- $this->expectsRequest(
- 'post',
- '/v1/test_helpers/treasury/received_debits'
- );
- $result = $this->client->testHelpers->treasury->receivedDebits->create([
- 'financial_account' => 'fa_123',
- 'network' => 'ach',
- 'amount' => 1234,
- 'currency' => 'usd',
+ $this->expectsRequest('post', '/v1/checkout/sessions');
+ $result = $this->client->checkout->sessions->create([
+ 'success_url' => 'https://example.com/success',
+ 'line_items' => [
+ [
+ 'price' => 'price_xxxxxxxxxxxxx',
+ 'quantity' => 2,
+ ],
+ ],
+ 'mode' => 'payment',
]);
- static::assertInstanceOf(\Stripe\Treasury\ReceivedDebit::class, $result);
+ static::assertInstanceOf(\Stripe\Checkout\Session::class, $result);
}
- public function testCreateToken()
+ public function testCountrySpecsGet()
{
- $this->expectsRequest('post', '/v1/tokens');
- $result = $this->client->tokens->create([
- 'card' => [
- 'number' => '4242424242424242',
- 'exp_month' => '5',
- 'exp_year' => '2023',
- 'cvc' => '314',
- ],
- ]);
- static::assertInstanceOf(\Stripe\Token::class, $result);
+ $this->expectsRequest('get', '/v1/country_specs');
+ $result = $this->client->countrySpecs->all(['limit' => 3]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\CountrySpec::class, $result->data[0]);
}
- public function testCreateAccountLink()
+ public function testCountrySpecsGet2()
{
- $this->expectsRequest('post', '/v1/account_links');
- $result = $this->client->accountLinks->create([
- 'account' => 'acct_xxxxxxxxxxxxx',
- 'refresh_url' => 'https://example.com/reauth',
- 'return_url' => 'https://example.com/return',
- 'type' => 'account_onboarding',
- ]);
- static::assertInstanceOf(\Stripe\AccountLink::class, $result);
+ $this->expectsRequest('get', '/v1/country_specs/US');
+ $result = $this->client->countrySpecs->retrieve('US', []);
+ static::assertInstanceOf(\Stripe\CountrySpec::class, $result);
}
- public function testListAccount2()
+ public function testCouponsDelete()
{
- $this->expectsRequest('get', '/v1/accounts');
- $result = $this->client->accounts->all(['limit' => 3]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Account::class, $result->data[0]);
+ $this->expectsRequest('delete', '/v1/coupons/Z4OV52SU');
+ $result = $this->client->coupons->delete('Z4OV52SU', []);
+ static::assertInstanceOf(\Stripe\Coupon::class, $result);
}
- public function testCreateAccount()
+ public function testCouponsGet()
{
- $this->expectsRequest('post', '/v1/accounts');
- $result = $this->client->accounts->create([
- 'type' => 'custom',
- 'country' => 'US',
- 'email' => 'jenny.rosen@example.com',
- 'capabilities' => [
- 'card_payments' => ['requested' => true],
- 'transfers' => ['requested' => true],
- ],
- ]);
- static::assertInstanceOf(\Stripe\Account::class, $result);
+ $this->expectsRequest('get', '/v1/coupons');
+ $result = $this->client->coupons->all(['limit' => 3]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\Coupon::class, $result->data[0]);
}
- public function testDeleteAccount()
+ public function testCouponsGet2()
{
- $this->expectsRequest('delete', '/v1/accounts/acct_xxxxxxxxxxxxx');
- $result = $this->client->accounts->delete('acct_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\Account::class, $result);
+ $this->expectsRequest('get', '/v1/coupons/Z4OV52SU');
+ $result = $this->client->coupons->retrieve('Z4OV52SU', []);
+ static::assertInstanceOf(\Stripe\Coupon::class, $result);
}
- public function testRetrieveAccount2()
+ public function testCouponsPost()
{
- $this->expectsRequest('get', '/v1/accounts/acct_xxxxxxxxxxxxx');
- $result = $this->client->accounts->retrieve('acct_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\Account::class, $result);
+ $this->expectsRequest('post', '/v1/coupons');
+ $result = $this->client->coupons->create([
+ 'percent_off' => 25.5,
+ 'duration' => 'repeating',
+ 'duration_in_months' => 3,
+ ]);
+ static::assertInstanceOf(\Stripe\Coupon::class, $result);
}
- public function testUpdateAccount()
+ public function testCouponsPost2()
{
- $this->expectsRequest('post', '/v1/accounts/acct_xxxxxxxxxxxxx');
- $result = $this->client->accounts->update(
- 'acct_xxxxxxxxxxxxx',
+ $this->expectsRequest('post', '/v1/coupons/Z4OV52SU');
+ $result = $this->client->coupons->update(
+ 'Z4OV52SU',
['metadata' => ['order_id' => '6735']]
);
- static::assertInstanceOf(\Stripe\Account::class, $result);
+ static::assertInstanceOf(\Stripe\Coupon::class, $result);
}
- public function testRejectAccount()
+ public function testCreditNotesGet()
{
- $this->expectsRequest('post', '/v1/accounts/acct_xxxxxxxxxxxxx/reject');
- $result = $this->client->accounts->reject(
- 'acct_xxxxxxxxxxxxx',
- ['reason' => 'fraud']
- );
- static::assertInstanceOf(\Stripe\Account::class, $result);
+ $this->expectsRequest('get', '/v1/credit_notes');
+ $result = $this->client->creditNotes->all(['limit' => 3]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\CreditNote::class, $result->data[0]);
}
- public function testListCapability()
+ public function testCreditNotesLinesGet()
{
- $this->expectsRequest(
- 'get',
- '/v1/accounts/acct_xxxxxxxxxxxxx/capabilities'
- );
- $result = $this->client->accounts->allCapabilities(
- 'acct_xxxxxxxxxxxxx',
- []
+ $this->expectsRequest('get', '/v1/credit_notes/cn_xxxxxxxxxxxxx/lines');
+ $result = $this->client->creditNotes->allLines(
+ 'cn_xxxxxxxxxxxxx',
+ ['limit' => 3]
);
static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Capability::class, $result->data[0]);
+ static::assertInstanceOf(\Stripe\CreditNoteLineItem::class, $result->data[0]);
}
- public function testRetrieveCapability()
+ public function testCreditNotesPost()
{
- $this->expectsRequest(
- 'get',
- '/v1/accounts/acct_xxxxxxxxxxxxx/capabilities/card_payments'
- );
- $result = $this->client->accounts->retrieveCapability(
- 'acct_xxxxxxxxxxxxx',
- 'card_payments',
- []
- );
- static::assertInstanceOf(\Stripe\Capability::class, $result);
+ $this->expectsRequest('post', '/v1/credit_notes');
+ $result = $this->client->creditNotes->create([
+ 'invoice' => 'in_xxxxxxxxxxxxx',
+ 'lines' => [
+ [
+ 'type' => 'invoice_line_item',
+ 'invoice_line_item' => 'il_xxxxxxxxxxxxx',
+ 'quantity' => 1,
+ ],
+ ],
+ ]);
+ static::assertInstanceOf(\Stripe\CreditNote::class, $result);
}
- public function testUpdateCapability()
+ public function testCreditNotesPreviewGet()
{
- $this->expectsRequest(
- 'post',
- '/v1/accounts/acct_xxxxxxxxxxxxx/capabilities/card_payments'
- );
- $result = $this->client->accounts->updateCapability(
- 'acct_xxxxxxxxxxxxx',
- 'card_payments',
- ['requested' => true]
- );
- static::assertInstanceOf(\Stripe\Capability::class, $result);
+ $this->expectsRequest('get', '/v1/credit_notes/preview');
+ $result = $this->client->creditNotes->preview([
+ 'invoice' => 'in_xxxxxxxxxxxxx',
+ 'lines' => [
+ [
+ 'type' => 'invoice_line_item',
+ 'invoice_line_item' => 'il_xxxxxxxxxxxxx',
+ 'quantity' => 1,
+ ],
+ ],
+ ]);
+ static::assertInstanceOf(\Stripe\CreditNote::class, $result);
}
- public function testCreateLoginLink()
+ public function testCreditNotesPreviewLinesGet()
{
- $this->expectsRequest(
- 'post',
- '/v1/accounts/acct_xxxxxxxxxxxxx/login_links'
- );
- $result = $this->client->accounts->createLoginLink(
- 'acct_xxxxxxxxxxxxx',
- []
- );
- static::assertInstanceOf(\Stripe\LoginLink::class, $result);
+ $this->expectsRequest('get', '/v1/credit_notes/preview/lines');
+ $result = $this->client->creditNotes->previewLines([
+ 'limit' => 3,
+ 'invoice' => 'in_xxxxxxxxxxxxx',
+ ]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\CreditNoteLineItem::class, $result->data[0]);
}
- public function testListPerson()
+ public function testCreditNotesVoidPost()
{
- $this->expectsRequest('get', '/v1/accounts/acct_xxxxxxxxxxxxx/persons');
- $result = $this->client->accounts->allPersons(
- 'acct_xxxxxxxxxxxxx',
- ['limit' => 3]
+ $this->expectsRequest('post', '/v1/credit_notes/cn_xxxxxxxxxxxxx/void');
+ $result = $this->client->creditNotes->voidCreditNote(
+ 'cn_xxxxxxxxxxxxx',
+ []
);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Person::class, $result->data[0]);
+ static::assertInstanceOf(\Stripe\CreditNote::class, $result);
}
- public function testCreatePerson()
+ public function testCustomersBalanceTransactionsGet()
{
$this->expectsRequest(
- 'post',
- '/v1/accounts/acct_xxxxxxxxxxxxx/persons'
+ 'get',
+ '/v1/customers/cus_xxxxxxxxxxxxx/balance_transactions'
);
- $result = $this->client->accounts->createPerson(
- 'acct_xxxxxxxxxxxxx',
- [
- 'first_name' => 'Jane',
- 'last_name' => 'Diaz',
- ]
+ $result = $this->client->customers->allBalanceTransactions(
+ 'cus_xxxxxxxxxxxxx',
+ ['limit' => 3]
);
- static::assertInstanceOf(\Stripe\Person::class, $result);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\CustomerBalanceTransaction::class, $result->data[0]);
}
- public function testDeletePerson()
+ public function testCustomersBalanceTransactionsGet2()
{
$this->expectsRequest(
- 'delete',
- '/v1/accounts/acct_xxxxxxxxxxxxx/persons/person_xxxxxxxxxxxxx'
+ 'get',
+ '/v1/customers/cus_xxxxxxxxxxxxx/balance_transactions/cbtxn_xxxxxxxxxxxxx'
);
- $result = $this->client->accounts->deletePerson(
- 'acct_xxxxxxxxxxxxx',
- 'person_xxxxxxxxxxxxx',
+ $result = $this->client->customers->retrieveBalanceTransaction(
+ 'cus_xxxxxxxxxxxxx',
+ 'cbtxn_xxxxxxxxxxxxx',
[]
);
- static::assertInstanceOf(\Stripe\Person::class, $result);
+ static::assertInstanceOf(\Stripe\CustomerBalanceTransaction::class, $result);
}
- public function testRetrievePerson()
+ public function testCustomersBalanceTransactionsPost()
{
$this->expectsRequest(
- 'get',
- '/v1/accounts/acct_xxxxxxxxxxxxx/persons/person_xxxxxxxxxxxxx'
+ 'post',
+ '/v1/customers/cus_xxxxxxxxxxxxx/balance_transactions'
);
- $result = $this->client->accounts->retrievePerson(
- 'acct_xxxxxxxxxxxxx',
- 'person_xxxxxxxxxxxxx',
- []
+ $result = $this->client->customers->createBalanceTransaction(
+ 'cus_xxxxxxxxxxxxx',
+ [
+ 'amount' => -500,
+ 'currency' => 'usd',
+ ]
);
- static::assertInstanceOf(\Stripe\Person::class, $result);
+ static::assertInstanceOf(\Stripe\CustomerBalanceTransaction::class, $result);
}
- public function testUpdatePerson()
+ public function testCustomersBalanceTransactionsPost2()
{
$this->expectsRequest(
'post',
- '/v1/accounts/acct_xxxxxxxxxxxxx/persons/person_xxxxxxxxxxxxx'
+ '/v1/customers/cus_xxxxxxxxxxxxx/balance_transactions/cbtxn_xxxxxxxxxxxxx'
);
- $result = $this->client->accounts->updatePerson(
- 'acct_xxxxxxxxxxxxx',
- 'person_xxxxxxxxxxxxx',
+ $result = $this->client->customers->updateBalanceTransaction(
+ 'cus_xxxxxxxxxxxxx',
+ 'cbtxn_xxxxxxxxxxxxx',
['metadata' => ['order_id' => '6735']]
);
- static::assertInstanceOf(\Stripe\Person::class, $result);
+ static::assertInstanceOf(\Stripe\CustomerBalanceTransaction::class, $result);
}
- public function testListApplicationFee()
+ public function testCustomersCashBalanceGet()
{
- $this->expectsRequest('get', '/v1/application_fees');
- $result = $this->client->applicationFees->all(['limit' => 3]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\ApplicationFee::class, $result->data[0]);
+ $this->expectsRequest('get', '/v1/customers/cus_123/cash_balance');
+ $result = $this->client->customers->retrieveCashBalance('cus_123', []);
+ static::assertInstanceOf(\Stripe\CashBalance::class, $result);
}
- public function testRetrieveApplicationFee()
+ public function testCustomersCashBalancePost()
{
- $this->expectsRequest('get', '/v1/application_fees/fee_xxxxxxxxxxxxx');
- $result = $this->client->applicationFees->retrieve(
- 'fee_xxxxxxxxxxxxx',
- []
+ $this->expectsRequest('post', '/v1/customers/cus_123/cash_balance');
+ $result = $this->client->customers->updateCashBalance(
+ 'cus_123',
+ ['settings' => ['reconciliation_mode' => 'manual']]
);
- static::assertInstanceOf(\Stripe\ApplicationFee::class, $result);
+ static::assertInstanceOf(\Stripe\CashBalance::class, $result);
}
- public function testListApplicationFeeRefund()
+ public function testCustomersDelete()
{
- $this->expectsRequest(
- 'get',
- '/v1/application_fees/fee_xxxxxxxxxxxxx/refunds'
- );
- $result = $this->client->applicationFees->allRefunds(
- 'fee_xxxxxxxxxxxxx',
- ['limit' => 3]
- );
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\ApplicationFeeRefund::class, $result->data[0]);
+ $this->expectsRequest('delete', '/v1/customers/cus_xxxxxxxxxxxxx');
+ $result = $this->client->customers->delete('cus_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\Customer::class, $result);
}
- public function testCreateApplicationFeeRefund()
+ public function testCustomersFundingInstructionsPost()
{
$this->expectsRequest(
'post',
- '/v1/application_fees/fee_xxxxxxxxxxxxx/refunds'
+ '/v1/customers/cus_123/funding_instructions'
);
- $result = $this->client->applicationFees->createRefund(
- 'fee_xxxxxxxxxxxxx',
- []
+ $result = $this->client->customers->createFundingInstructions(
+ 'cus_123',
+ [
+ 'bank_transfer' => [
+ 'requested_address_types' => ['zengin'],
+ 'type' => 'jp_bank_transfer',
+ ],
+ 'currency' => 'usd',
+ 'funding_type' => 'bank_transfer',
+ ]
);
- static::assertInstanceOf(\Stripe\ApplicationFeeRefund::class, $result);
+ static::assertInstanceOf(\Stripe\FundingInstructions::class, $result);
}
- public function testRetrieveApplicationFeeRefund()
+ public function testCustomersGet()
{
- $this->expectsRequest(
- 'get',
- '/v1/application_fees/fee_xxxxxxxxxxxxx/refunds/fr_xxxxxxxxxxxxx'
- );
- $result = $this->client->applicationFees->retrieveRefund(
- 'fee_xxxxxxxxxxxxx',
- 'fr_xxxxxxxxxxxxx',
- []
- );
- static::assertInstanceOf(\Stripe\ApplicationFeeRefund::class, $result);
+ $this->expectsRequest('get', '/v1/customers');
+ $result = $this->client->customers->all(['limit' => 3]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\Customer::class, $result->data[0]);
}
- public function testUpdateApplicationFeeRefund()
+ public function testCustomersGet2()
{
- $this->expectsRequest(
- 'post',
- '/v1/application_fees/fee_xxxxxxxxxxxxx/refunds/fr_xxxxxxxxxxxxx'
- );
- $result = $this->client->applicationFees->updateRefund(
- 'fee_xxxxxxxxxxxxx',
- 'fr_xxxxxxxxxxxxx',
- ['metadata' => ['order_id' => '6735']]
- );
- static::assertInstanceOf(\Stripe\ApplicationFeeRefund::class, $result);
+ $this->expectsRequest('get', '/v1/customers');
+ $result = $this->client->customers->all(['limit' => 3]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\Customer::class, $result->data[0]);
}
- public function testListSecret2()
+ public function testCustomersGet3()
{
- $this->expectsRequest('get', '/v1/apps/secrets');
- $result = $this->client->apps->secrets->all([
- 'scope' => ['type' => 'account'],
- 'limit' => 2,
- ]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Apps\Secret::class, $result->data[0]);
+ $this->expectsRequest('get', '/v1/customers/cus_xxxxxxxxxxxxx');
+ $result = $this->client->customers->retrieve('cus_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\Customer::class, $result);
}
- public function testCreateSecret2()
+ public function testCustomersPost()
{
- $this->expectsRequest('post', '/v1/apps/secrets');
- $result = $this->client->apps->secrets->create([
- 'name' => 'my-api-key',
- 'payload' => 'secret_key_xxxxxx',
- 'scope' => ['type' => 'account'],
+ $this->expectsRequest('post', '/v1/customers');
+ $result = $this->client->customers->create([
+ 'description' => 'My First Test Customer (created for API docs at https://www.stripe.com/docs/api)',
]);
- static::assertInstanceOf(\Stripe\Apps\Secret::class, $result);
+ static::assertInstanceOf(\Stripe\Customer::class, $result);
}
- public function testListBalanceTransaction()
+ public function testCustomersPost2()
{
- $this->expectsRequest('get', '/v1/balance_transactions');
- $result = $this->client->balanceTransactions->all(['limit' => 3]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\BalanceTransaction::class, $result->data[0]);
+ $this->expectsRequest('post', '/v1/customers/cus_xxxxxxxxxxxxx');
+ $result = $this->client->customers->update(
+ 'cus_xxxxxxxxxxxxx',
+ ['metadata' => ['order_id' => '6735']]
+ );
+ static::assertInstanceOf(\Stripe\Customer::class, $result);
}
- public function testRetrieveBalanceTransaction()
+ public function testCustomersSearchGet()
{
- $this->expectsRequest(
- 'get',
- '/v1/balance_transactions/txn_xxxxxxxxxxxxx'
- );
- $result = $this->client->balanceTransactions->retrieve(
- 'txn_xxxxxxxxxxxxx',
- []
- );
- static::assertInstanceOf(\Stripe\BalanceTransaction::class, $result);
+ $this->expectsRequest('get', '/v1/customers/search');
+ $result = $this->client->customers->search([
+ 'query' => 'name:\'fakename\' AND metadata[\'foo\']:\'bar\'',
+ ]);
+ static::assertInstanceOf(\Stripe\SearchResult::class, $result);
+ static::assertInstanceOf(\Stripe\Customer::class, $result->data[0]);
}
- public function testListConfiguration2()
+ public function testCustomersSearchGet2()
{
- $this->expectsRequest('get', '/v1/billing_portal/configurations');
- $result = $this->client->billingPortal->configurations->all([
- 'limit' => 3,
+ $this->expectsRequest('get', '/v1/customers/search');
+ $result = $this->client->customers->search([
+ 'query' => 'name:\'fakename\' AND metadata[\'foo\']:\'bar\'',
]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\BillingPortal\Configuration::class, $result->data[0]);
+ static::assertInstanceOf(\Stripe\SearchResult::class, $result);
+ static::assertInstanceOf(\Stripe\Customer::class, $result->data[0]);
}
- public function testRetrieveConfiguration2()
+ public function testCustomersTaxIdsDelete()
{
$this->expectsRequest(
- 'get',
- '/v1/billing_portal/configurations/bpc_xxxxxxxxxxxxx'
- );
- $result = $this->client->billingPortal->configurations->retrieve(
- 'bpc_xxxxxxxxxxxxx',
+ 'delete',
+ '/v1/customers/cus_xxxxxxxxxxxxx/tax_ids/txi_xxxxxxxxxxxxx'
+ );
+ $result = $this->client->customers->deleteTaxId(
+ 'cus_xxxxxxxxxxxxx',
+ 'txi_xxxxxxxxxxxxx',
[]
);
- static::assertInstanceOf(\Stripe\BillingPortal\Configuration::class, $result);
+ static::assertInstanceOf(\Stripe\TaxId::class, $result);
+ }
+
+ public function testCustomersTaxIdsGet()
+ {
+ $this->expectsRequest('get', '/v1/customers/cus_xxxxxxxxxxxxx/tax_ids');
+ $result = $this->client->customers->allTaxIds(
+ 'cus_xxxxxxxxxxxxx',
+ ['limit' => 3]
+ );
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\TaxId::class, $result->data[0]);
+ }
+
+ public function testCustomersTaxIdsGet2()
+ {
+ $this->expectsRequest(
+ 'get',
+ '/v1/customers/cus_xxxxxxxxxxxxx/tax_ids/txi_xxxxxxxxxxxxx'
+ );
+ $result = $this->client->customers->retrieveTaxId(
+ 'cus_xxxxxxxxxxxxx',
+ 'txi_xxxxxxxxxxxxx',
+ []
+ );
+ static::assertInstanceOf(\Stripe\TaxId::class, $result);
}
- public function testUpdateConfiguration2()
+ public function testCustomersTaxIdsPost()
{
$this->expectsRequest(
'post',
- '/v1/billing_portal/configurations/bpc_xxxxxxxxxxxxx'
+ '/v1/customers/cus_xxxxxxxxxxxxx/tax_ids'
);
- $result = $this->client->billingPortal->configurations->update(
- 'bpc_xxxxxxxxxxxxx',
+ $result = $this->client->customers->createTaxId(
+ 'cus_xxxxxxxxxxxxx',
[
- 'business_profile' => [
- 'privacy_policy_url' => 'https://example.com/privacy',
- 'terms_of_service_url' => 'https://example.com/terms',
- ],
+ 'type' => 'eu_vat',
+ 'value' => 'DE123456789',
]
);
- static::assertInstanceOf(\Stripe\BillingPortal\Configuration::class, $result);
+ static::assertInstanceOf(\Stripe\TaxId::class, $result);
}
- public function testCreateSession3()
+ public function testDisputesClosePost()
{
- $this->expectsRequest('post', '/v1/billing_portal/sessions');
- $result = $this->client->billingPortal->sessions->create([
- 'customer' => 'cus_xxxxxxxxxxxxx',
- 'return_url' => 'https://example.com/account',
- ]);
- static::assertInstanceOf(\Stripe\BillingPortal\Session::class, $result);
+ $this->expectsRequest('post', '/v1/disputes/dp_xxxxxxxxxxxxx/close');
+ $result = $this->client->disputes->close('dp_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\Dispute::class, $result);
}
- public function testListCharge()
+ public function testDisputesGet()
{
- $this->expectsRequest('get', '/v1/charges');
- $result = $this->client->charges->all(['limit' => 3]);
+ $this->expectsRequest('get', '/v1/disputes');
+ $result = $this->client->disputes->all(['limit' => 3]);
static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Charge::class, $result->data[0]);
+ static::assertInstanceOf(\Stripe\Dispute::class, $result->data[0]);
}
- public function testCreateCharge()
+ public function testDisputesGet2()
{
- $this->expectsRequest('post', '/v1/charges');
- $result = $this->client->charges->create([
- 'amount' => 2000,
- 'currency' => 'usd',
- 'source' => 'tok_xxxx',
- 'description' => 'My First Test Charge (created for API docs at https://www.stripe.com/docs/api)',
- ]);
- static::assertInstanceOf(\Stripe\Charge::class, $result);
+ $this->expectsRequest('get', '/v1/disputes/dp_xxxxxxxxxxxxx');
+ $result = $this->client->disputes->retrieve('dp_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\Dispute::class, $result);
}
- public function testRetrieveCharge()
+ public function testDisputesPost()
{
- $this->expectsRequest('get', '/v1/charges/ch_xxxxxxxxxxxxx');
- $result = $this->client->charges->retrieve('ch_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\Charge::class, $result);
+ $this->expectsRequest('post', '/v1/disputes/dp_xxxxxxxxxxxxx');
+ $result = $this->client->disputes->update(
+ 'dp_xxxxxxxxxxxxx',
+ ['metadata' => ['order_id' => '6735']]
+ );
+ static::assertInstanceOf(\Stripe\Dispute::class, $result);
}
- public function testUpdateCharge()
+ public function testEventsGet()
{
- $this->expectsRequest('post', '/v1/charges/ch_xxxxxxxxxxxxx');
- $result = $this->client->charges->update(
- 'ch_xxxxxxxxxxxxx',
- ['metadata' => ['order_id' => '6735']]
- );
- static::assertInstanceOf(\Stripe\Charge::class, $result);
+ $this->expectsRequest('get', '/v1/events');
+ $result = $this->client->events->all(['limit' => 3]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\Event::class, $result->data[0]);
}
- public function testCaptureCharge()
+ public function testEventsGet2()
{
- $this->expectsRequest('post', '/v1/charges/ch_xxxxxxxxxxxxx/capture');
- $result = $this->client->charges->capture('ch_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\Charge::class, $result);
+ $this->expectsRequest('get', '/v1/events/evt_xxxxxxxxxxxxx');
+ $result = $this->client->events->retrieve('evt_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\Event::class, $result);
}
- public function testSearchCharge()
+ public function testFileLinksGet()
{
- $this->expectsRequest('get', '/v1/charges/search');
- $result = $this->client->charges->search([
- 'query' => 'amount>999 AND metadata[\'order_id\']:\'6735\'',
+ $this->expectsRequest('get', '/v1/file_links');
+ $result = $this->client->fileLinks->all(['limit' => 3]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\FileLink::class, $result->data[0]);
+ }
+
+ public function testFileLinksGet2()
+ {
+ $this->expectsRequest('get', '/v1/file_links/link_xxxxxxxxxxxxx');
+ $result = $this->client->fileLinks->retrieve('link_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\FileLink::class, $result);
+ }
+
+ public function testFileLinksPost()
+ {
+ $this->expectsRequest('post', '/v1/file_links');
+ $result = $this->client->fileLinks->create([
+ 'file' => 'file_xxxxxxxxxxxxx',
]);
- static::assertInstanceOf(\Stripe\SearchResult::class, $result);
- static::assertInstanceOf(\Stripe\Charge::class, $result->data[0]);
+ static::assertInstanceOf(\Stripe\FileLink::class, $result);
}
- public function testListSession()
+ public function testFileLinksPost2()
{
- $this->expectsRequest('get', '/v1/checkout/sessions');
- $result = $this->client->checkout->sessions->all(['limit' => 3]);
+ $this->expectsRequest('post', '/v1/file_links/link_xxxxxxxxxxxxx');
+ $result = $this->client->fileLinks->update(
+ 'link_xxxxxxxxxxxxx',
+ ['metadata' => ['order_id' => '6735']]
+ );
+ static::assertInstanceOf(\Stripe\FileLink::class, $result);
+ }
+
+ public function testFilesGet()
+ {
+ $this->expectsRequest('get', '/v1/files');
+ $result = $this->client->files->all(['limit' => 3]);
static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Checkout\Session::class, $result->data[0]);
+ static::assertInstanceOf(\Stripe\File::class, $result->data[0]);
}
- public function testCreateSession4()
+ public function testFilesGet2()
{
- $this->expectsRequest('post', '/v1/checkout/sessions');
- $result = $this->client->checkout->sessions->create([
- 'success_url' => 'https://example.com/success',
- 'line_items' => [
- [
- 'price' => 'price_xxxxxxxxxxxxx',
- 'quantity' => 2,
- ],
- ],
- 'mode' => 'payment',
- ]);
- static::assertInstanceOf(\Stripe\Checkout\Session::class, $result);
+ $this->expectsRequest('get', '/v1/files/file_xxxxxxxxxxxxx');
+ $result = $this->client->files->retrieve('file_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\File::class, $result);
}
- public function testRetrieveSession2()
+ public function testFinancialConnectionsAccountsDisconnectPost()
{
$this->expectsRequest(
- 'get',
- '/v1/checkout/sessions/cs_test_xxxxxxxxxxxxx'
+ 'post',
+ '/v1/financial_connections/accounts/fca_xyz/disconnect'
);
- $result = $this->client->checkout->sessions->retrieve(
- 'cs_test_xxxxxxxxxxxxx',
+ $result = $this->client->financialConnections->accounts->disconnect(
+ 'fca_xyz',
[]
);
- static::assertInstanceOf(\Stripe\Checkout\Session::class, $result);
+ static::assertInstanceOf(\Stripe\FinancialConnections\Account::class, $result);
}
- public function testExpireSession2()
+ public function testFinancialConnectionsAccountsDisconnectPost2()
{
$this->expectsRequest(
'post',
- '/v1/checkout/sessions/cs_test_xxxxxxxxxxxxx/expire'
+ '/v1/financial_connections/accounts/fca_xxxxxxxxxxxxx/disconnect'
);
- $result = $this->client->checkout->sessions->expire(
- 'cs_test_xxxxxxxxxxxxx',
+ $result = $this->client->financialConnections->accounts->disconnect(
+ 'fca_xxxxxxxxxxxxx',
[]
);
- static::assertInstanceOf(\Stripe\Checkout\Session::class, $result);
+ static::assertInstanceOf(\Stripe\FinancialConnections\Account::class, $result);
}
- public function testListCountrySpec()
+ public function testFinancialConnectionsAccountsGet()
{
- $this->expectsRequest('get', '/v1/country_specs');
- $result = $this->client->countrySpecs->all(['limit' => 3]);
+ $this->expectsRequest('get', '/v1/financial_connections/accounts');
+ $result = $this->client->financialConnections->accounts->all([]);
static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\CountrySpec::class, $result->data[0]);
+ static::assertInstanceOf(\Stripe\FinancialConnections\Account::class, $result->data[0]);
}
- public function testRetrieveCountrySpec()
+ public function testFinancialConnectionsAccountsGet2()
{
- $this->expectsRequest('get', '/v1/country_specs/US');
- $result = $this->client->countrySpecs->retrieve('US', []);
- static::assertInstanceOf(\Stripe\CountrySpec::class, $result);
+ $this->expectsRequest(
+ 'get',
+ '/v1/financial_connections/accounts/fca_xyz'
+ );
+ $result = $this->client->financialConnections->accounts->retrieve(
+ 'fca_xyz',
+ []
+ );
+ static::assertInstanceOf(\Stripe\FinancialConnections\Account::class, $result);
}
- public function testListCoupon()
+ public function testFinancialConnectionsAccountsGet3()
{
- $this->expectsRequest('get', '/v1/coupons');
- $result = $this->client->coupons->all(['limit' => 3]);
+ $this->expectsRequest('get', '/v1/financial_connections/accounts');
+ $result = $this->client->financialConnections->accounts->all([
+ 'account_holder' => ['customer' => 'cus_xxxxxxxxxxxxx'],
+ ]);
static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Coupon::class, $result->data[0]);
+ static::assertInstanceOf(\Stripe\FinancialConnections\Account::class, $result->data[0]);
}
- public function testCreateCoupon()
+ public function testFinancialConnectionsAccountsGet4()
{
- $this->expectsRequest('post', '/v1/coupons');
- $result = $this->client->coupons->create([
- 'percent_off' => 25.5,
- 'duration' => 'repeating',
- 'duration_in_months' => 3,
- ]);
- static::assertInstanceOf(\Stripe\Coupon::class, $result);
+ $this->expectsRequest(
+ 'get',
+ '/v1/financial_connections/accounts/fca_xxxxxxxxxxxxx'
+ );
+ $result = $this->client->financialConnections->accounts->retrieve(
+ 'fca_xxxxxxxxxxxxx',
+ []
+ );
+ static::assertInstanceOf(\Stripe\FinancialConnections\Account::class, $result);
}
- public function testDeleteCoupon()
+ public function testFinancialConnectionsAccountsOwnersGet()
{
- $this->expectsRequest('delete', '/v1/coupons/Z4OV52SU');
- $result = $this->client->coupons->delete('Z4OV52SU', []);
- static::assertInstanceOf(\Stripe\Coupon::class, $result);
+ $this->expectsRequest(
+ 'get',
+ '/v1/financial_connections/accounts/fca_xyz/owners'
+ );
+ $result = $this->client->financialConnections->accounts->allOwners(
+ 'fca_xyz',
+ ['ownership' => 'fcaowns_xyz']
+ );
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\FinancialConnections\AccountOwner::class, $result->data[0]);
}
- public function testRetrieveCoupon()
+ public function testFinancialConnectionsAccountsOwnersGet2()
{
- $this->expectsRequest('get', '/v1/coupons/Z4OV52SU');
- $result = $this->client->coupons->retrieve('Z4OV52SU', []);
- static::assertInstanceOf(\Stripe\Coupon::class, $result);
+ $this->expectsRequest(
+ 'get',
+ '/v1/financial_connections/accounts/fca_xxxxxxxxxxxxx/owners'
+ );
+ $result = $this->client->financialConnections->accounts->allOwners(
+ 'fca_xxxxxxxxxxxxx',
+ [
+ 'limit' => 3,
+ 'ownership' => 'fcaowns_xxxxxxxxxxxxx',
+ ]
+ );
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\FinancialConnections\AccountOwner::class, $result->data[0]);
}
- public function testUpdateCoupon()
+ public function testFinancialConnectionsAccountsRefreshPost()
{
- $this->expectsRequest('post', '/v1/coupons/Z4OV52SU');
- $result = $this->client->coupons->update(
- 'Z4OV52SU',
- ['metadata' => ['order_id' => '6735']]
+ $this->expectsRequest(
+ 'post',
+ '/v1/financial_connections/accounts/fca_xyz/refresh'
);
- static::assertInstanceOf(\Stripe\Coupon::class, $result);
+ $result = $this->client->financialConnections->accounts->refresh(
+ 'fca_xyz',
+ ['features' => ['balance']]
+ );
+ static::assertInstanceOf(\Stripe\FinancialConnections\Account::class, $result);
}
- public function testListCreditNote()
+ public function testFinancialConnectionsSessionsGet()
{
- $this->expectsRequest('get', '/v1/credit_notes');
- $result = $this->client->creditNotes->all(['limit' => 3]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\CreditNote::class, $result->data[0]);
- }
-
- public function testCreateCreditNote()
- {
- $this->expectsRequest('post', '/v1/credit_notes');
- $result = $this->client->creditNotes->create([
- 'invoice' => 'in_xxxxxxxxxxxxx',
- 'lines' => [
- [
- 'type' => 'invoice_line_item',
- 'invoice_line_item' => 'il_xxxxxxxxxxxxx',
- 'quantity' => 1,
- ],
- ],
- ]);
- static::assertInstanceOf(\Stripe\CreditNote::class, $result);
- }
-
- public function testVoidCreditNoteCreditNote()
- {
- $this->expectsRequest('post', '/v1/credit_notes/cn_xxxxxxxxxxxxx/void');
- $result = $this->client->creditNotes->voidCreditNote(
- 'cn_xxxxxxxxxxxxx',
+ $this->expectsRequest(
+ 'get',
+ '/v1/financial_connections/sessions/fcsess_xyz'
+ );
+ $result = $this->client->financialConnections->sessions->retrieve(
+ 'fcsess_xyz',
[]
);
- static::assertInstanceOf(\Stripe\CreditNote::class, $result);
+ static::assertInstanceOf(\Stripe\FinancialConnections\Session::class, $result);
}
- public function testListCreditNoteLineItem()
+ public function testFinancialConnectionsSessionsGet2()
{
- $this->expectsRequest('get', '/v1/credit_notes/cn_xxxxxxxxxxxxx/lines');
- $result = $this->client->creditNotes->allLines(
- 'cn_xxxxxxxxxxxxx',
- ['limit' => 3]
+ $this->expectsRequest(
+ 'get',
+ '/v1/financial_connections/sessions/fcsess_xxxxxxxxxxxxx'
);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\CreditNoteLineItem::class, $result->data[0]);
+ $result = $this->client->financialConnections->sessions->retrieve(
+ 'fcsess_xxxxxxxxxxxxx',
+ []
+ );
+ static::assertInstanceOf(\Stripe\FinancialConnections\Session::class, $result);
}
- public function testPreviewCreditNote()
+ public function testFinancialConnectionsSessionsPost()
{
- $this->expectsRequest('get', '/v1/credit_notes/preview');
- $result = $this->client->creditNotes->preview([
- 'invoice' => 'in_xxxxxxxxxxxxx',
- 'lines' => [
- [
- 'type' => 'invoice_line_item',
- 'invoice_line_item' => 'il_xxxxxxxxxxxxx',
- 'quantity' => 1,
- ],
+ $this->expectsRequest('post', '/v1/financial_connections/sessions');
+ $result = $this->client->financialConnections->sessions->create([
+ 'account_holder' => [
+ 'type' => 'customer',
+ 'customer' => 'cus_123',
],
+ 'permissions' => ['balances'],
]);
- static::assertInstanceOf(\Stripe\CreditNote::class, $result);
- }
-
- public function testListCustomer()
- {
- $this->expectsRequest('get', '/v1/customers');
- $result = $this->client->customers->all(['limit' => 3]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Customer::class, $result->data[0]);
- }
-
- public function testListCustomer2()
- {
- $this->expectsRequest('get', '/v1/customers');
- $result = $this->client->customers->all(['limit' => 3]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Customer::class, $result->data[0]);
+ static::assertInstanceOf(\Stripe\FinancialConnections\Session::class, $result);
}
- public function testCreateCustomer()
+ public function testFinancialConnectionsSessionsPost2()
{
- $this->expectsRequest('post', '/v1/customers');
- $result = $this->client->customers->create([
- 'description' => 'My First Test Customer (created for API docs at https://www.stripe.com/docs/api)',
+ $this->expectsRequest('post', '/v1/financial_connections/sessions');
+ $result = $this->client->financialConnections->sessions->create([
+ 'account_holder' => [
+ 'type' => 'customer',
+ 'customer' => 'cus_xxxxxxxxxxxxx',
+ ],
+ 'permissions' => ['payment_method', 'balances'],
+ 'filters' => ['countries' => ['US']],
]);
- static::assertInstanceOf(\Stripe\Customer::class, $result);
- }
-
- public function testDeleteCustomer()
- {
- $this->expectsRequest('delete', '/v1/customers/cus_xxxxxxxxxxxxx');
- $result = $this->client->customers->delete('cus_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\Customer::class, $result);
- }
-
- public function testRetrieveCustomer()
- {
- $this->expectsRequest('get', '/v1/customers/cus_xxxxxxxxxxxxx');
- $result = $this->client->customers->retrieve('cus_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\Customer::class, $result);
+ static::assertInstanceOf(\Stripe\FinancialConnections\Session::class, $result);
}
- public function testUpdateCustomer()
+ public function testIdentityVerificationReportsGet()
{
- $this->expectsRequest('post', '/v1/customers/cus_xxxxxxxxxxxxx');
- $result = $this->client->customers->update(
- 'cus_xxxxxxxxxxxxx',
- ['metadata' => ['order_id' => '6735']]
- );
- static::assertInstanceOf(\Stripe\Customer::class, $result);
+ $this->expectsRequest('get', '/v1/identity/verification_reports');
+ $result = $this->client->identity->verificationReports->all([
+ 'limit' => 3,
+ ]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\Identity\VerificationReport::class, $result->data[0]);
}
- public function testListCustomerBalanceTransaction()
+ public function testIdentityVerificationReportsGet2()
{
$this->expectsRequest(
'get',
- '/v1/customers/cus_xxxxxxxxxxxxx/balance_transactions'
+ '/v1/identity/verification_reports/vr_xxxxxxxxxxxxx'
);
- $result = $this->client->customers->allBalanceTransactions(
- 'cus_xxxxxxxxxxxxx',
- ['limit' => 3]
+ $result = $this->client->identity->verificationReports->retrieve(
+ 'vr_xxxxxxxxxxxxx',
+ []
);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\CustomerBalanceTransaction::class, $result->data[0]);
+ static::assertInstanceOf(\Stripe\Identity\VerificationReport::class, $result);
}
- public function testCreateCustomerBalanceTransaction()
+ public function testIdentityVerificationSessionsCancelPost()
{
$this->expectsRequest(
'post',
- '/v1/customers/cus_xxxxxxxxxxxxx/balance_transactions'
+ '/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx/cancel'
);
- $result = $this->client->customers->createBalanceTransaction(
- 'cus_xxxxxxxxxxxxx',
- [
- 'amount' => -500,
- 'currency' => 'usd',
- ]
+ $result = $this->client->identity->verificationSessions->cancel(
+ 'vs_xxxxxxxxxxxxx',
+ []
);
- static::assertInstanceOf(\Stripe\CustomerBalanceTransaction::class, $result);
+ static::assertInstanceOf(\Stripe\Identity\VerificationSession::class, $result);
}
- public function testRetrieveCustomerBalanceTransaction()
+ public function testIdentityVerificationSessionsGet()
{
- $this->expectsRequest(
- 'get',
- '/v1/customers/cus_xxxxxxxxxxxxx/balance_transactions/cbtxn_xxxxxxxxxxxxx'
- );
- $result = $this->client->customers->retrieveBalanceTransaction(
- 'cus_xxxxxxxxxxxxx',
- 'cbtxn_xxxxxxxxxxxxx',
- []
- );
- static::assertInstanceOf(\Stripe\CustomerBalanceTransaction::class, $result);
+ $this->expectsRequest('get', '/v1/identity/verification_sessions');
+ $result = $this->client->identity->verificationSessions->all([
+ 'limit' => 3,
+ ]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\Identity\VerificationSession::class, $result->data[0]);
}
- public function testUpdateCustomerBalanceTransaction()
+ public function testIdentityVerificationSessionsGet2()
{
$this->expectsRequest(
- 'post',
- '/v1/customers/cus_xxxxxxxxxxxxx/balance_transactions/cbtxn_xxxxxxxxxxxxx'
+ 'get',
+ '/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx'
);
- $result = $this->client->customers->updateBalanceTransaction(
- 'cus_xxxxxxxxxxxxx',
- 'cbtxn_xxxxxxxxxxxxx',
- ['metadata' => ['order_id' => '6735']]
+ $result = $this->client->identity->verificationSessions->retrieve(
+ 'vs_xxxxxxxxxxxxx',
+ []
);
- static::assertInstanceOf(\Stripe\CustomerBalanceTransaction::class, $result);
+ static::assertInstanceOf(\Stripe\Identity\VerificationSession::class, $result);
}
- public function testListTaxId()
+ public function testIdentityVerificationSessionsPost()
{
- $this->expectsRequest('get', '/v1/customers/cus_xxxxxxxxxxxxx/tax_ids');
- $result = $this->client->customers->allTaxIds(
- 'cus_xxxxxxxxxxxxx',
- ['limit' => 3]
- );
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\TaxId::class, $result->data[0]);
+ $this->expectsRequest('post', '/v1/identity/verification_sessions');
+ $result = $this->client->identity->verificationSessions->create([
+ 'type' => 'document',
+ ]);
+ static::assertInstanceOf(\Stripe\Identity\VerificationSession::class, $result);
}
- public function testCreateTaxId()
+ public function testIdentityVerificationSessionsPost2()
{
$this->expectsRequest(
'post',
- '/v1/customers/cus_xxxxxxxxxxxxx/tax_ids'
- );
- $result = $this->client->customers->createTaxId(
- 'cus_xxxxxxxxxxxxx',
- [
- 'type' => 'eu_vat',
- 'value' => 'DE123456789',
- ]
- );
- static::assertInstanceOf(\Stripe\TaxId::class, $result);
- }
-
- public function testDeleteTaxId()
- {
- $this->expectsRequest(
- 'delete',
- '/v1/customers/cus_xxxxxxxxxxxxx/tax_ids/txi_xxxxxxxxxxxxx'
+ '/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx'
);
- $result = $this->client->customers->deleteTaxId(
- 'cus_xxxxxxxxxxxxx',
- 'txi_xxxxxxxxxxxxx',
- []
+ $result = $this->client->identity->verificationSessions->update(
+ 'vs_xxxxxxxxxxxxx',
+ ['type' => 'id_number']
);
- static::assertInstanceOf(\Stripe\TaxId::class, $result);
+ static::assertInstanceOf(\Stripe\Identity\VerificationSession::class, $result);
}
- public function testRetrieveTaxId()
+ public function testIdentityVerificationSessionsRedactPost()
{
$this->expectsRequest(
- 'get',
- '/v1/customers/cus_xxxxxxxxxxxxx/tax_ids/txi_xxxxxxxxxxxxx'
+ 'post',
+ '/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx/redact'
);
- $result = $this->client->customers->retrieveTaxId(
- 'cus_xxxxxxxxxxxxx',
- 'txi_xxxxxxxxxxxxx',
+ $result = $this->client->identity->verificationSessions->redact(
+ 'vs_xxxxxxxxxxxxx',
[]
);
- static::assertInstanceOf(\Stripe\TaxId::class, $result);
+ static::assertInstanceOf(\Stripe\Identity\VerificationSession::class, $result);
}
- public function testSearchCustomer()
+ public function testInvoiceitemsDelete()
{
- $this->expectsRequest('get', '/v1/customers/search');
- $result = $this->client->customers->search([
- 'query' => 'name:\'fakename\' AND metadata[\'foo\']:\'bar\'',
- ]);
- static::assertInstanceOf(\Stripe\SearchResult::class, $result);
- static::assertInstanceOf(\Stripe\Customer::class, $result->data[0]);
+ $this->expectsRequest('delete', '/v1/invoiceitems/ii_xxxxxxxxxxxxx');
+ $result = $this->client->invoiceItems->delete('ii_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\InvoiceItem::class, $result);
}
- public function testSearchCustomer2()
+ public function testInvoiceitemsGet()
{
- $this->expectsRequest('get', '/v1/customers/search');
- $result = $this->client->customers->search([
- 'query' => 'name:\'fakename\' AND metadata[\'foo\']:\'bar\'',
- ]);
- static::assertInstanceOf(\Stripe\SearchResult::class, $result);
- static::assertInstanceOf(\Stripe\Customer::class, $result->data[0]);
+ $this->expectsRequest('get', '/v1/invoiceitems');
+ $result = $this->client->invoiceItems->all(['limit' => 3]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\InvoiceItem::class, $result->data[0]);
}
- public function testListDispute()
+ public function testInvoiceitemsGet2()
{
- $this->expectsRequest('get', '/v1/disputes');
- $result = $this->client->disputes->all(['limit' => 3]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Dispute::class, $result->data[0]);
+ $this->expectsRequest('get', '/v1/invoiceitems/ii_xxxxxxxxxxxxx');
+ $result = $this->client->invoiceItems->retrieve('ii_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\InvoiceItem::class, $result);
}
- public function testRetrieveDispute()
+ public function testInvoiceitemsPost()
{
- $this->expectsRequest('get', '/v1/disputes/dp_xxxxxxxxxxxxx');
- $result = $this->client->disputes->retrieve('dp_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\Dispute::class, $result);
+ $this->expectsRequest('post', '/v1/invoiceitems');
+ $result = $this->client->invoiceItems->create([
+ 'customer' => 'cus_xxxxxxxxxxxxx',
+ 'price' => 'price_xxxxxxxxxxxxx',
+ ]);
+ static::assertInstanceOf(\Stripe\InvoiceItem::class, $result);
}
- public function testUpdateDispute()
+ public function testInvoiceitemsPost2()
{
- $this->expectsRequest('post', '/v1/disputes/dp_xxxxxxxxxxxxx');
- $result = $this->client->disputes->update(
- 'dp_xxxxxxxxxxxxx',
+ $this->expectsRequest('post', '/v1/invoiceitems/ii_xxxxxxxxxxxxx');
+ $result = $this->client->invoiceItems->update(
+ 'ii_xxxxxxxxxxxxx',
['metadata' => ['order_id' => '6735']]
);
- static::assertInstanceOf(\Stripe\Dispute::class, $result);
+ static::assertInstanceOf(\Stripe\InvoiceItem::class, $result);
}
- public function testCloseDispute()
+ public function testInvoicesDelete()
{
- $this->expectsRequest('post', '/v1/disputes/dp_xxxxxxxxxxxxx/close');
- $result = $this->client->disputes->close('dp_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\Dispute::class, $result);
+ $this->expectsRequest('delete', '/v1/invoices/in_xxxxxxxxxxxxx');
+ $result = $this->client->invoices->delete('in_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\Invoice::class, $result);
}
- public function testListEvent()
+ public function testInvoicesFinalizePost()
{
- $this->expectsRequest('get', '/v1/events');
- $result = $this->client->events->all(['limit' => 3]);
+ $this->expectsRequest('post', '/v1/invoices/in_xxxxxxxxxxxxx/finalize');
+ $result = $this->client->invoices->finalizeInvoice(
+ 'in_xxxxxxxxxxxxx',
+ []
+ );
+ static::assertInstanceOf(\Stripe\Invoice::class, $result);
+ }
+
+ public function testInvoicesGet()
+ {
+ $this->expectsRequest('get', '/v1/invoices');
+ $result = $this->client->invoices->all(['limit' => 3]);
static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Event::class, $result->data[0]);
+ static::assertInstanceOf(\Stripe\Invoice::class, $result->data[0]);
}
- public function testRetrieveEvent()
+ public function testInvoicesGet2()
{
- $this->expectsRequest('get', '/v1/events/evt_xxxxxxxxxxxxx');
- $result = $this->client->events->retrieve('evt_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\Event::class, $result);
+ $this->expectsRequest('get', '/v1/invoices/in_xxxxxxxxxxxxx');
+ $result = $this->client->invoices->retrieve('in_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\Invoice::class, $result);
}
- public function testListFileLink()
+ public function testInvoicesGet3()
{
- $this->expectsRequest('get', '/v1/file_links');
- $result = $this->client->fileLinks->all(['limit' => 3]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\FileLink::class, $result->data[0]);
+ $this->expectsRequest('get', '/v1/invoices/in_xxxxxxxxxxxxx');
+ $result = $this->client->invoices->retrieve(
+ 'in_xxxxxxxxxxxxx',
+ ['expand' => ['customer']]
+ );
+ static::assertInstanceOf(\Stripe\Invoice::class, $result);
}
- public function testCreateFileLink()
+ public function testInvoicesMarkUncollectiblePost()
{
- $this->expectsRequest('post', '/v1/file_links');
- $result = $this->client->fileLinks->create([
- 'file' => 'file_xxxxxxxxxxxxx',
- ]);
- static::assertInstanceOf(\Stripe\FileLink::class, $result);
+ $this->expectsRequest(
+ 'post',
+ '/v1/invoices/in_xxxxxxxxxxxxx/mark_uncollectible'
+ );
+ $result = $this->client->invoices->markUncollectible(
+ 'in_xxxxxxxxxxxxx',
+ []
+ );
+ static::assertInstanceOf(\Stripe\Invoice::class, $result);
}
- public function testRetrieveFileLink()
+ public function testInvoicesPayPost()
{
- $this->expectsRequest('get', '/v1/file_links/link_xxxxxxxxxxxxx');
- $result = $this->client->fileLinks->retrieve('link_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\FileLink::class, $result);
+ $this->expectsRequest('post', '/v1/invoices/in_xxxxxxxxxxxxx/pay');
+ $result = $this->client->invoices->pay('in_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\Invoice::class, $result);
}
- public function testUpdateFileLink()
+ public function testInvoicesPost()
{
- $this->expectsRequest('post', '/v1/file_links/link_xxxxxxxxxxxxx');
- $result = $this->client->fileLinks->update(
- 'link_xxxxxxxxxxxxx',
+ $this->expectsRequest('post', '/v1/invoices');
+ $result = $this->client->invoices->create([
+ 'customer' => 'cus_xxxxxxxxxxxxx',
+ ]);
+ static::assertInstanceOf(\Stripe\Invoice::class, $result);
+ }
+
+ public function testInvoicesPost2()
+ {
+ $this->expectsRequest('post', '/v1/invoices/in_xxxxxxxxxxxxx');
+ $result = $this->client->invoices->update(
+ 'in_xxxxxxxxxxxxx',
['metadata' => ['order_id' => '6735']]
);
- static::assertInstanceOf(\Stripe\FileLink::class, $result);
+ static::assertInstanceOf(\Stripe\Invoice::class, $result);
}
- public function testListFile()
+ public function testInvoicesSearchGet()
{
- $this->expectsRequest('get', '/v1/files');
- $result = $this->client->files->all(['limit' => 3]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\File::class, $result->data[0]);
+ $this->expectsRequest('get', '/v1/invoices/search');
+ $result = $this->client->invoices->search([
+ 'query' => 'total>999 AND metadata[\'order_id\']:\'6735\'',
+ ]);
+ static::assertInstanceOf(\Stripe\SearchResult::class, $result);
+ static::assertInstanceOf(\Stripe\Invoice::class, $result->data[0]);
}
- public function testRetrieveFile()
+ public function testInvoicesSendPost()
{
- $this->expectsRequest('get', '/v1/files/file_xxxxxxxxxxxxx');
- $result = $this->client->files->retrieve('file_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\File::class, $result);
+ $this->expectsRequest('post', '/v1/invoices/in_xxxxxxxxxxxxx/send');
+ $result = $this->client->invoices->sendInvoice('in_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\Invoice::class, $result);
}
- public function testListAccount3()
+ public function testInvoicesUpcomingGet()
{
- $this->expectsRequest('get', '/v1/financial_connections/accounts');
- $result = $this->client->financialConnections->accounts->all([
- 'account_holder' => ['customer' => 'cus_xxxxxxxxxxxxx'],
+ $this->expectsRequest('get', '/v1/invoices/upcoming');
+ $result = $this->client->invoices->upcoming([
+ 'customer' => 'cus_9utnxg47pWjV1e',
]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\FinancialConnections\Account::class, $result->data[0]);
+ static::assertInstanceOf(\Stripe\Invoice::class, $result);
}
- public function testRetrieveAccount3()
+ public function testInvoicesVoidPost()
{
- $this->expectsRequest(
- 'get',
- '/v1/financial_connections/accounts/fca_xxxxxxxxxxxxx'
- );
- $result = $this->client->financialConnections->accounts->retrieve(
- 'fca_xxxxxxxxxxxxx',
- []
- );
- static::assertInstanceOf(\Stripe\FinancialConnections\Account::class, $result);
+ $this->expectsRequest('post', '/v1/invoices/in_xxxxxxxxxxxxx/void');
+ $result = $this->client->invoices->voidInvoice('in_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\Invoice::class, $result);
}
- public function testDisconnectAccount2()
+ public function testIssuingAuthorizationsApprovePost()
{
$this->expectsRequest(
'post',
- '/v1/financial_connections/accounts/fca_xxxxxxxxxxxxx/disconnect'
+ '/v1/issuing/authorizations/iauth_xxxxxxxxxxxxx/approve'
);
- $result = $this->client->financialConnections->accounts->disconnect(
- 'fca_xxxxxxxxxxxxx',
+ $result = $this->client->issuing->authorizations->approve(
+ 'iauth_xxxxxxxxxxxxx',
[]
);
- static::assertInstanceOf(\Stripe\FinancialConnections\Account::class, $result);
+ static::assertInstanceOf(\Stripe\Issuing\Authorization::class, $result);
}
- public function testListOwnersAccount2()
+ public function testIssuingAuthorizationsDeclinePost()
{
$this->expectsRequest(
- 'get',
- '/v1/financial_connections/accounts/fca_xxxxxxxxxxxxx/owners'
+ 'post',
+ '/v1/issuing/authorizations/iauth_xxxxxxxxxxxxx/decline'
);
- $result = $this->client->financialConnections->accounts->allOwners(
- 'fca_xxxxxxxxxxxxx',
- [
- 'limit' => 3,
- 'ownership' => 'fcaowns_xxxxxxxxxxxxx',
- ]
+ $result = $this->client->issuing->authorizations->decline(
+ 'iauth_xxxxxxxxxxxxx',
+ []
);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\FinancialConnections\AccountOwner::class, $result->data[0]);
+ static::assertInstanceOf(\Stripe\Issuing\Authorization::class, $result);
}
- public function testCreateSession5()
+ public function testIssuingAuthorizationsGet()
{
- $this->expectsRequest('post', '/v1/financial_connections/sessions');
- $result = $this->client->financialConnections->sessions->create([
- 'account_holder' => [
- 'type' => 'customer',
- 'customer' => 'cus_xxxxxxxxxxxxx',
- ],
- 'permissions' => ['payment_method', 'balances'],
- 'filters' => ['countries' => ['US']],
- ]);
- static::assertInstanceOf(\Stripe\FinancialConnections\Session::class, $result);
+ $this->expectsRequest('get', '/v1/issuing/authorizations');
+ $result = $this->client->issuing->authorizations->all(['limit' => 3]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\Issuing\Authorization::class, $result->data[0]);
}
- public function testRetrieveSession3()
+ public function testIssuingAuthorizationsGet2()
{
$this->expectsRequest(
'get',
- '/v1/financial_connections/sessions/fcsess_xxxxxxxxxxxxx'
+ '/v1/issuing/authorizations/iauth_xxxxxxxxxxxxx'
);
- $result = $this->client->financialConnections->sessions->retrieve(
- 'fcsess_xxxxxxxxxxxxx',
+ $result = $this->client->issuing->authorizations->retrieve(
+ 'iauth_xxxxxxxxxxxxx',
[]
);
- static::assertInstanceOf(\Stripe\FinancialConnections\Session::class, $result);
- }
-
- public function testListVerificationReport()
- {
- $this->expectsRequest('get', '/v1/identity/verification_reports');
- $result = $this->client->identity->verificationReports->all([
- 'limit' => 3,
- ]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Identity\VerificationReport::class, $result->data[0]);
+ static::assertInstanceOf(\Stripe\Issuing\Authorization::class, $result);
}
- public function testRetrieveVerificationReport()
+ public function testIssuingAuthorizationsPost()
{
$this->expectsRequest(
- 'get',
- '/v1/identity/verification_reports/vr_xxxxxxxxxxxxx'
+ 'post',
+ '/v1/issuing/authorizations/iauth_xxxxxxxxxxxxx'
);
- $result = $this->client->identity->verificationReports->retrieve(
- 'vr_xxxxxxxxxxxxx',
- []
+ $result = $this->client->issuing->authorizations->update(
+ 'iauth_xxxxxxxxxxxxx',
+ ['metadata' => ['order_id' => '6735']]
);
- static::assertInstanceOf(\Stripe\Identity\VerificationReport::class, $result);
+ static::assertInstanceOf(\Stripe\Issuing\Authorization::class, $result);
}
- public function testListVerificationSession()
+ public function testIssuingCardholdersGet()
{
- $this->expectsRequest('get', '/v1/identity/verification_sessions');
- $result = $this->client->identity->verificationSessions->all([
- 'limit' => 3,
- ]);
+ $this->expectsRequest('get', '/v1/issuing/cardholders');
+ $result = $this->client->issuing->cardholders->all(['limit' => 3]);
static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Identity\VerificationSession::class, $result->data[0]);
- }
-
- public function testCreateVerificationSession()
- {
- $this->expectsRequest('post', '/v1/identity/verification_sessions');
- $result = $this->client->identity->verificationSessions->create([
- 'type' => 'document',
- ]);
- static::assertInstanceOf(\Stripe\Identity\VerificationSession::class, $result);
+ static::assertInstanceOf(\Stripe\Issuing\Cardholder::class, $result->data[0]);
}
- public function testRetrieveVerificationSession()
+ public function testIssuingCardholdersGet2()
{
$this->expectsRequest(
'get',
- '/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx'
+ '/v1/issuing/cardholders/ich_xxxxxxxxxxxxx'
);
- $result = $this->client->identity->verificationSessions->retrieve(
- 'vs_xxxxxxxxxxxxx',
+ $result = $this->client->issuing->cardholders->retrieve(
+ 'ich_xxxxxxxxxxxxx',
[]
);
- static::assertInstanceOf(\Stripe\Identity\VerificationSession::class, $result);
+ static::assertInstanceOf(\Stripe\Issuing\Cardholder::class, $result);
}
- public function testUpdateVerificationSession()
+ public function testIssuingCardholdersPost()
{
- $this->expectsRequest(
- 'post',
- '/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx'
- );
- $result = $this->client->identity->verificationSessions->update(
- 'vs_xxxxxxxxxxxxx',
- ['type' => 'id_number']
- );
- static::assertInstanceOf(\Stripe\Identity\VerificationSession::class, $result);
+ $this->expectsRequest('post', '/v1/issuing/cardholders');
+ $result = $this->client->issuing->cardholders->create([
+ 'type' => 'individual',
+ 'name' => 'Jenny Rosen',
+ 'email' => 'jenny.rosen@example.com',
+ 'phone_number' => '+18888675309',
+ 'billing' => [
+ 'address' => [
+ 'line1' => '1234 Main Street',
+ 'city' => 'San Francisco',
+ 'state' => 'CA',
+ 'country' => 'US',
+ 'postal_code' => '94111',
+ ],
+ ],
+ ]);
+ static::assertInstanceOf(\Stripe\Issuing\Cardholder::class, $result);
}
- public function testCancelVerificationSession()
+ public function testIssuingCardholdersPost2()
{
$this->expectsRequest(
'post',
- '/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx/cancel'
+ '/v1/issuing/cardholders/ich_xxxxxxxxxxxxx'
);
- $result = $this->client->identity->verificationSessions->cancel(
- 'vs_xxxxxxxxxxxxx',
- []
+ $result = $this->client->issuing->cardholders->update(
+ 'ich_xxxxxxxxxxxxx',
+ ['metadata' => ['order_id' => '6735']]
);
- static::assertInstanceOf(\Stripe\Identity\VerificationSession::class, $result);
+ static::assertInstanceOf(\Stripe\Issuing\Cardholder::class, $result);
}
- public function testRedactVerificationSession()
+ public function testIssuingCardsGet()
{
- $this->expectsRequest(
- 'post',
- '/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx/redact'
- );
- $result = $this->client->identity->verificationSessions->redact(
- 'vs_xxxxxxxxxxxxx',
+ $this->expectsRequest('get', '/v1/issuing/cards');
+ $result = $this->client->issuing->cards->all(['limit' => 3]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\Issuing\Card::class, $result->data[0]);
+ }
+
+ public function testIssuingCardsGet2()
+ {
+ $this->expectsRequest('get', '/v1/issuing/cards/ic_xxxxxxxxxxxxx');
+ $result = $this->client->issuing->cards->retrieve(
+ 'ic_xxxxxxxxxxxxx',
[]
);
- static::assertInstanceOf(\Stripe\Identity\VerificationSession::class, $result);
+ static::assertInstanceOf(\Stripe\Issuing\Card::class, $result);
}
- public function testListInvoiceItem()
+ public function testIssuingCardsPost()
{
- $this->expectsRequest('get', '/v1/invoiceitems');
- $result = $this->client->invoiceItems->all(['limit' => 3]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\InvoiceItem::class, $result->data[0]);
- }
-
- public function testCreateInvoiceItem()
- {
- $this->expectsRequest('post', '/v1/invoiceitems');
- $result = $this->client->invoiceItems->create([
- 'customer' => 'cus_xxxxxxxxxxxxx',
- 'price' => 'price_xxxxxxxxxxxxx',
+ $this->expectsRequest('post', '/v1/issuing/cards');
+ $result = $this->client->issuing->cards->create([
+ 'cardholder' => 'ich_xxxxxxxxxxxxx',
+ 'currency' => 'usd',
+ 'type' => 'virtual',
]);
- static::assertInstanceOf(\Stripe\InvoiceItem::class, $result);
- }
-
- public function testDeleteInvoiceItem()
- {
- $this->expectsRequest('delete', '/v1/invoiceitems/ii_xxxxxxxxxxxxx');
- $result = $this->client->invoiceItems->delete('ii_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\InvoiceItem::class, $result);
- }
-
- public function testRetrieveInvoiceItem()
- {
- $this->expectsRequest('get', '/v1/invoiceitems/ii_xxxxxxxxxxxxx');
- $result = $this->client->invoiceItems->retrieve('ii_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\InvoiceItem::class, $result);
+ static::assertInstanceOf(\Stripe\Issuing\Card::class, $result);
}
- public function testUpdateInvoiceItem()
+ public function testIssuingCardsPost2()
{
- $this->expectsRequest('post', '/v1/invoiceitems/ii_xxxxxxxxxxxxx');
- $result = $this->client->invoiceItems->update(
- 'ii_xxxxxxxxxxxxx',
+ $this->expectsRequest('post', '/v1/issuing/cards/ic_xxxxxxxxxxxxx');
+ $result = $this->client->issuing->cards->update(
+ 'ic_xxxxxxxxxxxxx',
['metadata' => ['order_id' => '6735']]
);
- static::assertInstanceOf(\Stripe\InvoiceItem::class, $result);
+ static::assertInstanceOf(\Stripe\Issuing\Card::class, $result);
}
- public function testListInvoice()
+ public function testIssuingDisputesGet()
{
- $this->expectsRequest('get', '/v1/invoices');
- $result = $this->client->invoices->all(['limit' => 3]);
+ $this->expectsRequest('get', '/v1/issuing/disputes');
+ $result = $this->client->issuing->disputes->all(['limit' => 3]);
static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Invoice::class, $result->data[0]);
- }
-
- public function testCreateInvoice()
- {
- $this->expectsRequest('post', '/v1/invoices');
- $result = $this->client->invoices->create([
- 'customer' => 'cus_xxxxxxxxxxxxx',
- ]);
- static::assertInstanceOf(\Stripe\Invoice::class, $result);
+ static::assertInstanceOf(\Stripe\Issuing\Dispute::class, $result->data[0]);
}
- public function testDeleteInvoice()
+ public function testIssuingDisputesGet2()
{
- $this->expectsRequest('delete', '/v1/invoices/in_xxxxxxxxxxxxx');
- $result = $this->client->invoices->delete('in_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\Invoice::class, $result);
+ $this->expectsRequest('get', '/v1/issuing/disputes/idp_xxxxxxxxxxxxx');
+ $result = $this->client->issuing->disputes->retrieve(
+ 'idp_xxxxxxxxxxxxx',
+ []
+ );
+ static::assertInstanceOf(\Stripe\Issuing\Dispute::class, $result);
}
- public function testRetrieveInvoice()
+ public function testIssuingDisputesPost()
{
- $this->expectsRequest('get', '/v1/invoices/in_xxxxxxxxxxxxx');
- $result = $this->client->invoices->retrieve('in_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\Invoice::class, $result);
+ $this->expectsRequest('post', '/v1/issuing/disputes');
+ $result = $this->client->issuing->disputes->create([
+ 'transaction' => 'ipi_xxxxxxxxxxxxx',
+ 'evidence' => [
+ 'reason' => 'fraudulent',
+ 'fraudulent' => ['explanation' => 'Purchase was unrecognized.'],
+ ],
+ ]);
+ static::assertInstanceOf(\Stripe\Issuing\Dispute::class, $result);
}
- public function testRetrieveInvoice2()
+ public function testIssuingDisputesSubmitPost()
{
- $this->expectsRequest('get', '/v1/invoices/in_xxxxxxxxxxxxx');
- $result = $this->client->invoices->retrieve(
- 'in_xxxxxxxxxxxxx',
- ['expand' => ['customer']]
+ $this->expectsRequest(
+ 'post',
+ '/v1/issuing/disputes/idp_xxxxxxxxxxxxx/submit'
);
- static::assertInstanceOf(\Stripe\Invoice::class, $result);
+ $result = $this->client->issuing->disputes->submit(
+ 'idp_xxxxxxxxxxxxx',
+ []
+ );
+ static::assertInstanceOf(\Stripe\Issuing\Dispute::class, $result);
}
- public function testUpdateInvoice()
+ public function testIssuingTransactionsGet()
{
- $this->expectsRequest('post', '/v1/invoices/in_xxxxxxxxxxxxx');
- $result = $this->client->invoices->update(
- 'in_xxxxxxxxxxxxx',
- ['metadata' => ['order_id' => '6735']]
- );
- static::assertInstanceOf(\Stripe\Invoice::class, $result);
+ $this->expectsRequest('get', '/v1/issuing/transactions');
+ $result = $this->client->issuing->transactions->all(['limit' => 3]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\Issuing\Transaction::class, $result->data[0]);
}
- public function testFinalizeInvoiceInvoice()
+ public function testIssuingTransactionsGet2()
{
- $this->expectsRequest('post', '/v1/invoices/in_xxxxxxxxxxxxx/finalize');
- $result = $this->client->invoices->finalizeInvoice(
- 'in_xxxxxxxxxxxxx',
+ $this->expectsRequest(
+ 'get',
+ '/v1/issuing/transactions/ipi_xxxxxxxxxxxxx'
+ );
+ $result = $this->client->issuing->transactions->retrieve(
+ 'ipi_xxxxxxxxxxxxx',
[]
);
- static::assertInstanceOf(\Stripe\Invoice::class, $result);
+ static::assertInstanceOf(\Stripe\Issuing\Transaction::class, $result);
}
- public function testMarkUncollectibleInvoice()
+ public function testIssuingTransactionsPost()
{
$this->expectsRequest(
'post',
- '/v1/invoices/in_xxxxxxxxxxxxx/mark_uncollectible'
+ '/v1/issuing/transactions/ipi_xxxxxxxxxxxxx'
);
- $result = $this->client->invoices->markUncollectible(
- 'in_xxxxxxxxxxxxx',
- []
+ $result = $this->client->issuing->transactions->update(
+ 'ipi_xxxxxxxxxxxxx',
+ ['metadata' => ['order_id' => '6735']]
);
- static::assertInstanceOf(\Stripe\Invoice::class, $result);
- }
-
- public function testPayInvoice()
- {
- $this->expectsRequest('post', '/v1/invoices/in_xxxxxxxxxxxxx/pay');
- $result = $this->client->invoices->pay('in_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\Invoice::class, $result);
- }
-
- public function testSendInvoiceInvoice()
- {
- $this->expectsRequest('post', '/v1/invoices/in_xxxxxxxxxxxxx/send');
- $result = $this->client->invoices->sendInvoice('in_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\Invoice::class, $result);
- }
-
- public function testVoidInvoiceInvoice()
- {
- $this->expectsRequest('post', '/v1/invoices/in_xxxxxxxxxxxxx/void');
- $result = $this->client->invoices->voidInvoice('in_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\Invoice::class, $result);
- }
-
- public function testSearchInvoice()
- {
- $this->expectsRequest('get', '/v1/invoices/search');
- $result = $this->client->invoices->search([
- 'query' => 'total>999 AND metadata[\'order_id\']:\'6735\'',
- ]);
- static::assertInstanceOf(\Stripe\SearchResult::class, $result);
- static::assertInstanceOf(\Stripe\Invoice::class, $result->data[0]);
+ static::assertInstanceOf(\Stripe\Issuing\Transaction::class, $result);
}
- public function testListAuthorization()
+ public function testMandatesGet()
{
- $this->expectsRequest('get', '/v1/issuing/authorizations');
- $result = $this->client->issuing->authorizations->all(['limit' => 3]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Issuing\Authorization::class, $result->data[0]);
+ $this->expectsRequest('get', '/v1/mandates/mandate_xxxxxxxxxxxxx');
+ $result = $this->client->mandates->retrieve(
+ 'mandate_xxxxxxxxxxxxx',
+ []
+ );
+ static::assertInstanceOf(\Stripe\Mandate::class, $result);
}
- public function testRetrieveAuthorization()
+ public function testPaymentIntentsApplyCustomerBalancePost()
{
$this->expectsRequest(
- 'get',
- '/v1/issuing/authorizations/iauth_xxxxxxxxxxxxx'
+ 'post',
+ '/v1/payment_intents/pi_xxxxxxxxxxxxx/apply_customer_balance'
);
- $result = $this->client->issuing->authorizations->retrieve(
- 'iauth_xxxxxxxxxxxxx',
+ $result = $this->client->paymentIntents->applyCustomerBalance(
+ 'pi_xxxxxxxxxxxxx',
[]
);
- static::assertInstanceOf(\Stripe\Issuing\Authorization::class, $result);
+ static::assertInstanceOf(\Stripe\PaymentIntent::class, $result);
}
- public function testUpdateAuthorization()
+ public function testPaymentIntentsCancelPost()
{
$this->expectsRequest(
'post',
- '/v1/issuing/authorizations/iauth_xxxxxxxxxxxxx'
- );
- $result = $this->client->issuing->authorizations->update(
- 'iauth_xxxxxxxxxxxxx',
- ['metadata' => ['order_id' => '6735']]
+ '/v1/payment_intents/pi_xxxxxxxxxxxxx/cancel'
);
- static::assertInstanceOf(\Stripe\Issuing\Authorization::class, $result);
+ $result = $this->client->paymentIntents->cancel('pi_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\PaymentIntent::class, $result);
}
- public function testApproveAuthorization()
+ public function testPaymentIntentsCapturePost()
{
$this->expectsRequest(
'post',
- '/v1/issuing/authorizations/iauth_xxxxxxxxxxxxx/approve'
+ '/v1/payment_intents/pi_xxxxxxxxxxxxx/capture'
);
- $result = $this->client->issuing->authorizations->approve(
- 'iauth_xxxxxxxxxxxxx',
+ $result = $this->client->paymentIntents->capture(
+ 'pi_xxxxxxxxxxxxx',
[]
);
- static::assertInstanceOf(\Stripe\Issuing\Authorization::class, $result);
+ static::assertInstanceOf(\Stripe\PaymentIntent::class, $result);
}
- public function testDeclineAuthorization()
+ public function testPaymentIntentsConfirmPost()
{
$this->expectsRequest(
'post',
- '/v1/issuing/authorizations/iauth_xxxxxxxxxxxxx/decline'
+ '/v1/payment_intents/pi_xxxxxxxxxxxxx/confirm'
);
- $result = $this->client->issuing->authorizations->decline(
- 'iauth_xxxxxxxxxxxxx',
- []
+ $result = $this->client->paymentIntents->confirm(
+ 'pi_xxxxxxxxxxxxx',
+ ['payment_method' => 'pm_card_visa']
);
- static::assertInstanceOf(\Stripe\Issuing\Authorization::class, $result);
+ static::assertInstanceOf(\Stripe\PaymentIntent::class, $result);
}
- public function testListCardholder()
+ public function testPaymentIntentsGet()
{
- $this->expectsRequest('get', '/v1/issuing/cardholders');
- $result = $this->client->issuing->cardholders->all(['limit' => 3]);
+ $this->expectsRequest('get', '/v1/payment_intents');
+ $result = $this->client->paymentIntents->all(['limit' => 3]);
static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Issuing\Cardholder::class, $result->data[0]);
- }
-
- public function testCreateCardholder()
- {
- $this->expectsRequest('post', '/v1/issuing/cardholders');
- $result = $this->client->issuing->cardholders->create([
- 'type' => 'individual',
- 'name' => 'Jenny Rosen',
- 'email' => 'jenny.rosen@example.com',
- 'phone_number' => '+18888675309',
- 'billing' => [
- 'address' => [
- 'line1' => '1234 Main Street',
- 'city' => 'San Francisco',
- 'state' => 'CA',
- 'country' => 'US',
- 'postal_code' => '94111',
- ],
- ],
- ]);
- static::assertInstanceOf(\Stripe\Issuing\Cardholder::class, $result);
+ static::assertInstanceOf(\Stripe\PaymentIntent::class, $result->data[0]);
}
- public function testRetrieveCardholder()
+ public function testPaymentIntentsGet2()
{
- $this->expectsRequest(
- 'get',
- '/v1/issuing/cardholders/ich_xxxxxxxxxxxxx'
- );
- $result = $this->client->issuing->cardholders->retrieve(
- 'ich_xxxxxxxxxxxxx',
+ $this->expectsRequest('get', '/v1/payment_intents/pi_xxxxxxxxxxxxx');
+ $result = $this->client->paymentIntents->retrieve(
+ 'pi_xxxxxxxxxxxxx',
[]
);
- static::assertInstanceOf(\Stripe\Issuing\Cardholder::class, $result);
+ static::assertInstanceOf(\Stripe\PaymentIntent::class, $result);
}
- public function testUpdateCardholder()
+ public function testPaymentIntentsIncrementAuthorizationPost()
{
$this->expectsRequest(
'post',
- '/v1/issuing/cardholders/ich_xxxxxxxxxxxxx'
+ '/v1/payment_intents/pi_xxxxxxxxxxxxx/increment_authorization'
);
- $result = $this->client->issuing->cardholders->update(
- 'ich_xxxxxxxxxxxxx',
- ['metadata' => ['order_id' => '6735']]
+ $result = $this->client->paymentIntents->incrementAuthorization(
+ 'pi_xxxxxxxxxxxxx',
+ ['amount' => 2099]
);
- static::assertInstanceOf(\Stripe\Issuing\Cardholder::class, $result);
+ static::assertInstanceOf(\Stripe\PaymentIntent::class, $result);
}
- public function testListCard()
+ public function testPaymentIntentsPost()
{
- $this->expectsRequest('get', '/v1/issuing/cards');
- $result = $this->client->issuing->cards->all(['limit' => 3]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Issuing\Card::class, $result->data[0]);
+ $this->expectsRequest('post', '/v1/payment_intents');
+ $result = $this->client->paymentIntents->create([
+ 'amount' => 1099,
+ 'currency' => 'eur',
+ 'automatic_payment_methods' => ['enabled' => true],
+ ]);
+ static::assertInstanceOf(\Stripe\PaymentIntent::class, $result);
}
- public function testCreateCard()
+ public function testPaymentIntentsPost2()
{
- $this->expectsRequest('post', '/v1/issuing/cards');
- $result = $this->client->issuing->cards->create([
- 'cardholder' => 'ich_xxxxxxxxxxxxx',
+ $this->expectsRequest('post', '/v1/payment_intents');
+ $result = $this->client->paymentIntents->create([
+ 'amount' => 2000,
'currency' => 'usd',
- 'type' => 'virtual',
+ 'automatic_payment_methods' => ['enabled' => true],
]);
- static::assertInstanceOf(\Stripe\Issuing\Card::class, $result);
- }
-
- public function testRetrieveCard()
- {
- $this->expectsRequest('get', '/v1/issuing/cards/ic_xxxxxxxxxxxxx');
- $result = $this->client->issuing->cards->retrieve(
- 'ic_xxxxxxxxxxxxx',
- []
- );
- static::assertInstanceOf(\Stripe\Issuing\Card::class, $result);
- }
-
- public function testUpdateCard()
- {
- $this->expectsRequest('post', '/v1/issuing/cards/ic_xxxxxxxxxxxxx');
- $result = $this->client->issuing->cards->update(
- 'ic_xxxxxxxxxxxxx',
- ['metadata' => ['order_id' => '6735']]
- );
- static::assertInstanceOf(\Stripe\Issuing\Card::class, $result);
- }
-
- public function testListDispute2()
- {
- $this->expectsRequest('get', '/v1/issuing/disputes');
- $result = $this->client->issuing->disputes->all(['limit' => 3]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Issuing\Dispute::class, $result->data[0]);
- }
-
- public function testCreateDispute()
- {
- $this->expectsRequest('post', '/v1/issuing/disputes');
- $result = $this->client->issuing->disputes->create([
- 'transaction' => 'ipi_xxxxxxxxxxxxx',
- 'evidence' => [
- 'reason' => 'fraudulent',
- 'fraudulent' => ['explanation' => 'Purchase was unrecognized.'],
- ],
- ]);
- static::assertInstanceOf(\Stripe\Issuing\Dispute::class, $result);
- }
-
- public function testRetrieveDispute2()
- {
- $this->expectsRequest('get', '/v1/issuing/disputes/idp_xxxxxxxxxxxxx');
- $result = $this->client->issuing->disputes->retrieve(
- 'idp_xxxxxxxxxxxxx',
- []
- );
- static::assertInstanceOf(\Stripe\Issuing\Dispute::class, $result);
- }
-
- public function testSubmitDispute()
- {
- $this->expectsRequest(
- 'post',
- '/v1/issuing/disputes/idp_xxxxxxxxxxxxx/submit'
- );
- $result = $this->client->issuing->disputes->submit(
- 'idp_xxxxxxxxxxxxx',
- []
- );
- static::assertInstanceOf(\Stripe\Issuing\Dispute::class, $result);
- }
-
- public function testListTransaction()
- {
- $this->expectsRequest('get', '/v1/issuing/transactions');
- $result = $this->client->issuing->transactions->all(['limit' => 3]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Issuing\Transaction::class, $result->data[0]);
- }
-
- public function testRetrieveTransaction()
- {
- $this->expectsRequest(
- 'get',
- '/v1/issuing/transactions/ipi_xxxxxxxxxxxxx'
- );
- $result = $this->client->issuing->transactions->retrieve(
- 'ipi_xxxxxxxxxxxxx',
- []
- );
- static::assertInstanceOf(\Stripe\Issuing\Transaction::class, $result);
- }
-
- public function testUpdateTransaction()
- {
- $this->expectsRequest(
- 'post',
- '/v1/issuing/transactions/ipi_xxxxxxxxxxxxx'
- );
- $result = $this->client->issuing->transactions->update(
- 'ipi_xxxxxxxxxxxxx',
- ['metadata' => ['order_id' => '6735']]
- );
- static::assertInstanceOf(\Stripe\Issuing\Transaction::class, $result);
- }
-
- public function testRetrieveMandate()
- {
- $this->expectsRequest('get', '/v1/mandates/mandate_xxxxxxxxxxxxx');
- $result = $this->client->mandates->retrieve(
- 'mandate_xxxxxxxxxxxxx',
- []
- );
- static::assertInstanceOf(\Stripe\Mandate::class, $result);
- }
-
- public function testListPaymentIntent()
- {
- $this->expectsRequest('get', '/v1/payment_intents');
- $result = $this->client->paymentIntents->all(['limit' => 3]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\PaymentIntent::class, $result->data[0]);
- }
-
- public function testCreatePaymentIntent2()
- {
- $this->expectsRequest('post', '/v1/payment_intents');
- $result = $this->client->paymentIntents->create([
- 'amount' => 2000,
- 'currency' => 'usd',
- 'automatic_payment_methods' => ['enabled' => true],
- ]);
- static::assertInstanceOf(\Stripe\PaymentIntent::class, $result);
- }
-
- public function testRetrievePaymentIntent()
- {
- $this->expectsRequest('get', '/v1/payment_intents/pi_xxxxxxxxxxxxx');
- $result = $this->client->paymentIntents->retrieve(
- 'pi_xxxxxxxxxxxxx',
- []
- );
static::assertInstanceOf(\Stripe\PaymentIntent::class, $result);
}
- public function testUpdatePaymentIntent()
+ public function testPaymentIntentsPost3()
{
$this->expectsRequest('post', '/v1/payment_intents/pi_xxxxxxxxxxxxx');
$result = $this->client->paymentIntents->update(
@@ -2110,69 +1793,44 @@ public function testUpdatePaymentIntent()
static::assertInstanceOf(\Stripe\PaymentIntent::class, $result);
}
- public function testApplyCustomerBalancePaymentIntent()
+ public function testPaymentIntentsPost4()
{
- $this->expectsRequest(
- 'post',
- '/v1/payment_intents/pi_xxxxxxxxxxxxx/apply_customer_balance'
- );
- $result = $this->client->paymentIntents->applyCustomerBalance(
- 'pi_xxxxxxxxxxxxx',
- []
- );
+ $this->expectsRequest('post', '/v1/payment_intents');
+ $result = $this->client->paymentIntents->create([
+ 'amount' => 200,
+ 'currency' => 'usd',
+ 'payment_method_data' => [
+ 'type' => 'p24',
+ 'p24' => ['bank' => 'blik'],
+ ],
+ ]);
static::assertInstanceOf(\Stripe\PaymentIntent::class, $result);
}
- public function testCancelPaymentIntent()
+ public function testPaymentIntentsSearchGet()
{
- $this->expectsRequest(
- 'post',
- '/v1/payment_intents/pi_xxxxxxxxxxxxx/cancel'
- );
- $result = $this->client->paymentIntents->cancel('pi_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\PaymentIntent::class, $result);
+ $this->expectsRequest('get', '/v1/payment_intents/search');
+ $result = $this->client->paymentIntents->search([
+ 'query' => 'status:\'succeeded\' AND metadata[\'order_id\']:\'6735\'',
+ ]);
+ static::assertInstanceOf(\Stripe\SearchResult::class, $result);
+ static::assertInstanceOf(\Stripe\PaymentIntent::class, $result->data[0]);
}
- public function testCapturePaymentIntent()
+ public function testPaymentIntentsVerifyMicrodepositsPost()
{
$this->expectsRequest(
'post',
- '/v1/payment_intents/pi_xxxxxxxxxxxxx/capture'
+ '/v1/payment_intents/pi_xxxxxxxxxxxxx/verify_microdeposits'
);
- $result = $this->client->paymentIntents->capture(
+ $result = $this->client->paymentIntents->verifyMicrodeposits(
'pi_xxxxxxxxxxxxx',
[]
);
static::assertInstanceOf(\Stripe\PaymentIntent::class, $result);
}
- public function testConfirmPaymentIntent()
- {
- $this->expectsRequest(
- 'post',
- '/v1/payment_intents/pi_xxxxxxxxxxxxx/confirm'
- );
- $result = $this->client->paymentIntents->confirm(
- 'pi_xxxxxxxxxxxxx',
- ['payment_method' => 'pm_card_visa']
- );
- static::assertInstanceOf(\Stripe\PaymentIntent::class, $result);
- }
-
- public function testIncrementAuthorizationPaymentIntent()
- {
- $this->expectsRequest(
- 'post',
- '/v1/payment_intents/pi_xxxxxxxxxxxxx/increment_authorization'
- );
- $result = $this->client->paymentIntents->incrementAuthorization(
- 'pi_xxxxxxxxxxxxx',
- ['amount' => 2099]
- );
- static::assertInstanceOf(\Stripe\PaymentIntent::class, $result);
- }
-
- public function testVerifyMicrodepositsPaymentIntent2()
+ public function testPaymentIntentsVerifyMicrodepositsPost2()
{
$this->expectsRequest(
'post',
@@ -2185,17 +1843,14 @@ public function testVerifyMicrodepositsPaymentIntent2()
static::assertInstanceOf(\Stripe\PaymentIntent::class, $result);
}
- public function testSearchPaymentIntent()
+ public function testPaymentLinksGet()
{
- $this->expectsRequest('get', '/v1/payment_intents/search');
- $result = $this->client->paymentIntents->search([
- 'query' => 'status:\'succeeded\' AND metadata[\'order_id\']:\'6735\'',
- ]);
- static::assertInstanceOf(\Stripe\SearchResult::class, $result);
- static::assertInstanceOf(\Stripe\PaymentIntent::class, $result->data[0]);
+ $this->expectsRequest('get', '/v1/payment_links/pl_xyz');
+ $result = $this->client->paymentLinks->retrieve('pl_xyz', []);
+ static::assertInstanceOf(\Stripe\PaymentLink::class, $result);
}
- public function testListPaymentLink()
+ public function testPaymentLinksGet2()
{
$this->expectsRequest('get', '/v1/payment_links');
$result = $this->client->paymentLinks->all(['limit' => 3]);
@@ -2203,7 +1858,25 @@ public function testListPaymentLink()
static::assertInstanceOf(\Stripe\PaymentLink::class, $result->data[0]);
}
- public function testCreatePaymentLink2()
+ public function testPaymentLinksGet3()
+ {
+ $this->expectsRequest('get', '/v1/payment_links/plink_xxxxxxxxxxxxx');
+ $result = $this->client->paymentLinks->retrieve(
+ 'plink_xxxxxxxxxxxxx',
+ []
+ );
+ static::assertInstanceOf(\Stripe\PaymentLink::class, $result);
+ }
+
+ public function testPaymentLinksLineItemsGet()
+ {
+ $this->expectsRequest('get', '/v1/payment_links/pl_xyz/line_items');
+ $result = $this->client->paymentLinks->allLineItems('pl_xyz', []);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\LineItem::class, $result->data[0]);
+ }
+
+ public function testPaymentLinksPost()
{
$this->expectsRequest('post', '/v1/payment_links');
$result = $this->client->paymentLinks->create([
@@ -2217,17 +1890,21 @@ public function testCreatePaymentLink2()
static::assertInstanceOf(\Stripe\PaymentLink::class, $result);
}
- public function testRetrievePaymentLink2()
+ public function testPaymentLinksPost2()
{
- $this->expectsRequest('get', '/v1/payment_links/plink_xxxxxxxxxxxxx');
- $result = $this->client->paymentLinks->retrieve(
- 'plink_xxxxxxxxxxxxx',
- []
- );
+ $this->expectsRequest('post', '/v1/payment_links');
+ $result = $this->client->paymentLinks->create([
+ 'line_items' => [
+ [
+ 'price' => 'price_xxxxxxxxxxxxx',
+ 'quantity' => 1,
+ ],
+ ],
+ ]);
static::assertInstanceOf(\Stripe\PaymentLink::class, $result);
}
- public function testUpdatePaymentLink()
+ public function testPaymentLinksPost3()
{
$this->expectsRequest('post', '/v1/payment_links/plink_xxxxxxxxxxxxx');
$result = $this->client->paymentLinks->update(
@@ -2237,53 +1914,47 @@ public function testUpdatePaymentLink()
static::assertInstanceOf(\Stripe\PaymentLink::class, $result);
}
- public function testListPaymentMethod()
+ public function testPaymentMethodConfigurationsGet()
{
- $this->expectsRequest('get', '/v1/payment_methods');
- $result = $this->client->paymentMethods->all([
- 'customer' => 'cus_xxxxxxxxxxxxx',
- 'type' => 'card',
+ $this->expectsRequest('get', '/v1/payment_method_configurations');
+ $result = $this->client->paymentMethodConfigurations->all([
+ 'application' => 'foo',
]);
static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\PaymentMethod::class, $result->data[0]);
- }
-
- public function testCreatePaymentMethod()
- {
- $this->expectsRequest('post', '/v1/payment_methods');
- $result = $this->client->paymentMethods->create([
- 'type' => 'card',
- 'card' => [
- 'number' => '4242424242424242',
- 'exp_month' => 8,
- 'exp_year' => 2024,
- 'cvc' => '314',
- ],
- ]);
- static::assertInstanceOf(\Stripe\PaymentMethod::class, $result);
+ static::assertInstanceOf(\Stripe\PaymentMethodConfiguration::class, $result->data[0]);
}
- public function testRetrievePaymentMethod()
+ public function testPaymentMethodConfigurationsGet2()
{
- $this->expectsRequest('get', '/v1/payment_methods/pm_xxxxxxxxxxxxx');
- $result = $this->client->paymentMethods->retrieve(
- 'pm_xxxxxxxxxxxxx',
+ $this->expectsRequest('get', '/v1/payment_method_configurations/foo');
+ $result = $this->client->paymentMethodConfigurations->retrieve(
+ 'foo',
[]
);
- static::assertInstanceOf(\Stripe\PaymentMethod::class, $result);
+ static::assertInstanceOf(\Stripe\PaymentMethodConfiguration::class, $result);
}
- public function testUpdatePaymentMethod()
+ public function testPaymentMethodConfigurationsPost()
{
- $this->expectsRequest('post', '/v1/payment_methods/pm_xxxxxxxxxxxxx');
- $result = $this->client->paymentMethods->update(
- 'pm_xxxxxxxxxxxxx',
- ['metadata' => ['order_id' => '6735']]
- );
- static::assertInstanceOf(\Stripe\PaymentMethod::class, $result);
+ $this->expectsRequest('post', '/v1/payment_method_configurations');
+ $result = $this->client->paymentMethodConfigurations->create([
+ 'acss_debit' => ['display_preference' => ['preference' => 'none']],
+ 'affirm' => ['display_preference' => ['preference' => 'none']],
+ ]);
+ static::assertInstanceOf(\Stripe\PaymentMethodConfiguration::class, $result);
+ }
+
+ public function testPaymentMethodConfigurationsPost2()
+ {
+ $this->expectsRequest('post', '/v1/payment_method_configurations/foo');
+ $result = $this->client->paymentMethodConfigurations->update(
+ 'foo',
+ ['acss_debit' => ['display_preference' => ['preference' => 'on']]]
+ );
+ static::assertInstanceOf(\Stripe\PaymentMethodConfiguration::class, $result);
}
- public function testAttachPaymentMethod()
+ public function testPaymentMethodsAttachPost()
{
$this->expectsRequest(
'post',
@@ -2296,7 +1967,7 @@ public function testAttachPaymentMethod()
static::assertInstanceOf(\Stripe\PaymentMethod::class, $result);
}
- public function testDetachPaymentMethod()
+ public function testPaymentMethodsDetachPost()
{
$this->expectsRequest(
'post',
@@ -2306,7 +1977,60 @@ public function testDetachPaymentMethod()
static::assertInstanceOf(\Stripe\PaymentMethod::class, $result);
}
- public function testListPayout()
+ public function testPaymentMethodsGet()
+ {
+ $this->expectsRequest('get', '/v1/payment_methods');
+ $result = $this->client->paymentMethods->all([
+ 'customer' => 'cus_xxxxxxxxxxxxx',
+ 'type' => 'card',
+ ]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\PaymentMethod::class, $result->data[0]);
+ }
+
+ public function testPaymentMethodsGet2()
+ {
+ $this->expectsRequest('get', '/v1/payment_methods/pm_xxxxxxxxxxxxx');
+ $result = $this->client->paymentMethods->retrieve(
+ 'pm_xxxxxxxxxxxxx',
+ []
+ );
+ static::assertInstanceOf(\Stripe\PaymentMethod::class, $result);
+ }
+
+ public function testPaymentMethodsPost()
+ {
+ $this->expectsRequest('post', '/v1/payment_methods');
+ $result = $this->client->paymentMethods->create([
+ 'type' => 'card',
+ 'card' => [
+ 'number' => '4242424242424242',
+ 'exp_month' => 8,
+ 'exp_year' => 2024,
+ 'cvc' => '314',
+ ],
+ ]);
+ static::assertInstanceOf(\Stripe\PaymentMethod::class, $result);
+ }
+
+ public function testPaymentMethodsPost2()
+ {
+ $this->expectsRequest('post', '/v1/payment_methods/pm_xxxxxxxxxxxxx');
+ $result = $this->client->paymentMethods->update(
+ 'pm_xxxxxxxxxxxxx',
+ ['metadata' => ['order_id' => '6735']]
+ );
+ static::assertInstanceOf(\Stripe\PaymentMethod::class, $result);
+ }
+
+ public function testPayoutsCancelPost()
+ {
+ $this->expectsRequest('post', '/v1/payouts/po_xxxxxxxxxxxxx/cancel');
+ $result = $this->client->payouts->cancel('po_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\Payout::class, $result);
+ }
+
+ public function testPayoutsGet()
{
$this->expectsRequest('get', '/v1/payouts');
$result = $this->client->payouts->all(['limit' => 3]);
@@ -2314,7 +2038,14 @@ public function testListPayout()
static::assertInstanceOf(\Stripe\Payout::class, $result->data[0]);
}
- public function testCreatePayout()
+ public function testPayoutsGet2()
+ {
+ $this->expectsRequest('get', '/v1/payouts/po_xxxxxxxxxxxxx');
+ $result = $this->client->payouts->retrieve('po_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\Payout::class, $result);
+ }
+
+ public function testPayoutsPost()
{
$this->expectsRequest('post', '/v1/payouts');
$result = $this->client->payouts->create([
@@ -2324,14 +2055,7 @@ public function testCreatePayout()
static::assertInstanceOf(\Stripe\Payout::class, $result);
}
- public function testRetrievePayout()
- {
- $this->expectsRequest('get', '/v1/payouts/po_xxxxxxxxxxxxx');
- $result = $this->client->payouts->retrieve('po_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\Payout::class, $result);
- }
-
- public function testUpdatePayout()
+ public function testPayoutsPost2()
{
$this->expectsRequest('post', '/v1/payouts/po_xxxxxxxxxxxxx');
$result = $this->client->payouts->update(
@@ -2341,21 +2065,21 @@ public function testUpdatePayout()
static::assertInstanceOf(\Stripe\Payout::class, $result);
}
- public function testCancelPayout()
+ public function testPayoutsReversePost()
{
- $this->expectsRequest('post', '/v1/payouts/po_xxxxxxxxxxxxx/cancel');
- $result = $this->client->payouts->cancel('po_xxxxxxxxxxxxx', []);
+ $this->expectsRequest('post', '/v1/payouts/po_xxxxxxxxxxxxx/reverse');
+ $result = $this->client->payouts->reverse('po_xxxxxxxxxxxxx', []);
static::assertInstanceOf(\Stripe\Payout::class, $result);
}
- public function testReversePayout()
+ public function testPlansDelete()
{
- $this->expectsRequest('post', '/v1/payouts/po_xxxxxxxxxxxxx/reverse');
- $result = $this->client->payouts->reverse('po_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\Payout::class, $result);
+ $this->expectsRequest('delete', '/v1/plans/price_xxxxxxxxxxxxx');
+ $result = $this->client->plans->delete('price_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\Plan::class, $result);
}
- public function testListPlan()
+ public function testPlansGet()
{
$this->expectsRequest('get', '/v1/plans');
$result = $this->client->plans->all(['limit' => 3]);
@@ -2363,7 +2087,14 @@ public function testListPlan()
static::assertInstanceOf(\Stripe\Plan::class, $result->data[0]);
}
- public function testCreatePlan()
+ public function testPlansGet2()
+ {
+ $this->expectsRequest('get', '/v1/plans/price_xxxxxxxxxxxxx');
+ $result = $this->client->plans->retrieve('price_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\Plan::class, $result);
+ }
+
+ public function testPlansPost()
{
$this->expectsRequest('post', '/v1/plans');
$result = $this->client->plans->create([
@@ -2375,7 +2106,7 @@ public function testCreatePlan()
static::assertInstanceOf(\Stripe\Plan::class, $result);
}
- public function testCreatePlan2()
+ public function testPlansPost2()
{
$this->expectsRequest('post', '/v1/plans');
$result = $this->client->plans->create([
@@ -2387,21 +2118,7 @@ public function testCreatePlan2()
static::assertInstanceOf(\Stripe\Plan::class, $result);
}
- public function testDeletePlan()
- {
- $this->expectsRequest('delete', '/v1/plans/price_xxxxxxxxxxxxx');
- $result = $this->client->plans->delete('price_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\Plan::class, $result);
- }
-
- public function testRetrievePlan()
- {
- $this->expectsRequest('get', '/v1/plans/price_xxxxxxxxxxxxx');
- $result = $this->client->plans->retrieve('price_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\Plan::class, $result);
- }
-
- public function testUpdatePlan()
+ public function testPlansPost3()
{
$this->expectsRequest('post', '/v1/plans/price_xxxxxxxxxxxxx');
$result = $this->client->plans->update(
@@ -2411,7 +2128,7 @@ public function testUpdatePlan()
static::assertInstanceOf(\Stripe\Plan::class, $result);
}
- public function testListPrice()
+ public function testPricesGet()
{
$this->expectsRequest('get', '/v1/prices');
$result = $this->client->prices->all(['limit' => 3]);
@@ -2419,26 +2136,42 @@ public function testListPrice()
static::assertInstanceOf(\Stripe\Price::class, $result->data[0]);
}
- public function testCreatePrice2()
+ public function testPricesGet2()
+ {
+ $this->expectsRequest('get', '/v1/prices/price_xxxxxxxxxxxxx');
+ $result = $this->client->prices->retrieve('price_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\Price::class, $result);
+ }
+
+ public function testPricesPost()
{
$this->expectsRequest('post', '/v1/prices');
$result = $this->client->prices->create([
'unit_amount' => 2000,
'currency' => 'usd',
+ 'currency_options' => [
+ 'uah' => ['unit_amount' => 5000],
+ 'eur' => ['unit_amount' => 1800],
+ ],
'recurring' => ['interval' => 'month'],
'product' => 'prod_xxxxxxxxxxxxx',
]);
static::assertInstanceOf(\Stripe\Price::class, $result);
}
- public function testRetrievePrice()
+ public function testPricesPost2()
{
- $this->expectsRequest('get', '/v1/prices/price_xxxxxxxxxxxxx');
- $result = $this->client->prices->retrieve('price_xxxxxxxxxxxxx', []);
+ $this->expectsRequest('post', '/v1/prices');
+ $result = $this->client->prices->create([
+ 'unit_amount' => 2000,
+ 'currency' => 'usd',
+ 'recurring' => ['interval' => 'month'],
+ 'product' => 'prod_xxxxxxxxxxxxx',
+ ]);
static::assertInstanceOf(\Stripe\Price::class, $result);
}
- public function testUpdatePrice()
+ public function testPricesPost3()
{
$this->expectsRequest('post', '/v1/prices/price_xxxxxxxxxxxxx');
$result = $this->client->prices->update(
@@ -2448,7 +2181,7 @@ public function testUpdatePrice()
static::assertInstanceOf(\Stripe\Price::class, $result);
}
- public function testSearchPrice()
+ public function testPricesSearchGet()
{
$this->expectsRequest('get', '/v1/prices/search');
$result = $this->client->prices->search([
@@ -2458,7 +2191,14 @@ public function testSearchPrice()
static::assertInstanceOf(\Stripe\Price::class, $result->data[0]);
}
- public function testListProduct()
+ public function testProductsDelete()
+ {
+ $this->expectsRequest('delete', '/v1/products/prod_xxxxxxxxxxxxx');
+ $result = $this->client->products->delete('prod_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\Product::class, $result);
+ }
+
+ public function testProductsGet()
{
$this->expectsRequest('get', '/v1/products');
$result = $this->client->products->all(['limit' => 3]);
@@ -2466,28 +2206,21 @@ public function testListProduct()
static::assertInstanceOf(\Stripe\Product::class, $result->data[0]);
}
- public function testCreateProduct()
- {
- $this->expectsRequest('post', '/v1/products');
- $result = $this->client->products->create(['name' => 'Gold Special']);
- static::assertInstanceOf(\Stripe\Product::class, $result);
- }
-
- public function testDeleteProduct()
+ public function testProductsGet2()
{
- $this->expectsRequest('delete', '/v1/products/prod_xxxxxxxxxxxxx');
- $result = $this->client->products->delete('prod_xxxxxxxxxxxxx', []);
+ $this->expectsRequest('get', '/v1/products/prod_xxxxxxxxxxxxx');
+ $result = $this->client->products->retrieve('prod_xxxxxxxxxxxxx', []);
static::assertInstanceOf(\Stripe\Product::class, $result);
}
- public function testRetrieveProduct()
+ public function testProductsPost()
{
- $this->expectsRequest('get', '/v1/products/prod_xxxxxxxxxxxxx');
- $result = $this->client->products->retrieve('prod_xxxxxxxxxxxxx', []);
+ $this->expectsRequest('post', '/v1/products');
+ $result = $this->client->products->create(['name' => 'Gold Special']);
static::assertInstanceOf(\Stripe\Product::class, $result);
}
- public function testUpdateProduct()
+ public function testProductsPost2()
{
$this->expectsRequest('post', '/v1/products/prod_xxxxxxxxxxxxx');
$result = $this->client->products->update(
@@ -2497,7 +2230,7 @@ public function testUpdateProduct()
static::assertInstanceOf(\Stripe\Product::class, $result);
}
- public function testSearchProduct()
+ public function testProductsSearchGet()
{
$this->expectsRequest('get', '/v1/products/search');
$result = $this->client->products->search([
@@ -2507,7 +2240,7 @@ public function testSearchProduct()
static::assertInstanceOf(\Stripe\Product::class, $result->data[0]);
}
- public function testListPromotionCode()
+ public function testPromotionCodesGet()
{
$this->expectsRequest('get', '/v1/promotion_codes');
$result = $this->client->promotionCodes->all(['limit' => 3]);
@@ -2515,16 +2248,7 @@ public function testListPromotionCode()
static::assertInstanceOf(\Stripe\PromotionCode::class, $result->data[0]);
}
- public function testCreatePromotionCode()
- {
- $this->expectsRequest('post', '/v1/promotion_codes');
- $result = $this->client->promotionCodes->create([
- 'coupon' => 'Z4OV52SU',
- ]);
- static::assertInstanceOf(\Stripe\PromotionCode::class, $result);
- }
-
- public function testRetrievePromotionCode()
+ public function testPromotionCodesGet2()
{
$this->expectsRequest('get', '/v1/promotion_codes/promo_xxxxxxxxxxxxx');
$result = $this->client->promotionCodes->retrieve(
@@ -2534,7 +2258,16 @@ public function testRetrievePromotionCode()
static::assertInstanceOf(\Stripe\PromotionCode::class, $result);
}
- public function testUpdatePromotionCode()
+ public function testPromotionCodesPost()
+ {
+ $this->expectsRequest('post', '/v1/promotion_codes');
+ $result = $this->client->promotionCodes->create([
+ 'coupon' => 'Z4OV52SU',
+ ]);
+ static::assertInstanceOf(\Stripe\PromotionCode::class, $result);
+ }
+
+ public function testPromotionCodesPost2()
{
$this->expectsRequest(
'post',
@@ -2547,7 +2280,28 @@ public function testUpdatePromotionCode()
static::assertInstanceOf(\Stripe\PromotionCode::class, $result);
}
- public function testListQuote()
+ public function testQuotesAcceptPost()
+ {
+ $this->expectsRequest('post', '/v1/quotes/qt_xxxxxxxxxxxxx/accept');
+ $result = $this->client->quotes->accept('qt_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\Quote::class, $result);
+ }
+
+ public function testQuotesCancelPost()
+ {
+ $this->expectsRequest('post', '/v1/quotes/qt_xxxxxxxxxxxxx/cancel');
+ $result = $this->client->quotes->cancel('qt_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\Quote::class, $result);
+ }
+
+ public function testQuotesFinalizePost()
+ {
+ $this->expectsRequest('post', '/v1/quotes/qt_xxxxxxxxxxxxx/finalize');
+ $result = $this->client->quotes->finalizeQuote('qt_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\Quote::class, $result);
+ }
+
+ public function testQuotesGet()
{
$this->expectsRequest('get', '/v1/quotes');
$result = $this->client->quotes->all(['limit' => 3]);
@@ -2555,7 +2309,33 @@ public function testListQuote()
static::assertInstanceOf(\Stripe\Quote::class, $result->data[0]);
}
- public function testCreateQuote()
+ public function testQuotesGet2()
+ {
+ $this->expectsRequest('get', '/v1/quotes/qt_xxxxxxxxxxxxx');
+ $result = $this->client->quotes->retrieve('qt_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\Quote::class, $result);
+ }
+
+ public function testQuotesLineItemsGet()
+ {
+ $this->expectsRequest('get', '/v1/quotes/qt_xxxxxxxxxxxxx/line_items');
+ $result = $this->client->quotes->allLineItems('qt_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\LineItem::class, $result->data[0]);
+ }
+
+ public function testQuotesPdfGet()
+ {
+ $this->expectsRequestStream('get', '/v1/quotes/qt_xxxxxxxxxxxxx/pdf');
+ $result = $this->client->quotes->pdf(
+ 'qt_xxxxxxxxxxxxx',
+ function () {},
+ []
+ );
+ // TODO: assert proper instance, {"shape":"file"}
+ }
+
+ public function testQuotesPost()
{
$this->expectsRequest('post', '/v1/quotes');
$result = $this->client->quotes->create([
@@ -2570,14 +2350,7 @@ public function testCreateQuote()
static::assertInstanceOf(\Stripe\Quote::class, $result);
}
- public function testRetrieveQuote()
- {
- $this->expectsRequest('get', '/v1/quotes/qt_xxxxxxxxxxxxx');
- $result = $this->client->quotes->retrieve('qt_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\Quote::class, $result);
- }
-
- public function testUpdateQuote()
+ public function testQuotesPost2()
{
$this->expectsRequest('post', '/v1/quotes/qt_xxxxxxxxxxxxx');
$result = $this->client->quotes->update(
@@ -2587,28 +2360,7 @@ public function testUpdateQuote()
static::assertInstanceOf(\Stripe\Quote::class, $result);
}
- public function testAcceptQuote()
- {
- $this->expectsRequest('post', '/v1/quotes/qt_xxxxxxxxxxxxx/accept');
- $result = $this->client->quotes->accept('qt_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\Quote::class, $result);
- }
-
- public function testCancelQuote()
- {
- $this->expectsRequest('post', '/v1/quotes/qt_xxxxxxxxxxxxx/cancel');
- $result = $this->client->quotes->cancel('qt_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\Quote::class, $result);
- }
-
- public function testFinalizeQuoteQuote()
- {
- $this->expectsRequest('post', '/v1/quotes/qt_xxxxxxxxxxxxx/finalize');
- $result = $this->client->quotes->finalizeQuote('qt_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\Quote::class, $result);
- }
-
- public function testListEarlyFraudWarning()
+ public function testRadarEarlyFraudWarningsGet()
{
$this->expectsRequest('get', '/v1/radar/early_fraud_warnings');
$result = $this->client->radar->earlyFraudWarnings->all(['limit' => 3]);
@@ -2616,7 +2368,7 @@ public function testListEarlyFraudWarning()
static::assertInstanceOf(\Stripe\Radar\EarlyFraudWarning::class, $result->data[0]);
}
- public function testRetrieveEarlyFraudWarning()
+ public function testRadarEarlyFraudWarningsGet2()
{
$this->expectsRequest(
'get',
@@ -2629,7 +2381,20 @@ public function testRetrieveEarlyFraudWarning()
static::assertInstanceOf(\Stripe\Radar\EarlyFraudWarning::class, $result);
}
- public function testListValueListItem()
+ public function testRadarValueListItemsDelete()
+ {
+ $this->expectsRequest(
+ 'delete',
+ '/v1/radar/value_list_items/rsli_xxxxxxxxxxxxx'
+ );
+ $result = $this->client->radar->valueListItems->delete(
+ 'rsli_xxxxxxxxxxxxx',
+ []
+ );
+ static::assertInstanceOf(\Stripe\Radar\ValueListItem::class, $result);
+ }
+
+ public function testRadarValueListItemsGet()
{
$this->expectsRequest('get', '/v1/radar/value_list_items');
$result = $this->client->radar->valueListItems->all([
@@ -2640,7 +2405,20 @@ public function testListValueListItem()
static::assertInstanceOf(\Stripe\Radar\ValueListItem::class, $result->data[0]);
}
- public function testCreateValueListItem()
+ public function testRadarValueListItemsGet2()
+ {
+ $this->expectsRequest(
+ 'get',
+ '/v1/radar/value_list_items/rsli_xxxxxxxxxxxxx'
+ );
+ $result = $this->client->radar->valueListItems->retrieve(
+ 'rsli_xxxxxxxxxxxxx',
+ []
+ );
+ static::assertInstanceOf(\Stripe\Radar\ValueListItem::class, $result);
+ }
+
+ public function testRadarValueListItemsPost()
{
$this->expectsRequest('post', '/v1/radar/value_list_items');
$result = $this->client->radar->valueListItems->create([
@@ -2650,33 +2428,20 @@ public function testCreateValueListItem()
static::assertInstanceOf(\Stripe\Radar\ValueListItem::class, $result);
}
- public function testDeleteValueListItem()
+ public function testRadarValueListsDelete()
{
$this->expectsRequest(
'delete',
- '/v1/radar/value_list_items/rsli_xxxxxxxxxxxxx'
+ '/v1/radar/value_lists/rsl_xxxxxxxxxxxxx'
);
- $result = $this->client->radar->valueListItems->delete(
- 'rsli_xxxxxxxxxxxxx',
+ $result = $this->client->radar->valueLists->delete(
+ 'rsl_xxxxxxxxxxxxx',
[]
);
- static::assertInstanceOf(\Stripe\Radar\ValueListItem::class, $result);
+ static::assertInstanceOf(\Stripe\Radar\ValueList::class, $result);
}
- public function testRetrieveValueListItem()
- {
- $this->expectsRequest(
- 'get',
- '/v1/radar/value_list_items/rsli_xxxxxxxxxxxxx'
- );
- $result = $this->client->radar->valueListItems->retrieve(
- 'rsli_xxxxxxxxxxxxx',
- []
- );
- static::assertInstanceOf(\Stripe\Radar\ValueListItem::class, $result);
- }
-
- public function testListValueList()
+ public function testRadarValueListsGet()
{
$this->expectsRequest('get', '/v1/radar/value_lists');
$result = $this->client->radar->valueLists->all(['limit' => 3]);
@@ -2684,41 +2449,28 @@ public function testListValueList()
static::assertInstanceOf(\Stripe\Radar\ValueList::class, $result->data[0]);
}
- public function testCreateValueList()
- {
- $this->expectsRequest('post', '/v1/radar/value_lists');
- $result = $this->client->radar->valueLists->create([
- 'alias' => 'custom_ip_xxxxxxxxxxxxx',
- 'name' => 'Custom IP Blocklist',
- 'item_type' => 'ip_address',
- ]);
- static::assertInstanceOf(\Stripe\Radar\ValueList::class, $result);
- }
-
- public function testDeleteValueList()
+ public function testRadarValueListsGet2()
{
- $this->expectsRequest(
- 'delete',
- '/v1/radar/value_lists/rsl_xxxxxxxxxxxxx'
- );
- $result = $this->client->radar->valueLists->delete(
+ $this->expectsRequest('get', '/v1/radar/value_lists/rsl_xxxxxxxxxxxxx');
+ $result = $this->client->radar->valueLists->retrieve(
'rsl_xxxxxxxxxxxxx',
[]
);
static::assertInstanceOf(\Stripe\Radar\ValueList::class, $result);
}
- public function testRetrieveValueList()
+ public function testRadarValueListsPost()
{
- $this->expectsRequest('get', '/v1/radar/value_lists/rsl_xxxxxxxxxxxxx');
- $result = $this->client->radar->valueLists->retrieve(
- 'rsl_xxxxxxxxxxxxx',
- []
- );
+ $this->expectsRequest('post', '/v1/radar/value_lists');
+ $result = $this->client->radar->valueLists->create([
+ 'alias' => 'custom_ip_xxxxxxxxxxxxx',
+ 'name' => 'Custom IP Blocklist',
+ 'item_type' => 'ip_address',
+ ]);
static::assertInstanceOf(\Stripe\Radar\ValueList::class, $result);
}
- public function testUpdateValueList()
+ public function testRadarValueListsPost2()
{
$this->expectsRequest(
'post',
@@ -2731,7 +2483,14 @@ public function testUpdateValueList()
static::assertInstanceOf(\Stripe\Radar\ValueList::class, $result);
}
- public function testListRefund()
+ public function testRefundsCancelPost()
+ {
+ $this->expectsRequest('post', '/v1/refunds/re_xxxxxxxxxxxxx/cancel');
+ $result = $this->client->refunds->cancel('re_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\Refund::class, $result);
+ }
+
+ public function testRefundsGet()
{
$this->expectsRequest('get', '/v1/refunds');
$result = $this->client->refunds->all(['limit' => 3]);
@@ -2739,23 +2498,23 @@ public function testListRefund()
static::assertInstanceOf(\Stripe\Refund::class, $result->data[0]);
}
- public function testCreateRefund()
+ public function testRefundsGet2()
{
- $this->expectsRequest('post', '/v1/refunds');
- $result = $this->client->refunds->create([
- 'charge' => 'ch_xxxxxxxxxxxxx',
- ]);
+ $this->expectsRequest('get', '/v1/refunds/re_xxxxxxxxxxxxx');
+ $result = $this->client->refunds->retrieve('re_xxxxxxxxxxxxx', []);
static::assertInstanceOf(\Stripe\Refund::class, $result);
}
- public function testRetrieveRefund()
+ public function testRefundsPost()
{
- $this->expectsRequest('get', '/v1/refunds/re_xxxxxxxxxxxxx');
- $result = $this->client->refunds->retrieve('re_xxxxxxxxxxxxx', []);
+ $this->expectsRequest('post', '/v1/refunds');
+ $result = $this->client->refunds->create([
+ 'charge' => 'ch_xxxxxxxxxxxxx',
+ ]);
static::assertInstanceOf(\Stripe\Refund::class, $result);
}
- public function testUpdateRefund()
+ public function testRefundsPost2()
{
$this->expectsRequest('post', '/v1/refunds/re_xxxxxxxxxxxxx');
$result = $this->client->refunds->update(
@@ -2765,14 +2524,7 @@ public function testUpdateRefund()
static::assertInstanceOf(\Stripe\Refund::class, $result);
}
- public function testCancelRefund()
- {
- $this->expectsRequest('post', '/v1/refunds/re_xxxxxxxxxxxxx/cancel');
- $result = $this->client->refunds->cancel('re_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\Refund::class, $result);
- }
-
- public function testListReportRun()
+ public function testReportingReportRunsGet()
{
$this->expectsRequest('get', '/v1/reporting/report_runs');
$result = $this->client->reporting->reportRuns->all(['limit' => 3]);
@@ -2780,20 +2532,7 @@ public function testListReportRun()
static::assertInstanceOf(\Stripe\Reporting\ReportRun::class, $result->data[0]);
}
- public function testCreateReportRun()
- {
- $this->expectsRequest('post', '/v1/reporting/report_runs');
- $result = $this->client->reporting->reportRuns->create([
- 'report_type' => 'balance.summary.1',
- 'parameters' => [
- 'interval_start' => 1522540800,
- 'interval_end' => 1525132800,
- ],
- ]);
- static::assertInstanceOf(\Stripe\Reporting\ReportRun::class, $result);
- }
-
- public function testRetrieveReportRun()
+ public function testReportingReportRunsGet2()
{
$this->expectsRequest(
'get',
@@ -2806,7 +2545,20 @@ public function testRetrieveReportRun()
static::assertInstanceOf(\Stripe\Reporting\ReportRun::class, $result);
}
- public function testListReportType()
+ public function testReportingReportRunsPost()
+ {
+ $this->expectsRequest('post', '/v1/reporting/report_runs');
+ $result = $this->client->reporting->reportRuns->create([
+ 'report_type' => 'balance.summary.1',
+ 'parameters' => [
+ 'interval_start' => 1522540800,
+ 'interval_end' => 1525132800,
+ ],
+ ]);
+ static::assertInstanceOf(\Stripe\Reporting\ReportRun::class, $result);
+ }
+
+ public function testReportingReportTypesGet()
{
$this->expectsRequest('get', '/v1/reporting/report_types');
$result = $this->client->reporting->reportTypes->all([]);
@@ -2814,7 +2566,7 @@ public function testListReportType()
static::assertInstanceOf(\Stripe\Reporting\ReportType::class, $result->data[0]);
}
- public function testRetrieveReportType()
+ public function testReportingReportTypesGet2()
{
$this->expectsRequest(
'get',
@@ -2827,7 +2579,14 @@ public function testRetrieveReportType()
static::assertInstanceOf(\Stripe\Reporting\ReportType::class, $result);
}
- public function testListReview()
+ public function testReviewsApprovePost()
+ {
+ $this->expectsRequest('post', '/v1/reviews/prv_xxxxxxxxxxxxx/approve');
+ $result = $this->client->reviews->approve('prv_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\Review::class, $result);
+ }
+
+ public function testReviewsGet()
{
$this->expectsRequest('get', '/v1/reviews');
$result = $this->client->reviews->all(['limit' => 3]);
@@ -2835,38 +2594,56 @@ public function testListReview()
static::assertInstanceOf(\Stripe\Review::class, $result->data[0]);
}
- public function testRetrieveReview()
+ public function testReviewsGet2()
{
$this->expectsRequest('get', '/v1/reviews/prv_xxxxxxxxxxxxx');
$result = $this->client->reviews->retrieve('prv_xxxxxxxxxxxxx', []);
static::assertInstanceOf(\Stripe\Review::class, $result);
}
- public function testApproveReview()
+ public function testSetupAttemptsGet()
{
- $this->expectsRequest('post', '/v1/reviews/prv_xxxxxxxxxxxxx/approve');
- $result = $this->client->reviews->approve('prv_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\Review::class, $result);
+ $this->expectsRequest('get', '/v1/setup_attempts');
+ $result = $this->client->setupAttempts->all([
+ 'limit' => 3,
+ 'setup_intent' => 'si_xyz',
+ ]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\SetupAttempt::class, $result->data[0]);
}
- public function testListSetupIntent()
+ public function testSetupIntentsCancelPost()
{
- $this->expectsRequest('get', '/v1/setup_intents');
- $result = $this->client->setupIntents->all(['limit' => 3]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\SetupIntent::class, $result->data[0]);
+ $this->expectsRequest(
+ 'post',
+ '/v1/setup_intents/seti_xxxxxxxxxxxxx/cancel'
+ );
+ $result = $this->client->setupIntents->cancel('seti_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\SetupIntent::class, $result);
}
- public function testCreateSetupIntent()
+ public function testSetupIntentsConfirmPost()
{
- $this->expectsRequest('post', '/v1/setup_intents');
- $result = $this->client->setupIntents->create([
- 'payment_method_types' => ['card'],
- ]);
+ $this->expectsRequest(
+ 'post',
+ '/v1/setup_intents/seti_xxxxxxxxxxxxx/confirm'
+ );
+ $result = $this->client->setupIntents->confirm(
+ 'seti_xxxxxxxxxxxxx',
+ ['payment_method' => 'pm_card_visa']
+ );
static::assertInstanceOf(\Stripe\SetupIntent::class, $result);
}
- public function testRetrieveSetupIntent()
+ public function testSetupIntentsGet()
+ {
+ $this->expectsRequest('get', '/v1/setup_intents');
+ $result = $this->client->setupIntents->all(['limit' => 3]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\SetupIntent::class, $result->data[0]);
+ }
+
+ public function testSetupIntentsGet2()
{
$this->expectsRequest('get', '/v1/setup_intents/seti_xxxxxxxxxxxxx');
$result = $this->client->setupIntents->retrieve(
@@ -2876,40 +2653,39 @@ public function testRetrieveSetupIntent()
static::assertInstanceOf(\Stripe\SetupIntent::class, $result);
}
- public function testUpdateSetupIntent()
+ public function testSetupIntentsPost()
{
- $this->expectsRequest('post', '/v1/setup_intents/seti_xxxxxxxxxxxxx');
- $result = $this->client->setupIntents->update(
- 'seti_xxxxxxxxxxxxx',
- ['metadata' => ['user_id' => '3435453']]
- );
+ $this->expectsRequest('post', '/v1/setup_intents');
+ $result = $this->client->setupIntents->create([
+ 'payment_method_types' => ['card'],
+ ]);
static::assertInstanceOf(\Stripe\SetupIntent::class, $result);
}
- public function testCancelSetupIntent()
+ public function testSetupIntentsPost2()
{
- $this->expectsRequest(
- 'post',
- '/v1/setup_intents/seti_xxxxxxxxxxxxx/cancel'
+ $this->expectsRequest('post', '/v1/setup_intents/seti_xxxxxxxxxxxxx');
+ $result = $this->client->setupIntents->update(
+ 'seti_xxxxxxxxxxxxx',
+ ['metadata' => ['user_id' => '3435453']]
);
- $result = $this->client->setupIntents->cancel('seti_xxxxxxxxxxxxx', []);
static::assertInstanceOf(\Stripe\SetupIntent::class, $result);
}
- public function testConfirmSetupIntent()
+ public function testSetupIntentsVerifyMicrodepositsPost()
{
$this->expectsRequest(
'post',
- '/v1/setup_intents/seti_xxxxxxxxxxxxx/confirm'
+ '/v1/setup_intents/seti_xxxxxxxxxxxxx/verify_microdeposits'
);
- $result = $this->client->setupIntents->confirm(
+ $result = $this->client->setupIntents->verifyMicrodeposits(
'seti_xxxxxxxxxxxxx',
- ['payment_method' => 'pm_card_visa']
+ []
);
static::assertInstanceOf(\Stripe\SetupIntent::class, $result);
}
- public function testVerifyMicrodepositsSetupIntent2()
+ public function testSetupIntentsVerifyMicrodepositsPost2()
{
$this->expectsRequest(
'post',
@@ -2922,7 +2698,15 @@ public function testVerifyMicrodepositsSetupIntent2()
static::assertInstanceOf(\Stripe\SetupIntent::class, $result);
}
- public function testListShippingRate2()
+ public function testShippingRatesGet()
+ {
+ $this->expectsRequest('get', '/v1/shipping_rates');
+ $result = $this->client->shippingRates->all([]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\ShippingRate::class, $result->data[0]);
+ }
+
+ public function testShippingRatesGet2()
{
$this->expectsRequest('get', '/v1/shipping_rates');
$result = $this->client->shippingRates->all(['limit' => 3]);
@@ -2930,31 +2714,45 @@ public function testListShippingRate2()
static::assertInstanceOf(\Stripe\ShippingRate::class, $result->data[0]);
}
- public function testCreateShippingRate2()
+ public function testShippingRatesGet3()
+ {
+ $this->expectsRequest('get', '/v1/shipping_rates/shr_xxxxxxxxxxxxx');
+ $result = $this->client->shippingRates->retrieve(
+ 'shr_xxxxxxxxxxxxx',
+ []
+ );
+ static::assertInstanceOf(\Stripe\ShippingRate::class, $result);
+ }
+
+ public function testShippingRatesPost()
{
$this->expectsRequest('post', '/v1/shipping_rates');
$result = $this->client->shippingRates->create([
- 'display_name' => 'Ground shipping',
- 'type' => 'fixed_amount',
+ 'display_name' => 'Sample Shipper',
'fixed_amount' => [
- 'amount' => 500,
'currency' => 'usd',
+ 'amount' => 400,
],
+ 'type' => 'fixed_amount',
]);
static::assertInstanceOf(\Stripe\ShippingRate::class, $result);
}
- public function testRetrieveShippingRate()
+ public function testShippingRatesPost2()
{
- $this->expectsRequest('get', '/v1/shipping_rates/shr_xxxxxxxxxxxxx');
- $result = $this->client->shippingRates->retrieve(
- 'shr_xxxxxxxxxxxxx',
- []
- );
+ $this->expectsRequest('post', '/v1/shipping_rates');
+ $result = $this->client->shippingRates->create([
+ 'display_name' => 'Ground shipping',
+ 'type' => 'fixed_amount',
+ 'fixed_amount' => [
+ 'amount' => 500,
+ 'currency' => 'usd',
+ ],
+ ]);
static::assertInstanceOf(\Stripe\ShippingRate::class, $result);
}
- public function testUpdateShippingRate()
+ public function testShippingRatesPost3()
{
$this->expectsRequest('post', '/v1/shipping_rates/shr_xxxxxxxxxxxxx');
$result = $this->client->shippingRates->update(
@@ -2964,7 +2762,7 @@ public function testUpdateShippingRate()
static::assertInstanceOf(\Stripe\ShippingRate::class, $result);
}
- public function testListScheduledQueryRun()
+ public function testSigmaScheduledQueryRunsGet()
{
$this->expectsRequest('get', '/v1/sigma/scheduled_query_runs');
$result = $this->client->sigma->scheduledQueryRuns->all(['limit' => 3]);
@@ -2972,7 +2770,7 @@ public function testListScheduledQueryRun()
static::assertInstanceOf(\Stripe\Sigma\ScheduledQueryRun::class, $result->data[0]);
}
- public function testRetrieveScheduledQueryRun()
+ public function testSigmaScheduledQueryRunsGet2()
{
$this->expectsRequest(
'get',
@@ -2985,21 +2783,21 @@ public function testRetrieveScheduledQueryRun()
static::assertInstanceOf(\Stripe\Sigma\ScheduledQueryRun::class, $result);
}
- public function testRetrieveSource()
+ public function testSourcesGet()
{
$this->expectsRequest('get', '/v1/sources/src_xxxxxxxxxxxxx');
$result = $this->client->sources->retrieve('src_xxxxxxxxxxxxx', []);
static::assertInstanceOf(\Stripe\Source::class, $result);
}
- public function testRetrieveSource2()
+ public function testSourcesGet2()
{
$this->expectsRequest('get', '/v1/sources/src_xxxxxxxxxxxxx');
$result = $this->client->sources->retrieve('src_xxxxxxxxxxxxx', []);
static::assertInstanceOf(\Stripe\Source::class, $result);
}
- public function testUpdateSource()
+ public function testSourcesPost()
{
$this->expectsRequest('post', '/v1/sources/src_xxxxxxxxxxxxx');
$result = $this->client->sources->update(
@@ -3009,28 +2807,7 @@ public function testUpdateSource()
static::assertInstanceOf(\Stripe\Source::class, $result);
}
- public function testListSubscriptionItem()
- {
- $this->expectsRequest('get', '/v1/subscription_items');
- $result = $this->client->subscriptionItems->all([
- 'subscription' => 'sub_xxxxxxxxxxxxx',
- ]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\SubscriptionItem::class, $result->data[0]);
- }
-
- public function testCreateSubscriptionItem()
- {
- $this->expectsRequest('post', '/v1/subscription_items');
- $result = $this->client->subscriptionItems->create([
- 'subscription' => 'sub_xxxxxxxxxxxxx',
- 'price' => 'price_xxxxxxxxxxxxx',
- 'quantity' => 2,
- ]);
- static::assertInstanceOf(\Stripe\SubscriptionItem::class, $result);
- }
-
- public function testDeleteSubscriptionItem()
+ public function testSubscriptionItemsDelete()
{
$this->expectsRequest(
'delete',
@@ -3043,7 +2820,17 @@ public function testDeleteSubscriptionItem()
static::assertInstanceOf(\Stripe\SubscriptionItem::class, $result);
}
- public function testRetrieveSubscriptionItem()
+ public function testSubscriptionItemsGet()
+ {
+ $this->expectsRequest('get', '/v1/subscription_items');
+ $result = $this->client->subscriptionItems->all([
+ 'subscription' => 'sub_xxxxxxxxxxxxx',
+ ]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\SubscriptionItem::class, $result->data[0]);
+ }
+
+ public function testSubscriptionItemsGet2()
{
$this->expectsRequest('get', '/v1/subscription_items/si_xxxxxxxxxxxxx');
$result = $this->client->subscriptionItems->retrieve(
@@ -3053,7 +2840,18 @@ public function testRetrieveSubscriptionItem()
static::assertInstanceOf(\Stripe\SubscriptionItem::class, $result);
}
- public function testUpdateSubscriptionItem()
+ public function testSubscriptionItemsPost()
+ {
+ $this->expectsRequest('post', '/v1/subscription_items');
+ $result = $this->client->subscriptionItems->create([
+ 'subscription' => 'sub_xxxxxxxxxxxxx',
+ 'price' => 'price_xxxxxxxxxxxxx',
+ 'quantity' => 2,
+ ]);
+ static::assertInstanceOf(\Stripe\SubscriptionItem::class, $result);
+ }
+
+ public function testSubscriptionItemsPost2()
{
$this->expectsRequest(
'post',
@@ -3066,7 +2864,7 @@ public function testUpdateSubscriptionItem()
static::assertInstanceOf(\Stripe\SubscriptionItem::class, $result);
}
- public function testListUsageRecordSummary()
+ public function testSubscriptionItemsUsageRecordSummariesGet()
{
$this->expectsRequest(
'get',
@@ -3080,7 +2878,7 @@ public function testListUsageRecordSummary()
static::assertInstanceOf(\Stripe\UsageRecordSummary::class, $result->data[0]);
}
- public function testCreateUsageRecord()
+ public function testSubscriptionItemsUsageRecordsPost()
{
$this->expectsRequest(
'post',
@@ -3096,7 +2894,20 @@ public function testCreateUsageRecord()
static::assertInstanceOf(\Stripe\UsageRecord::class, $result);
}
- public function testListSubscriptionSchedule()
+ public function testSubscriptionSchedulesCancelPost()
+ {
+ $this->expectsRequest(
+ 'post',
+ '/v1/subscription_schedules/sub_sched_xxxxxxxxxxxxx/cancel'
+ );
+ $result = $this->client->subscriptionSchedules->cancel(
+ 'sub_sched_xxxxxxxxxxxxx',
+ []
+ );
+ static::assertInstanceOf(\Stripe\SubscriptionSchedule::class, $result);
+ }
+
+ public function testSubscriptionSchedulesGet()
{
$this->expectsRequest('get', '/v1/subscription_schedules');
$result = $this->client->subscriptionSchedules->all(['limit' => 3]);
@@ -3104,7 +2915,20 @@ public function testListSubscriptionSchedule()
static::assertInstanceOf(\Stripe\SubscriptionSchedule::class, $result->data[0]);
}
- public function testCreateSubscriptionSchedule()
+ public function testSubscriptionSchedulesGet2()
+ {
+ $this->expectsRequest(
+ 'get',
+ '/v1/subscription_schedules/sub_sched_xxxxxxxxxxxxx'
+ );
+ $result = $this->client->subscriptionSchedules->retrieve(
+ 'sub_sched_xxxxxxxxxxxxx',
+ []
+ );
+ static::assertInstanceOf(\Stripe\SubscriptionSchedule::class, $result);
+ }
+
+ public function testSubscriptionSchedulesPost()
{
$this->expectsRequest('post', '/v1/subscription_schedules');
$result = $this->client->subscriptionSchedules->create([
@@ -3126,23 +2950,10 @@ public function testCreateSubscriptionSchedule()
static::assertInstanceOf(\Stripe\SubscriptionSchedule::class, $result);
}
- public function testRetrieveSubscriptionSchedule()
+ public function testSubscriptionSchedulesPost2()
{
$this->expectsRequest(
- 'get',
- '/v1/subscription_schedules/sub_sched_xxxxxxxxxxxxx'
- );
- $result = $this->client->subscriptionSchedules->retrieve(
- 'sub_sched_xxxxxxxxxxxxx',
- []
- );
- static::assertInstanceOf(\Stripe\SubscriptionSchedule::class, $result);
- }
-
- public function testUpdateSubscriptionSchedule()
- {
- $this->expectsRequest(
- 'post',
+ 'post',
'/v1/subscription_schedules/sub_sched_xxxxxxxxxxxxx'
);
$result = $this->client->subscriptionSchedules->update(
@@ -3152,20 +2963,7 @@ public function testUpdateSubscriptionSchedule()
static::assertInstanceOf(\Stripe\SubscriptionSchedule::class, $result);
}
- public function testCancelSubscriptionSchedule()
- {
- $this->expectsRequest(
- 'post',
- '/v1/subscription_schedules/sub_sched_xxxxxxxxxxxxx/cancel'
- );
- $result = $this->client->subscriptionSchedules->cancel(
- 'sub_sched_xxxxxxxxxxxxx',
- []
- );
- static::assertInstanceOf(\Stripe\SubscriptionSchedule::class, $result);
- }
-
- public function testReleaseSubscriptionSchedule()
+ public function testSubscriptionSchedulesReleasePost()
{
$this->expectsRequest(
'post',
@@ -3178,32 +2976,29 @@ public function testReleaseSubscriptionSchedule()
static::assertInstanceOf(\Stripe\SubscriptionSchedule::class, $result);
}
- public function testListSubscription()
+ public function testSubscriptionsDelete()
{
- $this->expectsRequest('get', '/v1/subscriptions');
- $result = $this->client->subscriptions->all(['limit' => 3]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Subscription::class, $result->data[0]);
+ $this->expectsRequest('delete', '/v1/subscriptions/sub_xxxxxxxxxxxxx');
+ $result = $this->client->subscriptions->cancel('sub_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\Subscription::class, $result);
}
- public function testCreateSubscription()
+ public function testSubscriptionsDiscountDelete()
{
- $this->expectsRequest('post', '/v1/subscriptions');
- $result = $this->client->subscriptions->create([
- 'customer' => 'cus_xxxxxxxxxxxxx',
- 'items' => [['price' => 'price_xxxxxxxxxxxxx']],
- ]);
- static::assertInstanceOf(\Stripe\Subscription::class, $result);
+ $this->expectsRequest('delete', '/v1/subscriptions/sub_xyz/discount');
+ $result = $this->client->subscriptions->deleteDiscount('sub_xyz', []);
+ static::assertInstanceOf(\Stripe\Discount::class, $result);
}
- public function testCancelSubscription()
+ public function testSubscriptionsGet()
{
- $this->expectsRequest('delete', '/v1/subscriptions/sub_xxxxxxxxxxxxx');
- $result = $this->client->subscriptions->cancel('sub_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\Subscription::class, $result);
+ $this->expectsRequest('get', '/v1/subscriptions');
+ $result = $this->client->subscriptions->all(['limit' => 3]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\Subscription::class, $result->data[0]);
}
- public function testRetrieveSubscription()
+ public function testSubscriptionsGet2()
{
$this->expectsRequest('get', '/v1/subscriptions/sub_xxxxxxxxxxxxx');
$result = $this->client->subscriptions->retrieve(
@@ -3213,7 +3008,17 @@ public function testRetrieveSubscription()
static::assertInstanceOf(\Stripe\Subscription::class, $result);
}
- public function testUpdateSubscription()
+ public function testSubscriptionsPost()
+ {
+ $this->expectsRequest('post', '/v1/subscriptions');
+ $result = $this->client->subscriptions->create([
+ 'customer' => 'cus_xxxxxxxxxxxxx',
+ 'items' => [['price' => 'price_xxxxxxxxxxxxx']],
+ ]);
+ static::assertInstanceOf(\Stripe\Subscription::class, $result);
+ }
+
+ public function testSubscriptionsPost2()
{
$this->expectsRequest('post', '/v1/subscriptions/sub_xxxxxxxxxxxxx');
$result = $this->client->subscriptions->update(
@@ -3223,7 +3028,7 @@ public function testUpdateSubscription()
static::assertInstanceOf(\Stripe\Subscription::class, $result);
}
- public function testSearchSubscription()
+ public function testSubscriptionsSearchGet()
{
$this->expectsRequest('get', '/v1/subscriptions/search');
$result = $this->client->subscriptions->search([
@@ -3233,7 +3038,40 @@ public function testSearchSubscription()
static::assertInstanceOf(\Stripe\Subscription::class, $result->data[0]);
}
- public function testListTaxCode()
+ public function testTaxCalculationsLineItemsGet()
+ {
+ $this->expectsRequest('get', '/v1/tax/calculations/xxx/line_items');
+ $result = $this->client->tax->calculations->allLineItems('xxx', []);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\Tax\CalculationLineItem::class, $result->data[0]);
+ }
+
+ public function testTaxCalculationsPost()
+ {
+ $this->expectsRequest('post', '/v1/tax/calculations');
+ $result = $this->client->tax->calculations->create([
+ 'currency' => 'usd',
+ 'line_items' => [
+ [
+ 'amount' => 1000,
+ 'reference' => 'L1',
+ ],
+ ],
+ 'customer_details' => [
+ 'address' => [
+ 'line1' => '354 Oyster Point Blvd',
+ 'city' => 'South San Francisco',
+ 'state' => 'CA',
+ 'postal_code' => '94080',
+ 'country' => 'US',
+ ],
+ 'address_source' => 'shipping',
+ ],
+ ]);
+ static::assertInstanceOf(\Stripe\Tax\Calculation::class, $result);
+ }
+
+ public function testTaxCodesGet()
{
$this->expectsRequest('get', '/v1/tax_codes');
$result = $this->client->taxCodes->all(['limit' => 3]);
@@ -3241,14 +3079,14 @@ public function testListTaxCode()
static::assertInstanceOf(\Stripe\TaxCode::class, $result->data[0]);
}
- public function testRetrieveTaxCode()
+ public function testTaxCodesGet2()
{
$this->expectsRequest('get', '/v1/tax_codes/txcd_xxxxxxxxxxxxx');
$result = $this->client->taxCodes->retrieve('txcd_xxxxxxxxxxxxx', []);
static::assertInstanceOf(\Stripe\TaxCode::class, $result);
}
- public function testListTaxRate()
+ public function testTaxRatesGet()
{
$this->expectsRequest('get', '/v1/tax_rates');
$result = $this->client->taxRates->all(['limit' => 3]);
@@ -3256,7 +3094,14 @@ public function testListTaxRate()
static::assertInstanceOf(\Stripe\TaxRate::class, $result->data[0]);
}
- public function testCreateTaxRate()
+ public function testTaxRatesGet2()
+ {
+ $this->expectsRequest('get', '/v1/tax_rates/txr_xxxxxxxxxxxxx');
+ $result = $this->client->taxRates->retrieve('txr_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\TaxRate::class, $result);
+ }
+
+ public function testTaxRatesPost()
{
$this->expectsRequest('post', '/v1/tax_rates');
$result = $this->client->taxRates->create([
@@ -3269,14 +3114,7 @@ public function testCreateTaxRate()
static::assertInstanceOf(\Stripe\TaxRate::class, $result);
}
- public function testRetrieveTaxRate()
- {
- $this->expectsRequest('get', '/v1/tax_rates/txr_xxxxxxxxxxxxx');
- $result = $this->client->taxRates->retrieve('txr_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\TaxRate::class, $result);
- }
-
- public function testUpdateTaxRate()
+ public function testTaxRatesPost2()
{
$this->expectsRequest('post', '/v1/tax_rates/txr_xxxxxxxxxxxxx');
$result = $this->client->taxRates->update(
@@ -3286,15 +3124,27 @@ public function testUpdateTaxRate()
static::assertInstanceOf(\Stripe\TaxRate::class, $result);
}
- public function testListConfiguration3()
+ public function testTaxTransactionsCreateFromCalculationPost()
{
- $this->expectsRequest('get', '/v1/terminal/configurations');
- $result = $this->client->terminal->configurations->all(['limit' => 3]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Terminal\Configuration::class, $result->data[0]);
+ $this->expectsRequest(
+ 'post',
+ '/v1/tax/transactions/create_from_calculation'
+ );
+ $result = $this->client->tax->transactions->createFromCalculation([
+ 'calculation' => 'xxx',
+ 'reference' => 'yyy',
+ ]);
+ static::assertInstanceOf(\Stripe\Tax\Transaction::class, $result);
}
- public function testDeleteConfiguration2()
+ public function testTerminalConfigurationsDelete()
+ {
+ $this->expectsRequest('delete', '/v1/terminal/configurations/uc_123');
+ $result = $this->client->terminal->configurations->delete('uc_123', []);
+ static::assertInstanceOf(\Stripe\Terminal\Configuration::class, $result);
+ }
+
+ public function testTerminalConfigurationsDelete2()
{
$this->expectsRequest(
'delete',
@@ -3307,7 +3157,33 @@ public function testDeleteConfiguration2()
static::assertInstanceOf(\Stripe\Terminal\Configuration::class, $result);
}
- public function testRetrieveConfiguration3()
+ public function testTerminalConfigurationsGet()
+ {
+ $this->expectsRequest('get', '/v1/terminal/configurations');
+ $result = $this->client->terminal->configurations->all([]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\Terminal\Configuration::class, $result->data[0]);
+ }
+
+ public function testTerminalConfigurationsGet2()
+ {
+ $this->expectsRequest('get', '/v1/terminal/configurations/uc_123');
+ $result = $this->client->terminal->configurations->retrieve(
+ 'uc_123',
+ []
+ );
+ static::assertInstanceOf(\Stripe\Terminal\Configuration::class, $result);
+ }
+
+ public function testTerminalConfigurationsGet3()
+ {
+ $this->expectsRequest('get', '/v1/terminal/configurations');
+ $result = $this->client->terminal->configurations->all(['limit' => 3]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\Terminal\Configuration::class, $result->data[0]);
+ }
+
+ public function testTerminalConfigurationsGet4()
{
$this->expectsRequest(
'get',
@@ -3320,7 +3196,17 @@ public function testRetrieveConfiguration3()
static::assertInstanceOf(\Stripe\Terminal\Configuration::class, $result);
}
- public function testUpdateConfiguration3()
+ public function testTerminalConfigurationsPost2()
+ {
+ $this->expectsRequest('post', '/v1/terminal/configurations/uc_123');
+ $result = $this->client->terminal->configurations->update(
+ 'uc_123',
+ ['tipping' => ['usd' => ['fixed_amounts' => [10]]]]
+ );
+ static::assertInstanceOf(\Stripe\Terminal\Configuration::class, $result);
+ }
+
+ public function testTerminalConfigurationsPost4()
{
$this->expectsRequest(
'post',
@@ -3333,38 +3219,14 @@ public function testUpdateConfiguration3()
static::assertInstanceOf(\Stripe\Terminal\Configuration::class, $result);
}
- public function testCreateConnectionToken()
+ public function testTerminalConnectionTokensPost()
{
$this->expectsRequest('post', '/v1/terminal/connection_tokens');
$result = $this->client->terminal->connectionTokens->create([]);
static::assertInstanceOf(\Stripe\Terminal\ConnectionToken::class, $result);
}
- public function testListLocation()
- {
- $this->expectsRequest('get', '/v1/terminal/locations');
- $result = $this->client->terminal->locations->all(['limit' => 3]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Terminal\Location::class, $result->data[0]);
- }
-
- public function testCreateLocation()
- {
- $this->expectsRequest('post', '/v1/terminal/locations');
- $result = $this->client->terminal->locations->create([
- 'display_name' => 'My First Store',
- 'address' => [
- 'line1' => '1234 Main Street',
- 'city' => 'San Francisco',
- 'postal_code' => '94111',
- 'state' => 'CA',
- 'country' => 'US',
- ],
- ]);
- static::assertInstanceOf(\Stripe\Terminal\Location::class, $result);
- }
-
- public function testDeleteLocation()
+ public function testTerminalLocationsDelete()
{
$this->expectsRequest(
'delete',
@@ -3377,7 +3239,15 @@ public function testDeleteLocation()
static::assertInstanceOf(\Stripe\Terminal\Location::class, $result);
}
- public function testRetrieveLocation()
+ public function testTerminalLocationsGet()
+ {
+ $this->expectsRequest('get', '/v1/terminal/locations');
+ $result = $this->client->terminal->locations->all(['limit' => 3]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\Terminal\Location::class, $result->data[0]);
+ }
+
+ public function testTerminalLocationsGet2()
{
$this->expectsRequest(
'get',
@@ -3390,7 +3260,23 @@ public function testRetrieveLocation()
static::assertInstanceOf(\Stripe\Terminal\Location::class, $result);
}
- public function testUpdateLocation()
+ public function testTerminalLocationsPost()
+ {
+ $this->expectsRequest('post', '/v1/terminal/locations');
+ $result = $this->client->terminal->locations->create([
+ 'display_name' => 'My First Store',
+ 'address' => [
+ 'line1' => '1234 Main Street',
+ 'city' => 'San Francisco',
+ 'postal_code' => '94111',
+ 'state' => 'CA',
+ 'country' => 'US',
+ ],
+ ]);
+ static::assertInstanceOf(\Stripe\Terminal\Location::class, $result);
+ }
+
+ public function testTerminalLocationsPost2()
{
$this->expectsRequest(
'post',
@@ -3403,26 +3289,20 @@ public function testUpdateLocation()
static::assertInstanceOf(\Stripe\Terminal\Location::class, $result);
}
- public function testListReader()
- {
- $this->expectsRequest('get', '/v1/terminal/readers');
- $result = $this->client->terminal->readers->all(['limit' => 3]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Terminal\Reader::class, $result->data[0]);
- }
-
- public function testCreateReader()
+ public function testTerminalReadersCancelActionPost()
{
- $this->expectsRequest('post', '/v1/terminal/readers');
- $result = $this->client->terminal->readers->create([
- 'registration_code' => 'puppies-plug-could',
- 'label' => 'Blue Rabbit',
- 'location' => 'tml_1234',
- ]);
+ $this->expectsRequest(
+ 'post',
+ '/v1/terminal/readers/tmr_xxxxxxxxxxxxx/cancel_action'
+ );
+ $result = $this->client->terminal->readers->cancelAction(
+ 'tmr_xxxxxxxxxxxxx',
+ []
+ );
static::assertInstanceOf(\Stripe\Terminal\Reader::class, $result);
}
- public function testDeleteReader()
+ public function testTerminalReadersDelete()
{
$this->expectsRequest(
'delete',
@@ -3435,7 +3315,15 @@ public function testDeleteReader()
static::assertInstanceOf(\Stripe\Terminal\Reader::class, $result);
}
- public function testRetrieveReader()
+ public function testTerminalReadersGet()
+ {
+ $this->expectsRequest('get', '/v1/terminal/readers');
+ $result = $this->client->terminal->readers->all(['limit' => 3]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\Terminal\Reader::class, $result->data[0]);
+ }
+
+ public function testTerminalReadersGet2()
{
$this->expectsRequest('get', '/v1/terminal/readers/tmr_xxxxxxxxxxxxx');
$result = $this->client->terminal->readers->retrieve(
@@ -3445,30 +3333,28 @@ public function testRetrieveReader()
static::assertInstanceOf(\Stripe\Terminal\Reader::class, $result);
}
- public function testUpdateReader()
+ public function testTerminalReadersPost()
{
- $this->expectsRequest('post', '/v1/terminal/readers/tmr_xxxxxxxxxxxxx');
- $result = $this->client->terminal->readers->update(
- 'tmr_xxxxxxxxxxxxx',
- ['label' => 'Blue Rabbit']
- );
+ $this->expectsRequest('post', '/v1/terminal/readers');
+ $result = $this->client->terminal->readers->create([
+ 'registration_code' => 'puppies-plug-could',
+ 'label' => 'Blue Rabbit',
+ 'location' => 'tml_1234',
+ ]);
static::assertInstanceOf(\Stripe\Terminal\Reader::class, $result);
}
- public function testCancelActionReader()
+ public function testTerminalReadersPost2()
{
- $this->expectsRequest(
- 'post',
- '/v1/terminal/readers/tmr_xxxxxxxxxxxxx/cancel_action'
- );
- $result = $this->client->terminal->readers->cancelAction(
+ $this->expectsRequest('post', '/v1/terminal/readers/tmr_xxxxxxxxxxxxx');
+ $result = $this->client->terminal->readers->update(
'tmr_xxxxxxxxxxxxx',
- []
+ ['label' => 'Blue Rabbit']
);
static::assertInstanceOf(\Stripe\Terminal\Reader::class, $result);
}
- public function testProcessPaymentIntentReader()
+ public function testTerminalReadersProcessPaymentIntentPost()
{
$this->expectsRequest(
'post',
@@ -3481,7 +3367,7 @@ public function testProcessPaymentIntentReader()
static::assertInstanceOf(\Stripe\Terminal\Reader::class, $result);
}
- public function testProcessSetupIntentReader()
+ public function testTerminalReadersProcessSetupIntentPost()
{
$this->expectsRequest(
'post',
@@ -3497,1082 +3383,1196 @@ public function testProcessSetupIntentReader()
static::assertInstanceOf(\Stripe\Terminal\Reader::class, $result);
}
- public function testListTestClock2()
- {
- $this->expectsRequest('get', '/v1/test_helpers/test_clocks');
- $result = $this->client->testHelpers->testClocks->all(['limit' => 3]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\TestHelpers\TestClock::class, $result->data[0]);
- }
-
- public function testCreateTestClock2()
- {
- $this->expectsRequest('post', '/v1/test_helpers/test_clocks');
- $result = $this->client->testHelpers->testClocks->create([
- 'frozen_time' => 1577836800,
- ]);
- static::assertInstanceOf(\Stripe\TestHelpers\TestClock::class, $result);
- }
-
- public function testDeleteTestClock2()
+ public function testTestHelpersCustomersFundCashBalancePost()
{
$this->expectsRequest(
- 'delete',
- '/v1/test_helpers/test_clocks/clock_xxxxxxxxxxxxx'
+ 'post',
+ '/v1/test_helpers/customers/cus_123/fund_cash_balance'
);
- $result = $this->client->testHelpers->testClocks->delete(
- 'clock_xxxxxxxxxxxxx',
- []
+ $result = $this->client->testHelpers->customers->fundCashBalance(
+ 'cus_123',
+ [
+ 'amount' => 30,
+ 'currency' => 'eur',
+ ]
);
- static::assertInstanceOf(\Stripe\TestHelpers\TestClock::class, $result);
+ static::assertInstanceOf(\Stripe\CustomerCashBalanceTransaction::class, $result);
}
- public function testRetrieveTestClock2()
+ public function testTestHelpersIssuingAuthorizationsCapturePost()
{
$this->expectsRequest(
- 'get',
- '/v1/test_helpers/test_clocks/clock_xxxxxxxxxxxxx'
+ 'post',
+ '/v1/test_helpers/issuing/authorizations/example_authorization/capture'
);
- $result = $this->client->testHelpers->testClocks->retrieve(
- 'clock_xxxxxxxxxxxxx',
- []
+ $result = $this->client->testHelpers->issuing->authorizations->capture(
+ 'example_authorization',
+ [
+ 'capture_amount' => 100,
+ 'close_authorization' => true,
+ 'purchase_details' => [
+ 'flight' => [
+ 'departure_at' => 1633651200,
+ 'passenger_name' => 'John Doe',
+ 'refundable' => true,
+ 'segments' => [
+ [
+ 'arrival_airport_code' => 'SFO',
+ 'carrier' => 'Delta',
+ 'departure_airport_code' => 'LAX',
+ 'flight_number' => 'DL100',
+ 'service_class' => 'Economy',
+ 'stopover_allowed' => true,
+ ],
+ ],
+ 'travel_agency' => 'Orbitz',
+ ],
+ 'fuel' => [
+ 'type' => 'diesel',
+ 'unit' => 'liter',
+ 'unit_cost_decimal' => '3.5',
+ 'volume_decimal' => '10',
+ ],
+ 'lodging' => [
+ 'check_in_at' => 1633651200,
+ 'nights' => 2,
+ ],
+ 'receipt' => [
+ [
+ 'description' => 'Room charge',
+ 'quantity' => '1',
+ 'total' => 200,
+ 'unit_cost' => 200,
+ ],
+ ],
+ 'reference' => 'foo',
+ ],
+ ]
);
- static::assertInstanceOf(\Stripe\TestHelpers\TestClock::class, $result);
+ static::assertInstanceOf(\Stripe\Issuing\Authorization::class, $result);
}
- public function testAdvanceTestClock2()
+ public function testTestHelpersIssuingAuthorizationsExpirePost()
{
$this->expectsRequest(
'post',
- '/v1/test_helpers/test_clocks/clock_xxxxxxxxxxxxx/advance'
+ '/v1/test_helpers/issuing/authorizations/example_authorization/expire'
);
- $result = $this->client->testHelpers->testClocks->advance(
- 'clock_xxxxxxxxxxxxx',
- ['frozen_time' => 1675552261]
+ $result = $this->client->testHelpers->issuing->authorizations->expire(
+ 'example_authorization',
+ []
);
- static::assertInstanceOf(\Stripe\TestHelpers\TestClock::class, $result);
- }
-
- public function testCreateToken2()
- {
- $this->expectsRequest('post', '/v1/tokens');
- $result = $this->client->tokens->create([
- 'bank_account' => [
- 'country' => 'US',
- 'currency' => 'usd',
- 'account_holder_name' => 'Jenny Rosen',
- 'account_holder_type' => 'individual',
- 'routing_number' => '110000000',
- 'account_number' => '000123456789',
- ],
- ]);
- static::assertInstanceOf(\Stripe\Token::class, $result);
+ static::assertInstanceOf(\Stripe\Issuing\Authorization::class, $result);
}
- public function testCreateToken3()
+ public function testTestHelpersIssuingAuthorizationsIncrementPost()
{
- $this->expectsRequest('post', '/v1/tokens');
- $result = $this->client->tokens->create([
- 'pii' => ['id_number' => '000000000'],
- ]);
- static::assertInstanceOf(\Stripe\Token::class, $result);
+ $this->expectsRequest(
+ 'post',
+ '/v1/test_helpers/issuing/authorizations/example_authorization/increment'
+ );
+ $result = $this->client->testHelpers->issuing->authorizations->increment(
+ 'example_authorization',
+ [
+ 'increment_amount' => 50,
+ 'is_amount_controllable' => true,
+ ]
+ );
+ static::assertInstanceOf(\Stripe\Issuing\Authorization::class, $result);
}
- public function testCreateToken4()
+ public function testTestHelpersIssuingAuthorizationsPost()
{
- $this->expectsRequest('post', '/v1/tokens');
- $result = $this->client->tokens->create([
- 'account' => [
- 'individual' => [
- 'first_name' => 'Jane',
- 'last_name' => 'Doe',
- ],
- 'tos_shown_and_accepted' => true,
+ $this->expectsRequest(
+ 'post',
+ '/v1/test_helpers/issuing/authorizations'
+ );
+ $result = $this->client->testHelpers->issuing->authorizations->create([
+ 'amount' => 100,
+ 'amount_details' => [
+ 'atm_fee' => 10,
+ 'cashback_amount' => 5,
],
- ]);
- static::assertInstanceOf(\Stripe\Token::class, $result);
- }
-
- public function testCreateToken5()
- {
- $this->expectsRequest('post', '/v1/tokens');
- $result = $this->client->tokens->create([
- 'person' => [
- 'first_name' => 'Jane',
- 'last_name' => 'Doe',
- 'relationship' => ['owner' => true],
+ 'authorization_method' => 'chip',
+ 'card' => 'foo',
+ 'currency' => 'usd',
+ 'is_amount_controllable' => true,
+ 'merchant_data' => [
+ 'category' => 'ac_refrigeration_repair',
+ 'city' => 'foo',
+ 'country' => 'bar',
+ 'name' => 'foo',
+ 'network_id' => 'bar',
+ 'postal_code' => 'foo',
+ 'state' => 'bar',
+ 'terminal_id' => 'foo',
],
+ 'network_data' => ['acquiring_institution_id' => 'foo'],
+ 'verification_data' => [
+ 'address_line1_check' => 'mismatch',
+ 'address_postal_code_check' => 'match',
+ 'cvc_check' => 'match',
+ 'expiry_check' => 'mismatch',
+ ],
+ 'wallet' => 'apple_pay',
]);
- static::assertInstanceOf(\Stripe\Token::class, $result);
- }
-
- public function testCreateToken6()
- {
- $this->expectsRequest('post', '/v1/tokens');
- $result = $this->client->tokens->create([
- 'cvc_update' => ['cvc' => '123'],
- ]);
- static::assertInstanceOf(\Stripe\Token::class, $result);
- }
-
- public function testRetrieveToken()
- {
- $this->expectsRequest('get', '/v1/tokens/tok_xxxx');
- $result = $this->client->tokens->retrieve('tok_xxxx', []);
- static::assertInstanceOf(\Stripe\Token::class, $result);
- }
-
- public function testListTopup()
- {
- $this->expectsRequest('get', '/v1/topups');
- $result = $this->client->topups->all(['limit' => 3]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Topup::class, $result->data[0]);
+ static::assertInstanceOf(\Stripe\Issuing\Authorization::class, $result);
}
- public function testCreateTopup()
+ public function testTestHelpersIssuingAuthorizationsReversePost()
{
- $this->expectsRequest('post', '/v1/topups');
- $result = $this->client->topups->create([
- 'amount' => 2000,
- 'currency' => 'usd',
- 'description' => 'Top-up for Jenny Rosen',
- 'statement_descriptor' => 'Top-up',
- ]);
- static::assertInstanceOf(\Stripe\Topup::class, $result);
+ $this->expectsRequest(
+ 'post',
+ '/v1/test_helpers/issuing/authorizations/example_authorization/reverse'
+ );
+ $result = $this->client->testHelpers->issuing->authorizations->reverse(
+ 'example_authorization',
+ ['reverse_amount' => 20]
+ );
+ static::assertInstanceOf(\Stripe\Issuing\Authorization::class, $result);
}
- public function testRetrieveTopup()
+ public function testTestHelpersIssuingCardsShippingDeliverPost()
{
- $this->expectsRequest('get', '/v1/topups/tu_xxxxxxxxxxxxx');
- $result = $this->client->topups->retrieve('tu_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\Topup::class, $result);
+ $this->expectsRequest(
+ 'post',
+ '/v1/test_helpers/issuing/cards/card_123/shipping/deliver'
+ );
+ $result = $this->client->testHelpers->issuing->cards->deliverCard(
+ 'card_123',
+ []
+ );
+ static::assertInstanceOf(\Stripe\Issuing\Card::class, $result);
}
- public function testUpdateTopup()
+ public function testTestHelpersIssuingCardsShippingFailPost()
{
- $this->expectsRequest('post', '/v1/topups/tu_xxxxxxxxxxxxx');
- $result = $this->client->topups->update(
- 'tu_xxxxxxxxxxxxx',
- ['metadata' => ['order_id' => '6735']]
+ $this->expectsRequest(
+ 'post',
+ '/v1/test_helpers/issuing/cards/card_123/shipping/fail'
);
- static::assertInstanceOf(\Stripe\Topup::class, $result);
+ $result = $this->client->testHelpers->issuing->cards->failCard(
+ 'card_123',
+ []
+ );
+ static::assertInstanceOf(\Stripe\Issuing\Card::class, $result);
}
- public function testCancelTopup()
+ public function testTestHelpersIssuingCardsShippingReturnPost()
{
- $this->expectsRequest('post', '/v1/topups/tu_xxxxxxxxxxxxx/cancel');
- $result = $this->client->topups->cancel('tu_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\Topup::class, $result);
+ $this->expectsRequest(
+ 'post',
+ '/v1/test_helpers/issuing/cards/card_123/shipping/return'
+ );
+ $result = $this->client->testHelpers->issuing->cards->returnCard(
+ 'card_123',
+ []
+ );
+ static::assertInstanceOf(\Stripe\Issuing\Card::class, $result);
}
- public function testListTransfer()
+ public function testTestHelpersIssuingCardsShippingShipPost()
{
- $this->expectsRequest('get', '/v1/transfers');
- $result = $this->client->transfers->all(['limit' => 3]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Transfer::class, $result->data[0]);
+ $this->expectsRequest(
+ 'post',
+ '/v1/test_helpers/issuing/cards/card_123/shipping/ship'
+ );
+ $result = $this->client->testHelpers->issuing->cards->shipCard(
+ 'card_123',
+ []
+ );
+ static::assertInstanceOf(\Stripe\Issuing\Card::class, $result);
}
- public function testCreateTransfer()
+ public function testTestHelpersIssuingTransactionsCreateForceCapturePost()
{
- $this->expectsRequest('post', '/v1/transfers');
- $result = $this->client->transfers->create([
- 'amount' => 400,
- 'currency' => 'usd',
- 'destination' => 'acct_xxxxxxxxxxxxx',
- 'transfer_group' => 'ORDER_95',
- ]);
- static::assertInstanceOf(\Stripe\Transfer::class, $result);
+ $this->expectsRequest(
+ 'post',
+ '/v1/test_helpers/issuing/transactions/create_force_capture'
+ );
+ $result = $this->client->testHelpers->issuing->transactions->createForceCapture([
+ 'amount' => 100,
+ 'card' => 'foo',
+ 'currency' => 'usd',
+ 'merchant_data' => [
+ 'category' => 'ac_refrigeration_repair',
+ 'city' => 'foo',
+ 'country' => 'US',
+ 'name' => 'foo',
+ 'network_id' => 'bar',
+ 'postal_code' => '10001',
+ 'state' => 'NY',
+ 'terminal_id' => 'foo',
+ ],
+ 'purchase_details' => [
+ 'flight' => [
+ 'departure_at' => 1633651200,
+ 'passenger_name' => 'John Doe',
+ 'refundable' => true,
+ 'segments' => [
+ [
+ 'arrival_airport_code' => 'SFO',
+ 'carrier' => 'Delta',
+ 'departure_airport_code' => 'LAX',
+ 'flight_number' => 'DL100',
+ 'service_class' => 'Economy',
+ 'stopover_allowed' => true,
+ ],
+ ],
+ 'travel_agency' => 'Orbitz',
+ ],
+ 'fuel' => [
+ 'type' => 'diesel',
+ 'unit' => 'liter',
+ 'unit_cost_decimal' => '3.5',
+ 'volume_decimal' => '10',
+ ],
+ 'lodging' => [
+ 'check_in_at' => 1533651200,
+ 'nights' => 2,
+ ],
+ 'receipt' => [
+ [
+ 'description' => 'Room charge',
+ 'quantity' => '1',
+ 'total' => 200,
+ 'unit_cost' => 200,
+ ],
+ ],
+ 'reference' => 'foo',
+ ],
+ ]);
+ static::assertInstanceOf(\Stripe\Issuing\Transaction::class, $result);
}
- public function testRetrieveTransfer()
+ public function testTestHelpersIssuingTransactionsCreateUnlinkedRefundPost()
{
- $this->expectsRequest('get', '/v1/transfers/tr_xxxxxxxxxxxxx');
- $result = $this->client->transfers->retrieve('tr_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\Transfer::class, $result);
+ $this->expectsRequest(
+ 'post',
+ '/v1/test_helpers/issuing/transactions/create_unlinked_refund'
+ );
+ $result = $this->client->testHelpers->issuing->transactions->createUnlinkedRefund([
+ 'amount' => 100,
+ 'card' => 'foo',
+ 'currency' => 'usd',
+ 'merchant_data' => [
+ 'category' => 'ac_refrigeration_repair',
+ 'city' => 'foo',
+ 'country' => 'bar',
+ 'name' => 'foo',
+ 'network_id' => 'bar',
+ 'postal_code' => 'foo',
+ 'state' => 'bar',
+ 'terminal_id' => 'foo',
+ ],
+ 'purchase_details' => [
+ 'flight' => [
+ 'departure_at' => 1533651200,
+ 'passenger_name' => 'John Doe',
+ 'refundable' => true,
+ 'segments' => [
+ [
+ 'arrival_airport_code' => 'SFO',
+ 'carrier' => 'Delta',
+ 'departure_airport_code' => 'LAX',
+ 'flight_number' => 'DL100',
+ 'service_class' => 'Economy',
+ 'stopover_allowed' => true,
+ ],
+ ],
+ 'travel_agency' => 'Orbitz',
+ ],
+ 'fuel' => [
+ 'type' => 'diesel',
+ 'unit' => 'liter',
+ 'unit_cost_decimal' => '3.5',
+ 'volume_decimal' => '10',
+ ],
+ 'lodging' => [
+ 'check_in_at' => 1533651200,
+ 'nights' => 2,
+ ],
+ 'receipt' => [
+ [
+ 'description' => 'Room charge',
+ 'quantity' => '1',
+ 'total' => 200,
+ 'unit_cost' => 200,
+ ],
+ ],
+ 'reference' => 'foo',
+ ],
+ ]);
+ static::assertInstanceOf(\Stripe\Issuing\Transaction::class, $result);
}
- public function testUpdateTransfer()
+ public function testTestHelpersIssuingTransactionsRefundPost()
{
- $this->expectsRequest('post', '/v1/transfers/tr_xxxxxxxxxxxxx');
- $result = $this->client->transfers->update(
- 'tr_xxxxxxxxxxxxx',
- ['metadata' => ['order_id' => '6735']]
+ $this->expectsRequest(
+ 'post',
+ '/v1/test_helpers/issuing/transactions/example_transaction/refund'
);
- static::assertInstanceOf(\Stripe\Transfer::class, $result);
+ $result = $this->client->testHelpers->issuing->transactions->refund(
+ 'example_transaction',
+ ['refund_amount' => 50]
+ );
+ static::assertInstanceOf(\Stripe\Issuing\Transaction::class, $result);
+ }
+
+ public function testTestHelpersRefundsExpirePost()
+ {
+ $this->expectsRequest('post', '/v1/test_helpers/refunds/re_123/expire');
+ $result = $this->client->testHelpers->refunds->expire('re_123', []);
+ static::assertInstanceOf(\Stripe\Refund::class, $result);
}
- public function testListTransferReversal()
+ public function testTestHelpersTestClocksAdvancePost()
{
$this->expectsRequest(
- 'get',
- '/v1/transfers/tr_xxxxxxxxxxxxx/reversals'
+ 'post',
+ '/v1/test_helpers/test_clocks/clock_xyz/advance'
);
- $result = $this->client->transfers->allReversals(
- 'tr_xxxxxxxxxxxxx',
- ['limit' => 3]
+ $result = $this->client->testHelpers->testClocks->advance(
+ 'clock_xyz',
+ ['frozen_time' => 142]
);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\TransferReversal::class, $result->data[0]);
+ static::assertInstanceOf(\Stripe\TestHelpers\TestClock::class, $result);
}
- public function testCreateTransferReversal()
+ public function testTestHelpersTestClocksAdvancePost2()
{
$this->expectsRequest(
'post',
- '/v1/transfers/tr_xxxxxxxxxxxxx/reversals'
+ '/v1/test_helpers/test_clocks/clock_xxxxxxxxxxxxx/advance'
);
- $result = $this->client->transfers->createReversal(
- 'tr_xxxxxxxxxxxxx',
- ['amount' => 100]
+ $result = $this->client->testHelpers->testClocks->advance(
+ 'clock_xxxxxxxxxxxxx',
+ ['frozen_time' => 1675552261]
);
- static::assertInstanceOf(\Stripe\TransferReversal::class, $result);
+ static::assertInstanceOf(\Stripe\TestHelpers\TestClock::class, $result);
}
- public function testRetrieveTransferReversal()
+ public function testTestHelpersTestClocksDelete()
{
$this->expectsRequest(
- 'get',
- '/v1/transfers/tr_xxxxxxxxxxxxx/reversals/trr_xxxxxxxxxxxxx'
+ 'delete',
+ '/v1/test_helpers/test_clocks/clock_xyz'
);
- $result = $this->client->transfers->retrieveReversal(
- 'tr_xxxxxxxxxxxxx',
- 'trr_xxxxxxxxxxxxx',
+ $result = $this->client->testHelpers->testClocks->delete(
+ 'clock_xyz',
[]
);
- static::assertInstanceOf(\Stripe\TransferReversal::class, $result);
+ static::assertInstanceOf(\Stripe\TestHelpers\TestClock::class, $result);
}
- public function testUpdateTransferReversal()
+ public function testTestHelpersTestClocksDelete2()
{
$this->expectsRequest(
- 'post',
- '/v1/transfers/tr_xxxxxxxxxxxxx/reversals/trr_xxxxxxxxxxxxx'
+ 'delete',
+ '/v1/test_helpers/test_clocks/clock_xxxxxxxxxxxxx'
);
- $result = $this->client->transfers->updateReversal(
- 'tr_xxxxxxxxxxxxx',
- 'trr_xxxxxxxxxxxxx',
- ['metadata' => ['order_id' => '6735']]
+ $result = $this->client->testHelpers->testClocks->delete(
+ 'clock_xxxxxxxxxxxxx',
+ []
);
- static::assertInstanceOf(\Stripe\TransferReversal::class, $result);
+ static::assertInstanceOf(\Stripe\TestHelpers\TestClock::class, $result);
}
- public function testListCreditReversal()
+ public function testTestHelpersTestClocksGet()
{
- $this->expectsRequest('get', '/v1/treasury/credit_reversals');
- $result = $this->client->treasury->creditReversals->all([
- 'financial_account' => 'fa_xxxxxxxxxxxxx',
- 'limit' => 3,
- ]);
+ $this->expectsRequest('get', '/v1/test_helpers/test_clocks');
+ $result = $this->client->testHelpers->testClocks->all([]);
static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Treasury\CreditReversal::class, $result->data[0]);
- }
-
- public function testCreateCreditReversal()
- {
- $this->expectsRequest('post', '/v1/treasury/credit_reversals');
- $result = $this->client->treasury->creditReversals->create([
- 'received_credit' => 'rc_xxxxxxxxxxxxx',
- ]);
- static::assertInstanceOf(\Stripe\Treasury\CreditReversal::class, $result);
+ static::assertInstanceOf(\Stripe\TestHelpers\TestClock::class, $result->data[0]);
}
- public function testRetrieveCreditReversal()
+ public function testTestHelpersTestClocksGet2()
{
- $this->expectsRequest(
- 'get',
- '/v1/treasury/credit_reversals/credrev_xxxxxxxxxxxxx'
- );
- $result = $this->client->treasury->creditReversals->retrieve(
- 'credrev_xxxxxxxxxxxxx',
+ $this->expectsRequest('get', '/v1/test_helpers/test_clocks/clock_xyz');
+ $result = $this->client->testHelpers->testClocks->retrieve(
+ 'clock_xyz',
[]
);
- static::assertInstanceOf(\Stripe\Treasury\CreditReversal::class, $result);
+ static::assertInstanceOf(\Stripe\TestHelpers\TestClock::class, $result);
}
- public function testListDebitReversal()
+ public function testTestHelpersTestClocksGet3()
{
- $this->expectsRequest('get', '/v1/treasury/debit_reversals');
- $result = $this->client->treasury->debitReversals->all([
- 'financial_account' => 'fa_xxxxxxxxxxxxx',
- 'limit' => 3,
- ]);
+ $this->expectsRequest('get', '/v1/test_helpers/test_clocks');
+ $result = $this->client->testHelpers->testClocks->all(['limit' => 3]);
static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Treasury\DebitReversal::class, $result->data[0]);
- }
-
- public function testCreateDebitReversal()
- {
- $this->expectsRequest('post', '/v1/treasury/debit_reversals');
- $result = $this->client->treasury->debitReversals->create([
- 'received_debit' => 'rd_xxxxxxxxxxxxx',
- ]);
- static::assertInstanceOf(\Stripe\Treasury\DebitReversal::class, $result);
+ static::assertInstanceOf(\Stripe\TestHelpers\TestClock::class, $result->data[0]);
}
- public function testRetrieveDebitReversal()
+ public function testTestHelpersTestClocksGet4()
{
$this->expectsRequest(
'get',
- '/v1/treasury/debit_reversals/debrev_xxxxxxxxxxxxx'
+ '/v1/test_helpers/test_clocks/clock_xxxxxxxxxxxxx'
);
- $result = $this->client->treasury->debitReversals->retrieve(
- 'debrev_xxxxxxxxxxxxx',
+ $result = $this->client->testHelpers->testClocks->retrieve(
+ 'clock_xxxxxxxxxxxxx',
[]
);
- static::assertInstanceOf(\Stripe\Treasury\DebitReversal::class, $result);
+ static::assertInstanceOf(\Stripe\TestHelpers\TestClock::class, $result);
}
- public function testListFinancialAccount()
+ public function testTestHelpersTestClocksPost()
{
- $this->expectsRequest('get', '/v1/treasury/financial_accounts');
- $result = $this->client->treasury->financialAccounts->all([
- 'limit' => 3,
+ $this->expectsRequest('post', '/v1/test_helpers/test_clocks');
+ $result = $this->client->testHelpers->testClocks->create([
+ 'frozen_time' => 123,
+ 'name' => 'cogsworth',
]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Treasury\FinancialAccount::class, $result->data[0]);
+ static::assertInstanceOf(\Stripe\TestHelpers\TestClock::class, $result);
}
- public function testCreateFinancialAccount()
+ public function testTestHelpersTestClocksPost2()
{
- $this->expectsRequest('post', '/v1/treasury/financial_accounts');
- $result = $this->client->treasury->financialAccounts->create([
- 'supported_currencies' => ['usd'],
- 'features' => [],
+ $this->expectsRequest('post', '/v1/test_helpers/test_clocks');
+ $result = $this->client->testHelpers->testClocks->create([
+ 'frozen_time' => 1577836800,
]);
- static::assertInstanceOf(\Stripe\Treasury\FinancialAccount::class, $result);
+ static::assertInstanceOf(\Stripe\TestHelpers\TestClock::class, $result);
}
- public function testRetrieveFinancialAccount()
+ public function testTestHelpersTreasuryInboundTransfersFailPost()
{
$this->expectsRequest(
- 'get',
- '/v1/treasury/financial_accounts/fa_xxxxxxxxxxxxx'
+ 'post',
+ '/v1/test_helpers/treasury/inbound_transfers/ibt_123/fail'
);
- $result = $this->client->treasury->financialAccounts->retrieve(
- 'fa_xxxxxxxxxxxxx',
- []
+ $result = $this->client->testHelpers->treasury->inboundTransfers->fail(
+ 'ibt_123',
+ ['failure_details' => ['code' => 'account_closed']]
);
- static::assertInstanceOf(\Stripe\Treasury\FinancialAccount::class, $result);
+ static::assertInstanceOf(\Stripe\Treasury\InboundTransfer::class, $result);
}
- public function testUpdateFinancialAccount()
+ public function testTestHelpersTreasuryInboundTransfersReturnPost()
{
$this->expectsRequest(
'post',
- '/v1/treasury/financial_accounts/fa_xxxxxxxxxxxxx'
+ '/v1/test_helpers/treasury/inbound_transfers/ibt_123/return'
);
- $result = $this->client->treasury->financialAccounts->update(
- 'fa_xxxxxxxxxxxxx',
- ['metadata' => ['order_id' => '6735']]
+ $result = $this->client->testHelpers->treasury->inboundTransfers->returnInboundTransfer(
+ 'ibt_123',
+ []
);
- static::assertInstanceOf(\Stripe\Treasury\FinancialAccount::class, $result);
+ static::assertInstanceOf(\Stripe\Treasury\InboundTransfer::class, $result);
}
- public function testRetrieveFeaturesFinancialAccount()
+ public function testTestHelpersTreasuryInboundTransfersSucceedPost()
{
$this->expectsRequest(
- 'get',
- '/v1/treasury/financial_accounts/fa_xxxxxxxxxxxxx/features'
+ 'post',
+ '/v1/test_helpers/treasury/inbound_transfers/ibt_123/succeed'
);
- $result = $this->client->treasury->financialAccounts->retrieveFeatures(
- 'fa_xxxxxxxxxxxxx',
+ $result = $this->client->testHelpers->treasury->inboundTransfers->succeed(
+ 'ibt_123',
[]
);
- static::assertInstanceOf(\Stripe\Treasury\FinancialAccountFeatures::class, $result);
- }
-
- public function testListInboundTransfer()
- {
- $this->expectsRequest('get', '/v1/treasury/inbound_transfers');
- $result = $this->client->treasury->inboundTransfers->all([
- 'financial_account' => 'fa_xxxxxxxxxxxxx',
- 'limit' => 3,
- ]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Treasury\InboundTransfer::class, $result->data[0]);
- }
-
- public function testCreateInboundTransfer()
- {
- $this->expectsRequest('post', '/v1/treasury/inbound_transfers');
- $result = $this->client->treasury->inboundTransfers->create([
- 'financial_account' => 'fa_xxxxxxxxxxxxx',
- 'amount' => 10000,
- 'currency' => 'usd',
- 'origin_payment_method' => 'pm_xxxxxxxxxxxxx',
- 'description' => 'InboundTransfer from my bank account',
- ]);
static::assertInstanceOf(\Stripe\Treasury\InboundTransfer::class, $result);
}
- public function testRetrieveInboundTransfer()
+ public function testTestHelpersTreasuryOutboundTransfersFailPost()
{
$this->expectsRequest(
- 'get',
- '/v1/treasury/inbound_transfers/ibt_xxxxxxxxxxxxx'
+ 'post',
+ '/v1/test_helpers/treasury/outbound_transfers/obt_123/fail'
);
- $result = $this->client->treasury->inboundTransfers->retrieve(
- 'ibt_xxxxxxxxxxxxx',
+ $result = $this->client->testHelpers->treasury->outboundTransfers->fail(
+ 'obt_123',
[]
);
- static::assertInstanceOf(\Stripe\Treasury\InboundTransfer::class, $result);
+ static::assertInstanceOf(\Stripe\Treasury\OutboundTransfer::class, $result);
}
- public function testCancelInboundTransfer()
+ public function testTestHelpersTreasuryOutboundTransfersPostPost()
{
$this->expectsRequest(
'post',
- '/v1/treasury/inbound_transfers/ibt_xxxxxxxxxxxxx/cancel'
+ '/v1/test_helpers/treasury/outbound_transfers/obt_123/post'
);
- $result = $this->client->treasury->inboundTransfers->cancel(
- 'ibt_xxxxxxxxxxxxx',
+ $result = $this->client->testHelpers->treasury->outboundTransfers->post(
+ 'obt_123',
[]
);
- static::assertInstanceOf(\Stripe\Treasury\InboundTransfer::class, $result);
- }
-
- public function testListOutboundPayment()
- {
- $this->expectsRequest('get', '/v1/treasury/outbound_payments');
- $result = $this->client->treasury->outboundPayments->all([
- 'financial_account' => 'fa_xxxxxxxxxxxxx',
- 'limit' => 3,
- ]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Treasury\OutboundPayment::class, $result->data[0]);
+ static::assertInstanceOf(\Stripe\Treasury\OutboundTransfer::class, $result);
}
- public function testCreateOutboundPayment()
+ public function testTestHelpersTreasuryOutboundTransfersReturnPost()
{
- $this->expectsRequest('post', '/v1/treasury/outbound_payments');
- $result = $this->client->treasury->outboundPayments->create([
- 'financial_account' => 'fa_xxxxxxxxxxxxx',
- 'amount' => 10000,
- 'currency' => 'usd',
- 'customer' => 'cus_xxxxxxxxxxxxx',
- 'destination_payment_method' => 'pm_xxxxxxxxxxxxx',
- 'description' => 'OutboundPayment to a 3rd party',
- ]);
- static::assertInstanceOf(\Stripe\Treasury\OutboundPayment::class, $result);
+ $this->expectsRequest(
+ 'post',
+ '/v1/test_helpers/treasury/outbound_transfers/obt_123/return'
+ );
+ $result = $this->client->testHelpers->treasury->outboundTransfers->returnOutboundTransfer(
+ 'obt_123',
+ ['returned_details' => ['code' => 'account_closed']]
+ );
+ static::assertInstanceOf(\Stripe\Treasury\OutboundTransfer::class, $result);
}
- public function testRetrieveOutboundPayment()
+ public function testTestHelpersTreasuryReceivedCreditsPost()
{
$this->expectsRequest(
- 'get',
- '/v1/treasury/outbound_payments/bot_xxxxxxxxxxxxx'
- );
- $result = $this->client->treasury->outboundPayments->retrieve(
- 'bot_xxxxxxxxxxxxx',
- []
+ 'post',
+ '/v1/test_helpers/treasury/received_credits'
);
- static::assertInstanceOf(\Stripe\Treasury\OutboundPayment::class, $result);
+ $result = $this->client->testHelpers->treasury->receivedCredits->create([
+ 'financial_account' => 'fa_123',
+ 'network' => 'ach',
+ 'amount' => 1234,
+ 'currency' => 'usd',
+ ]);
+ static::assertInstanceOf(\Stripe\Treasury\ReceivedCredit::class, $result);
}
- public function testCancelOutboundPayment()
+ public function testTestHelpersTreasuryReceivedDebitsPost()
{
$this->expectsRequest(
'post',
- '/v1/treasury/outbound_payments/bot_xxxxxxxxxxxxx/cancel'
- );
- $result = $this->client->treasury->outboundPayments->cancel(
- 'bot_xxxxxxxxxxxxx',
- []
+ '/v1/test_helpers/treasury/received_debits'
);
- static::assertInstanceOf(\Stripe\Treasury\OutboundPayment::class, $result);
+ $result = $this->client->testHelpers->treasury->receivedDebits->create([
+ 'financial_account' => 'fa_123',
+ 'network' => 'ach',
+ 'amount' => 1234,
+ 'currency' => 'usd',
+ ]);
+ static::assertInstanceOf(\Stripe\Treasury\ReceivedDebit::class, $result);
}
- public function testListOutboundTransfer()
+ public function testTokensGet()
{
- $this->expectsRequest('get', '/v1/treasury/outbound_transfers');
- $result = $this->client->treasury->outboundTransfers->all([
- 'financial_account' => 'fa_xxxxxxxxxxxxx',
- 'limit' => 3,
- ]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Treasury\OutboundTransfer::class, $result->data[0]);
+ $this->expectsRequest('get', '/v1/tokens/tok_xxxx');
+ $result = $this->client->tokens->retrieve('tok_xxxx', []);
+ static::assertInstanceOf(\Stripe\Token::class, $result);
}
- public function testCreateOutboundTransfer()
+ public function testTokensPost()
{
- $this->expectsRequest('post', '/v1/treasury/outbound_transfers');
- $result = $this->client->treasury->outboundTransfers->create([
- 'financial_account' => 'fa_xxxxxxxxxxxxx',
- 'destination_payment_method' => 'pm_xxxxxxxxxxxxx',
- 'amount' => 500,
- 'currency' => 'usd',
- 'description' => 'OutboundTransfer to my external bank account',
+ $this->expectsRequest('post', '/v1/tokens');
+ $result = $this->client->tokens->create([
+ 'card' => [
+ 'number' => '4242424242424242',
+ 'exp_month' => '5',
+ 'exp_year' => '2023',
+ 'cvc' => '314',
+ ],
]);
- static::assertInstanceOf(\Stripe\Treasury\OutboundTransfer::class, $result);
+ static::assertInstanceOf(\Stripe\Token::class, $result);
}
- public function testRetrieveOutboundTransfer()
+ public function testTokensPost2()
{
- $this->expectsRequest(
- 'get',
- '/v1/treasury/outbound_transfers/obt_xxxxxxxxxxxxx'
- );
- $result = $this->client->treasury->outboundTransfers->retrieve(
- 'obt_xxxxxxxxxxxxx',
- []
- );
- static::assertInstanceOf(\Stripe\Treasury\OutboundTransfer::class, $result);
+ $this->expectsRequest('post', '/v1/tokens');
+ $result = $this->client->tokens->create([
+ 'bank_account' => [
+ 'country' => 'US',
+ 'currency' => 'usd',
+ 'account_holder_name' => 'Jenny Rosen',
+ 'account_holder_type' => 'individual',
+ 'routing_number' => '110000000',
+ 'account_number' => '000123456789',
+ ],
+ ]);
+ static::assertInstanceOf(\Stripe\Token::class, $result);
}
- public function testCancelOutboundTransfer()
+ public function testTokensPost3()
{
- $this->expectsRequest(
- 'post',
- '/v1/treasury/outbound_transfers/obt_xxxxxxxxxxxxx/cancel'
- );
- $result = $this->client->treasury->outboundTransfers->cancel(
- 'obt_xxxxxxxxxxxxx',
- []
- );
- static::assertInstanceOf(\Stripe\Treasury\OutboundTransfer::class, $result);
+ $this->expectsRequest('post', '/v1/tokens');
+ $result = $this->client->tokens->create([
+ 'pii' => ['id_number' => '000000000'],
+ ]);
+ static::assertInstanceOf(\Stripe\Token::class, $result);
}
- public function testListReceivedCredit()
+ public function testTokensPost4()
{
- $this->expectsRequest('get', '/v1/treasury/received_credits');
- $result = $this->client->treasury->receivedCredits->all([
- 'financial_account' => 'fa_xxxxxxxxxxxxx',
- 'limit' => 3,
+ $this->expectsRequest('post', '/v1/tokens');
+ $result = $this->client->tokens->create([
+ 'account' => [
+ 'individual' => [
+ 'first_name' => 'Jane',
+ 'last_name' => 'Doe',
+ ],
+ 'tos_shown_and_accepted' => true,
+ ],
]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Treasury\ReceivedCredit::class, $result->data[0]);
+ static::assertInstanceOf(\Stripe\Token::class, $result);
}
- public function testRetrieveReceivedCredit()
+ public function testTokensPost5()
{
- $this->expectsRequest(
- 'get',
- '/v1/treasury/received_credits/rc_xxxxxxxxxxxxx'
- );
- $result = $this->client->treasury->receivedCredits->retrieve(
- 'rc_xxxxxxxxxxxxx',
- []
- );
- static::assertInstanceOf(\Stripe\Treasury\ReceivedCredit::class, $result);
+ $this->expectsRequest('post', '/v1/tokens');
+ $result = $this->client->tokens->create([
+ 'person' => [
+ 'first_name' => 'Jane',
+ 'last_name' => 'Doe',
+ 'relationship' => ['owner' => true],
+ ],
+ ]);
+ static::assertInstanceOf(\Stripe\Token::class, $result);
}
- public function testListReceivedDebit()
+ public function testTokensPost6()
{
- $this->expectsRequest('get', '/v1/treasury/received_debits');
- $result = $this->client->treasury->receivedDebits->all([
- 'financial_account' => 'fa_xxxxxxxxxxxxx',
- 'limit' => 3,
+ $this->expectsRequest('post', '/v1/tokens');
+ $result = $this->client->tokens->create([
+ 'cvc_update' => ['cvc' => '123'],
]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Treasury\ReceivedDebit::class, $result->data[0]);
+ static::assertInstanceOf(\Stripe\Token::class, $result);
}
- public function testRetrieveReceivedDebit()
+ public function testTopupsCancelPost()
{
- $this->expectsRequest(
- 'get',
- '/v1/treasury/received_debits/rd_xxxxxxxxxxxxx'
- );
- $result = $this->client->treasury->receivedDebits->retrieve(
- 'rd_xxxxxxxxxxxxx',
- []
- );
- static::assertInstanceOf(\Stripe\Treasury\ReceivedDebit::class, $result);
+ $this->expectsRequest('post', '/v1/topups/tu_xxxxxxxxxxxxx/cancel');
+ $result = $this->client->topups->cancel('tu_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\Topup::class, $result);
}
- public function testListTransactionEntry()
+ public function testTopupsGet()
{
- $this->expectsRequest('get', '/v1/treasury/transaction_entries');
- $result = $this->client->treasury->transactionEntries->all([
- 'financial_account' => 'fa_xxxxxxxxxxxxx',
- 'limit' => 3,
- ]);
+ $this->expectsRequest('get', '/v1/topups');
+ $result = $this->client->topups->all(['limit' => 3]);
static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Treasury\TransactionEntry::class, $result->data[0]);
+ static::assertInstanceOf(\Stripe\Topup::class, $result->data[0]);
}
- public function testRetrieveTransactionEntry()
+ public function testTopupsGet2()
{
- $this->expectsRequest(
- 'get',
- '/v1/treasury/transaction_entries/trxne_xxxxxxxxxxxxx'
- );
- $result = $this->client->treasury->transactionEntries->retrieve(
- 'trxne_xxxxxxxxxxxxx',
- []
- );
- static::assertInstanceOf(\Stripe\Treasury\TransactionEntry::class, $result);
+ $this->expectsRequest('get', '/v1/topups/tu_xxxxxxxxxxxxx');
+ $result = $this->client->topups->retrieve('tu_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\Topup::class, $result);
}
- public function testListTransaction2()
+ public function testTopupsPost()
{
- $this->expectsRequest('get', '/v1/treasury/transactions');
- $result = $this->client->treasury->transactions->all([
- 'financial_account' => 'fa_xxxxxxxxxxxxx',
- 'limit' => 3,
+ $this->expectsRequest('post', '/v1/topups');
+ $result = $this->client->topups->create([
+ 'amount' => 2000,
+ 'currency' => 'usd',
+ 'description' => 'Top-up for Jenny Rosen',
+ 'statement_descriptor' => 'Top-up',
]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Treasury\Transaction::class, $result->data[0]);
+ static::assertInstanceOf(\Stripe\Topup::class, $result);
}
- public function testRetrieveTransaction2()
+ public function testTopupsPost2()
{
- $this->expectsRequest(
- 'get',
- '/v1/treasury/transactions/trxn_xxxxxxxxxxxxx'
- );
- $result = $this->client->treasury->transactions->retrieve(
- 'trxn_xxxxxxxxxxxxx',
- []
+ $this->expectsRequest('post', '/v1/topups/tu_xxxxxxxxxxxxx');
+ $result = $this->client->topups->update(
+ 'tu_xxxxxxxxxxxxx',
+ ['metadata' => ['order_id' => '6735']]
);
- static::assertInstanceOf(\Stripe\Treasury\Transaction::class, $result);
+ static::assertInstanceOf(\Stripe\Topup::class, $result);
}
- public function testListWebhookEndpoint()
+ public function testTransfersGet()
{
- $this->expectsRequest('get', '/v1/webhook_endpoints');
- $result = $this->client->webhookEndpoints->all(['limit' => 3]);
+ $this->expectsRequest('get', '/v1/transfers');
+ $result = $this->client->transfers->all(['limit' => 3]);
static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\WebhookEndpoint::class, $result->data[0]);
+ static::assertInstanceOf(\Stripe\Transfer::class, $result->data[0]);
}
- public function testDeleteWebhookEndpoint()
+ public function testTransfersGet2()
{
- $this->expectsRequest(
- 'delete',
- '/v1/webhook_endpoints/we_xxxxxxxxxxxxx'
- );
- $result = $this->client->webhookEndpoints->delete(
- 'we_xxxxxxxxxxxxx',
- []
+ $this->expectsRequest('get', '/v1/transfers/tr_xxxxxxxxxxxxx');
+ $result = $this->client->transfers->retrieve('tr_xxxxxxxxxxxxx', []);
+ static::assertInstanceOf(\Stripe\Transfer::class, $result);
+ }
+
+ public function testTransfersPost()
+ {
+ $this->expectsRequest('post', '/v1/transfers');
+ $result = $this->client->transfers->create([
+ 'amount' => 400,
+ 'currency' => 'usd',
+ 'destination' => 'acct_xxxxxxxxxxxxx',
+ 'transfer_group' => 'ORDER_95',
+ ]);
+ static::assertInstanceOf(\Stripe\Transfer::class, $result);
+ }
+
+ public function testTransfersPost2()
+ {
+ $this->expectsRequest('post', '/v1/transfers/tr_xxxxxxxxxxxxx');
+ $result = $this->client->transfers->update(
+ 'tr_xxxxxxxxxxxxx',
+ ['metadata' => ['order_id' => '6735']]
);
- static::assertInstanceOf(\Stripe\WebhookEndpoint::class, $result);
+ static::assertInstanceOf(\Stripe\Transfer::class, $result);
}
- public function testRetrieveWebhookEndpoint()
+ public function testTransfersReversalsGet()
{
- $this->expectsRequest('get', '/v1/webhook_endpoints/we_xxxxxxxxxxxxx');
- $result = $this->client->webhookEndpoints->retrieve(
- 'we_xxxxxxxxxxxxx',
- []
+ $this->expectsRequest(
+ 'get',
+ '/v1/transfers/tr_xxxxxxxxxxxxx/reversals'
);
- static::assertInstanceOf(\Stripe\WebhookEndpoint::class, $result);
+ $result = $this->client->transfers->allReversals(
+ 'tr_xxxxxxxxxxxxx',
+ ['limit' => 3]
+ );
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\TransferReversal::class, $result->data[0]);
}
- public function testUpdateWebhookEndpoint()
+ public function testTransfersReversalsGet2()
{
- $this->expectsRequest('post', '/v1/webhook_endpoints/we_xxxxxxxxxxxxx');
- $result = $this->client->webhookEndpoints->update(
- 'we_xxxxxxxxxxxxx',
- ['url' => 'https://example.com/new_endpoint']
+ $this->expectsRequest(
+ 'get',
+ '/v1/transfers/tr_xxxxxxxxxxxxx/reversals/trr_xxxxxxxxxxxxx'
);
- static::assertInstanceOf(\Stripe\WebhookEndpoint::class, $result);
+ $result = $this->client->transfers->retrieveReversal(
+ 'tr_xxxxxxxxxxxxx',
+ 'trr_xxxxxxxxxxxxx',
+ []
+ );
+ static::assertInstanceOf(\Stripe\TransferReversal::class, $result);
}
- public function testCreateFromCalculationTransaction()
+ public function testTransfersReversalsPost()
{
$this->expectsRequest(
'post',
- '/v1/tax/transactions/create_from_calculation'
+ '/v1/transfers/tr_xxxxxxxxxxxxx/reversals'
);
- $result = $this->client->tax->transactions->createFromCalculation([
- 'calculation' => 'xxx',
- 'reference' => 'yyy',
- ]);
- static::assertInstanceOf(\Stripe\Tax\Transaction::class, $result);
+ $result = $this->client->transfers->createReversal(
+ 'tr_xxxxxxxxxxxxx',
+ ['amount' => 100]
+ );
+ static::assertInstanceOf(\Stripe\TransferReversal::class, $result);
}
- public function testListLineItemsCalculation()
+ public function testTransfersReversalsPost2()
{
- $this->expectsRequest('get', '/v1/tax/calculations/xxx/line_items');
- $result = $this->client->tax->calculations->allLineItems('xxx', []);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\Tax\CalculationLineItem::class, $result->data[0]);
+ $this->expectsRequest(
+ 'post',
+ '/v1/transfers/tr_xxxxxxxxxxxxx/reversals/trr_xxxxxxxxxxxxx'
+ );
+ $result = $this->client->transfers->updateReversal(
+ 'tr_xxxxxxxxxxxxx',
+ 'trr_xxxxxxxxxxxxx',
+ ['metadata' => ['order_id' => '6735']]
+ );
+ static::assertInstanceOf(\Stripe\TransferReversal::class, $result);
}
- public function testCreatePaymentIntent3()
+ public function testTreasuryCreditReversalsGet()
{
- $this->expectsRequest('post', '/v1/payment_intents');
- $result = $this->client->paymentIntents->create([
- 'amount' => 200,
- 'currency' => 'usd',
- 'payment_method_data' => [
- 'type' => 'p24',
- 'p24' => ['bank' => 'blik'],
- ],
+ $this->expectsRequest('get', '/v1/treasury/credit_reversals');
+ $result = $this->client->treasury->creditReversals->all([
+ 'financial_account' => 'fa_xxxxxxxxxxxxx',
+ 'limit' => 3,
]);
- static::assertInstanceOf(\Stripe\PaymentIntent::class, $result);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\Treasury\CreditReversal::class, $result->data[0]);
}
- public function testListLineItemsQuote()
+ public function testTreasuryCreditReversalsGet2()
{
- $this->expectsRequest('get', '/v1/quotes/qt_xxxxxxxxxxxxx/line_items');
- $result = $this->client->quotes->allLineItems('qt_xxxxxxxxxxxxx', []);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\LineItem::class, $result->data[0]);
+ $this->expectsRequest(
+ 'get',
+ '/v1/treasury/credit_reversals/credrev_xxxxxxxxxxxxx'
+ );
+ $result = $this->client->treasury->creditReversals->retrieve(
+ 'credrev_xxxxxxxxxxxxx',
+ []
+ );
+ static::assertInstanceOf(\Stripe\Treasury\CreditReversal::class, $result);
}
- public function testCreateCalculation()
+ public function testTreasuryCreditReversalsPost()
{
- $this->expectsRequest('post', '/v1/tax/calculations');
- $result = $this->client->tax->calculations->create([
- 'currency' => 'usd',
- 'line_items' => [
- [
- 'amount' => 1000,
- 'reference' => 'L1',
- ],
- ],
- 'customer_details' => [
- 'address' => [
- 'line1' => '354 Oyster Point Blvd',
- 'city' => 'South San Francisco',
- 'state' => 'CA',
- 'postal_code' => '94080',
- 'country' => 'US',
- ],
- 'address_source' => 'shipping',
- ],
+ $this->expectsRequest('post', '/v1/treasury/credit_reversals');
+ $result = $this->client->treasury->creditReversals->create([
+ 'received_credit' => 'rc_xxxxxxxxxxxxx',
]);
- static::assertInstanceOf(\Stripe\Tax\Calculation::class, $result);
+ static::assertInstanceOf(\Stripe\Treasury\CreditReversal::class, $result);
}
- public function testPreviewLinesCreditNote()
+ public function testTreasuryDebitReversalsGet()
{
- $this->expectsRequest('get', '/v1/credit_notes/preview/lines');
- $result = $this->client->creditNotes->previewLines([
+ $this->expectsRequest('get', '/v1/treasury/debit_reversals');
+ $result = $this->client->treasury->debitReversals->all([
+ 'financial_account' => 'fa_xxxxxxxxxxxxx',
'limit' => 3,
- 'invoice' => 'in_xxxxxxxxxxxxx',
]);
static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\CreditNoteLineItem::class, $result->data[0]);
+ static::assertInstanceOf(\Stripe\Treasury\DebitReversal::class, $result->data[0]);
}
- public function testPdfQuote()
+ public function testTreasuryDebitReversalsGet2()
{
- $this->expectsRequestStream('get', '/v1/quotes/qt_xxxxxxxxxxxxx/pdf');
- $result = $this->client->quotes->pdf(
- 'qt_xxxxxxxxxxxxx',
- function () {},
+ $this->expectsRequest(
+ 'get',
+ '/v1/treasury/debit_reversals/debrev_xxxxxxxxxxxxx'
+ );
+ $result = $this->client->treasury->debitReversals->retrieve(
+ 'debrev_xxxxxxxxxxxxx',
[]
);
- // TODO: assert proper instance, {"shape":"file"}
+ static::assertInstanceOf(\Stripe\Treasury\DebitReversal::class, $result);
}
- public function testListPaymentMethodConfiguration()
+ public function testTreasuryDebitReversalsPost()
{
- $this->expectsRequest('get', '/v1/payment_method_configurations');
- $result = $this->client->paymentMethodConfigurations->all([
- 'application' => 'foo',
+ $this->expectsRequest('post', '/v1/treasury/debit_reversals');
+ $result = $this->client->treasury->debitReversals->create([
+ 'received_debit' => 'rd_xxxxxxxxxxxxx',
]);
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\PaymentMethodConfiguration::class, $result->data[0]);
+ static::assertInstanceOf(\Stripe\Treasury\DebitReversal::class, $result);
}
- public function testCreatePaymentMethodConfiguration()
+ public function testTreasuryFinancialAccountsFeaturesGet()
{
- $this->expectsRequest('post', '/v1/payment_method_configurations');
- $result = $this->client->paymentMethodConfigurations->create([
- 'acss_debit' => ['display_preference' => ['preference' => 'none']],
- 'affirm' => ['display_preference' => ['preference' => 'none']],
+ $this->expectsRequest(
+ 'get',
+ '/v1/treasury/financial_accounts/fa_xxxxxxxxxxxxx/features'
+ );
+ $result = $this->client->treasury->financialAccounts->retrieveFeatures(
+ 'fa_xxxxxxxxxxxxx',
+ []
+ );
+ static::assertInstanceOf(\Stripe\Treasury\FinancialAccountFeatures::class, $result);
+ }
+
+ public function testTreasuryFinancialAccountsGet()
+ {
+ $this->expectsRequest('get', '/v1/treasury/financial_accounts');
+ $result = $this->client->treasury->financialAccounts->all([
+ 'limit' => 3,
]);
- static::assertInstanceOf(\Stripe\PaymentMethodConfiguration::class, $result);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\Treasury\FinancialAccount::class, $result->data[0]);
}
- public function testRetrievePaymentMethodConfiguration()
+ public function testTreasuryFinancialAccountsGet2()
{
- $this->expectsRequest('get', '/v1/payment_method_configurations/foo');
- $result = $this->client->paymentMethodConfigurations->retrieve(
- 'foo',
+ $this->expectsRequest(
+ 'get',
+ '/v1/treasury/financial_accounts/fa_xxxxxxxxxxxxx'
+ );
+ $result = $this->client->treasury->financialAccounts->retrieve(
+ 'fa_xxxxxxxxxxxxx',
[]
);
- static::assertInstanceOf(\Stripe\PaymentMethodConfiguration::class, $result);
+ static::assertInstanceOf(\Stripe\Treasury\FinancialAccount::class, $result);
}
- public function testUpdatePaymentMethodConfiguration()
+ public function testTreasuryFinancialAccountsPost()
{
- $this->expectsRequest('post', '/v1/payment_method_configurations/foo');
- $result = $this->client->paymentMethodConfigurations->update(
- 'foo',
- ['acss_debit' => ['display_preference' => ['preference' => 'on']]]
- );
- static::assertInstanceOf(\Stripe\PaymentMethodConfiguration::class, $result);
+ $this->expectsRequest('post', '/v1/treasury/financial_accounts');
+ $result = $this->client->treasury->financialAccounts->create([
+ 'supported_currencies' => ['usd'],
+ 'features' => [],
+ ]);
+ static::assertInstanceOf(\Stripe\Treasury\FinancialAccount::class, $result);
}
- public function testCreateAuthorization()
+ public function testTreasuryFinancialAccountsPost2()
{
$this->expectsRequest(
'post',
- '/v1/test_helpers/issuing/authorizations'
+ '/v1/treasury/financial_accounts/fa_xxxxxxxxxxxxx'
);
- $result = $this->client->testHelpers->issuing->authorizations->create([
- 'amount' => 100,
- 'amount_details' => [
- 'atm_fee' => 10,
- 'cashback_amount' => 5,
- ],
- 'authorization_method' => 'chip',
- 'card' => 'foo',
- 'currency' => 'usd',
- 'is_amount_controllable' => true,
- 'merchant_data' => [
- 'category' => 'ac_refrigeration_repair',
- 'city' => 'foo',
- 'country' => 'bar',
- 'name' => 'foo',
- 'network_id' => 'bar',
- 'postal_code' => 'foo',
- 'state' => 'bar',
- 'terminal_id' => 'foo',
- ],
- 'network_data' => ['acquiring_institution_id' => 'foo'],
- 'verification_data' => [
- 'address_line1_check' => 'mismatch',
- 'address_postal_code_check' => 'match',
- 'cvc_check' => 'match',
- 'expiry_check' => 'mismatch',
- ],
- 'wallet' => 'apple_pay',
- ]);
- static::assertInstanceOf(\Stripe\Issuing\Authorization::class, $result);
+ $result = $this->client->treasury->financialAccounts->update(
+ 'fa_xxxxxxxxxxxxx',
+ ['metadata' => ['order_id' => '6735']]
+ );
+ static::assertInstanceOf(\Stripe\Treasury\FinancialAccount::class, $result);
}
- public function testCaptureAuthorization()
+ public function testTreasuryInboundTransfersCancelPost()
{
$this->expectsRequest(
'post',
- '/v1/test_helpers/issuing/authorizations/example_authorization/capture'
+ '/v1/treasury/inbound_transfers/ibt_xxxxxxxxxxxxx/cancel'
);
- $result = $this->client->testHelpers->issuing->authorizations->capture(
- 'example_authorization',
- [
- 'capture_amount' => 100,
- 'close_authorization' => true,
- 'purchase_details' => [
- 'flight' => [
- 'departure_at' => 1633651200,
- 'passenger_name' => 'John Doe',
- 'refundable' => true,
- 'segments' => [
- [
- 'arrival_airport_code' => 'SFO',
- 'carrier' => 'Delta',
- 'departure_airport_code' => 'LAX',
- 'flight_number' => 'DL100',
- 'service_class' => 'Economy',
- 'stopover_allowed' => true,
- ],
- ],
- 'travel_agency' => 'Orbitz',
- ],
- 'fuel' => [
- 'type' => 'diesel',
- 'unit' => 'liter',
- 'unit_cost_decimal' => '3.5',
- 'volume_decimal' => '10',
- ],
- 'lodging' => [
- 'check_in_at' => 1633651200,
- 'nights' => 2,
- ],
- 'receipt' => [
- [
- 'description' => 'Room charge',
- 'quantity' => '1',
- 'total' => 200,
- 'unit_cost' => 200,
- ],
- ],
- 'reference' => 'foo',
- ],
- ]
+ $result = $this->client->treasury->inboundTransfers->cancel(
+ 'ibt_xxxxxxxxxxxxx',
+ []
);
- static::assertInstanceOf(\Stripe\Issuing\Authorization::class, $result);
+ static::assertInstanceOf(\Stripe\Treasury\InboundTransfer::class, $result);
+ }
+
+ public function testTreasuryInboundTransfersGet()
+ {
+ $this->expectsRequest('get', '/v1/treasury/inbound_transfers');
+ $result = $this->client->treasury->inboundTransfers->all([
+ 'financial_account' => 'fa_xxxxxxxxxxxxx',
+ 'limit' => 3,
+ ]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\Treasury\InboundTransfer::class, $result->data[0]);
}
- public function testExpireAuthorization()
+ public function testTreasuryInboundTransfersGet2()
{
$this->expectsRequest(
- 'post',
- '/v1/test_helpers/issuing/authorizations/example_authorization/expire'
+ 'get',
+ '/v1/treasury/inbound_transfers/ibt_xxxxxxxxxxxxx'
);
- $result = $this->client->testHelpers->issuing->authorizations->expire(
- 'example_authorization',
+ $result = $this->client->treasury->inboundTransfers->retrieve(
+ 'ibt_xxxxxxxxxxxxx',
[]
);
- static::assertInstanceOf(\Stripe\Issuing\Authorization::class, $result);
+ static::assertInstanceOf(\Stripe\Treasury\InboundTransfer::class, $result);
+ }
+
+ public function testTreasuryInboundTransfersPost()
+ {
+ $this->expectsRequest('post', '/v1/treasury/inbound_transfers');
+ $result = $this->client->treasury->inboundTransfers->create([
+ 'financial_account' => 'fa_xxxxxxxxxxxxx',
+ 'amount' => 10000,
+ 'currency' => 'usd',
+ 'origin_payment_method' => 'pm_xxxxxxxxxxxxx',
+ 'description' => 'InboundTransfer from my bank account',
+ ]);
+ static::assertInstanceOf(\Stripe\Treasury\InboundTransfer::class, $result);
}
- public function testIncrementAuthorization()
+ public function testTreasuryOutboundPaymentsCancelPost()
{
$this->expectsRequest(
'post',
- '/v1/test_helpers/issuing/authorizations/example_authorization/increment'
+ '/v1/treasury/outbound_payments/bot_xxxxxxxxxxxxx/cancel'
);
- $result = $this->client->testHelpers->issuing->authorizations->increment(
- 'example_authorization',
- [
- 'increment_amount' => 50,
- 'is_amount_controllable' => true,
- ]
+ $result = $this->client->treasury->outboundPayments->cancel(
+ 'bot_xxxxxxxxxxxxx',
+ []
);
- static::assertInstanceOf(\Stripe\Issuing\Authorization::class, $result);
+ static::assertInstanceOf(\Stripe\Treasury\OutboundPayment::class, $result);
+ }
+
+ public function testTreasuryOutboundPaymentsGet()
+ {
+ $this->expectsRequest('get', '/v1/treasury/outbound_payments');
+ $result = $this->client->treasury->outboundPayments->all([
+ 'financial_account' => 'fa_xxxxxxxxxxxxx',
+ 'limit' => 3,
+ ]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\Treasury\OutboundPayment::class, $result->data[0]);
}
- public function testReverseAuthorization()
+ public function testTreasuryOutboundPaymentsGet2()
{
$this->expectsRequest(
- 'post',
- '/v1/test_helpers/issuing/authorizations/example_authorization/reverse'
+ 'get',
+ '/v1/treasury/outbound_payments/bot_xxxxxxxxxxxxx'
);
- $result = $this->client->testHelpers->issuing->authorizations->reverse(
- 'example_authorization',
- ['reverse_amount' => 20]
+ $result = $this->client->treasury->outboundPayments->retrieve(
+ 'bot_xxxxxxxxxxxxx',
+ []
);
- static::assertInstanceOf(\Stripe\Issuing\Authorization::class, $result);
+ static::assertInstanceOf(\Stripe\Treasury\OutboundPayment::class, $result);
}
- public function testCreateForceCaptureTransaction()
+ public function testTreasuryOutboundPaymentsPost()
+ {
+ $this->expectsRequest('post', '/v1/treasury/outbound_payments');
+ $result = $this->client->treasury->outboundPayments->create([
+ 'financial_account' => 'fa_xxxxxxxxxxxxx',
+ 'amount' => 10000,
+ 'currency' => 'usd',
+ 'customer' => 'cus_xxxxxxxxxxxxx',
+ 'destination_payment_method' => 'pm_xxxxxxxxxxxxx',
+ 'description' => 'OutboundPayment to a 3rd party',
+ ]);
+ static::assertInstanceOf(\Stripe\Treasury\OutboundPayment::class, $result);
+ }
+
+ public function testTreasuryOutboundTransfersCancelPost()
{
$this->expectsRequest(
'post',
- '/v1/test_helpers/issuing/transactions/create_force_capture'
+ '/v1/treasury/outbound_transfers/obt_xxxxxxxxxxxxx/cancel'
);
- $result = $this->client->testHelpers->issuing->transactions->createForceCapture([
- 'amount' => 100,
- 'card' => 'foo',
- 'currency' => 'usd',
- 'merchant_data' => [
- 'category' => 'ac_refrigeration_repair',
- 'city' => 'foo',
- 'country' => 'US',
- 'name' => 'foo',
- 'network_id' => 'bar',
- 'postal_code' => '10001',
- 'state' => 'NY',
- 'terminal_id' => 'foo',
- ],
- 'purchase_details' => [
- 'flight' => [
- 'departure_at' => 1633651200,
- 'passenger_name' => 'John Doe',
- 'refundable' => true,
- 'segments' => [
- [
- 'arrival_airport_code' => 'SFO',
- 'carrier' => 'Delta',
- 'departure_airport_code' => 'LAX',
- 'flight_number' => 'DL100',
- 'service_class' => 'Economy',
- 'stopover_allowed' => true,
- ],
- ],
- 'travel_agency' => 'Orbitz',
- ],
- 'fuel' => [
- 'type' => 'diesel',
- 'unit' => 'liter',
- 'unit_cost_decimal' => '3.5',
- 'volume_decimal' => '10',
- ],
- 'lodging' => [
- 'check_in_at' => 1533651200,
- 'nights' => 2,
- ],
- 'receipt' => [
- [
- 'description' => 'Room charge',
- 'quantity' => '1',
- 'total' => 200,
- 'unit_cost' => 200,
- ],
- ],
- 'reference' => 'foo',
- ],
+ $result = $this->client->treasury->outboundTransfers->cancel(
+ 'obt_xxxxxxxxxxxxx',
+ []
+ );
+ static::assertInstanceOf(\Stripe\Treasury\OutboundTransfer::class, $result);
+ }
+
+ public function testTreasuryOutboundTransfersGet()
+ {
+ $this->expectsRequest('get', '/v1/treasury/outbound_transfers');
+ $result = $this->client->treasury->outboundTransfers->all([
+ 'financial_account' => 'fa_xxxxxxxxxxxxx',
+ 'limit' => 3,
]);
- static::assertInstanceOf(\Stripe\Issuing\Transaction::class, $result);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\Treasury\OutboundTransfer::class, $result->data[0]);
}
- public function testCreateUnlinkedRefundTransaction()
+ public function testTreasuryOutboundTransfersGet2()
{
$this->expectsRequest(
- 'post',
- '/v1/test_helpers/issuing/transactions/create_unlinked_refund'
+ 'get',
+ '/v1/treasury/outbound_transfers/obt_xxxxxxxxxxxxx'
);
- $result = $this->client->testHelpers->issuing->transactions->createUnlinkedRefund([
- 'amount' => 100,
- 'card' => 'foo',
+ $result = $this->client->treasury->outboundTransfers->retrieve(
+ 'obt_xxxxxxxxxxxxx',
+ []
+ );
+ static::assertInstanceOf(\Stripe\Treasury\OutboundTransfer::class, $result);
+ }
+
+ public function testTreasuryOutboundTransfersPost()
+ {
+ $this->expectsRequest('post', '/v1/treasury/outbound_transfers');
+ $result = $this->client->treasury->outboundTransfers->create([
+ 'financial_account' => 'fa_xxxxxxxxxxxxx',
+ 'destination_payment_method' => 'pm_xxxxxxxxxxxxx',
+ 'amount' => 500,
'currency' => 'usd',
- 'merchant_data' => [
- 'category' => 'ac_refrigeration_repair',
- 'city' => 'foo',
- 'country' => 'bar',
- 'name' => 'foo',
- 'network_id' => 'bar',
- 'postal_code' => 'foo',
- 'state' => 'bar',
- 'terminal_id' => 'foo',
- ],
- 'purchase_details' => [
- 'flight' => [
- 'departure_at' => 1533651200,
- 'passenger_name' => 'John Doe',
- 'refundable' => true,
- 'segments' => [
- [
- 'arrival_airport_code' => 'SFO',
- 'carrier' => 'Delta',
- 'departure_airport_code' => 'LAX',
- 'flight_number' => 'DL100',
- 'service_class' => 'Economy',
- 'stopover_allowed' => true,
- ],
- ],
- 'travel_agency' => 'Orbitz',
- ],
- 'fuel' => [
- 'type' => 'diesel',
- 'unit' => 'liter',
- 'unit_cost_decimal' => '3.5',
- 'volume_decimal' => '10',
- ],
- 'lodging' => [
- 'check_in_at' => 1533651200,
- 'nights' => 2,
- ],
- 'receipt' => [
- [
- 'description' => 'Room charge',
- 'quantity' => '1',
- 'total' => 200,
- 'unit_cost' => 200,
- ],
- ],
- 'reference' => 'foo',
- ],
+ 'description' => 'OutboundTransfer to my external bank account',
]);
- static::assertInstanceOf(\Stripe\Issuing\Transaction::class, $result);
+ static::assertInstanceOf(\Stripe\Treasury\OutboundTransfer::class, $result);
+ }
+
+ public function testTreasuryReceivedCreditsGet()
+ {
+ $this->expectsRequest('get', '/v1/treasury/received_credits');
+ $result = $this->client->treasury->receivedCredits->all([
+ 'financial_account' => 'fa_xxxxxxxxxxxxx',
+ 'limit' => 3,
+ ]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\Treasury\ReceivedCredit::class, $result->data[0]);
}
- public function testRefundTransaction()
+ public function testTreasuryReceivedCreditsGet2()
{
$this->expectsRequest(
- 'post',
- '/v1/test_helpers/issuing/transactions/example_transaction/refund'
+ 'get',
+ '/v1/treasury/received_credits/rc_xxxxxxxxxxxxx'
);
- $result = $this->client->testHelpers->issuing->transactions->refund(
- 'example_transaction',
- ['refund_amount' => 50]
+ $result = $this->client->treasury->receivedCredits->retrieve(
+ 'rc_xxxxxxxxxxxxx',
+ []
);
- static::assertInstanceOf(\Stripe\Issuing\Transaction::class, $result);
+ static::assertInstanceOf(\Stripe\Treasury\ReceivedCredit::class, $result);
}
- public function testDeleteDiscountSubscription()
+ public function testTreasuryReceivedDebitsGet()
{
- $this->expectsRequest('delete', '/v1/subscriptions/sub_xyz/discount');
- $result = $this->client->subscriptions->deleteDiscount('sub_xyz', []);
- static::assertInstanceOf(\Stripe\Discount::class, $result);
+ $this->expectsRequest('get', '/v1/treasury/received_debits');
+ $result = $this->client->treasury->receivedDebits->all([
+ 'financial_account' => 'fa_xxxxxxxxxxxxx',
+ 'limit' => 3,
+ ]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\Treasury\ReceivedDebit::class, $result->data[0]);
+ }
+
+ public function testTreasuryReceivedDebitsGet2()
+ {
+ $this->expectsRequest(
+ 'get',
+ '/v1/treasury/received_debits/rd_xxxxxxxxxxxxx'
+ );
+ $result = $this->client->treasury->receivedDebits->retrieve(
+ 'rd_xxxxxxxxxxxxx',
+ []
+ );
+ static::assertInstanceOf(\Stripe\Treasury\ReceivedDebit::class, $result);
+ }
+
+ public function testTreasuryTransactionEntriesGet()
+ {
+ $this->expectsRequest('get', '/v1/treasury/transaction_entries');
+ $result = $this->client->treasury->transactionEntries->all([
+ 'financial_account' => 'fa_xxxxxxxxxxxxx',
+ 'limit' => 3,
+ ]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\Treasury\TransactionEntry::class, $result->data[0]);
+ }
+
+ public function testTreasuryTransactionEntriesGet2()
+ {
+ $this->expectsRequest(
+ 'get',
+ '/v1/treasury/transaction_entries/trxne_xxxxxxxxxxxxx'
+ );
+ $result = $this->client->treasury->transactionEntries->retrieve(
+ 'trxne_xxxxxxxxxxxxx',
+ []
+ );
+ static::assertInstanceOf(\Stripe\Treasury\TransactionEntry::class, $result);
+ }
+
+ public function testTreasuryTransactionsGet()
+ {
+ $this->expectsRequest('get', '/v1/treasury/transactions');
+ $result = $this->client->treasury->transactions->all([
+ 'financial_account' => 'fa_xxxxxxxxxxxxx',
+ 'limit' => 3,
+ ]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\Treasury\Transaction::class, $result->data[0]);
+ }
+
+ public function testTreasuryTransactionsGet2()
+ {
+ $this->expectsRequest(
+ 'get',
+ '/v1/treasury/transactions/trxn_xxxxxxxxxxxxx'
+ );
+ $result = $this->client->treasury->transactions->retrieve(
+ 'trxn_xxxxxxxxxxxxx',
+ []
+ );
+ static::assertInstanceOf(\Stripe\Treasury\Transaction::class, $result);
+ }
+
+ public function testWebhookEndpointsDelete()
+ {
+ $this->expectsRequest(
+ 'delete',
+ '/v1/webhook_endpoints/we_xxxxxxxxxxxxx'
+ );
+ $result = $this->client->webhookEndpoints->delete(
+ 'we_xxxxxxxxxxxxx',
+ []
+ );
+ static::assertInstanceOf(\Stripe\WebhookEndpoint::class, $result);
+ }
+
+ public function testWebhookEndpointsGet()
+ {
+ $this->expectsRequest('get', '/v1/webhook_endpoints');
+ $result = $this->client->webhookEndpoints->all(['limit' => 3]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\WebhookEndpoint::class, $result->data[0]);
+ }
+
+ public function testWebhookEndpointsGet2()
+ {
+ $this->expectsRequest('get', '/v1/webhook_endpoints/we_xxxxxxxxxxxxx');
+ $result = $this->client->webhookEndpoints->retrieve(
+ 'we_xxxxxxxxxxxxx',
+ []
+ );
+ static::assertInstanceOf(\Stripe\WebhookEndpoint::class, $result);
+ }
+
+ public function testWebhookEndpointsPost2()
+ {
+ $this->expectsRequest('post', '/v1/webhook_endpoints/we_xxxxxxxxxxxxx');
+ $result = $this->client->webhookEndpoints->update(
+ 'we_xxxxxxxxxxxxx',
+ ['url' => 'https://example.com/new_endpoint']
+ );
+ static::assertInstanceOf(\Stripe\WebhookEndpoint::class, $result);
}
}
From 35b03c2ae7743721c06da9044cadaa7b0e146c02 Mon Sep 17 00:00:00 2001
From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Tue, 31 Oct 2023 15:30:04 +0000
Subject: [PATCH 2/7] Update generated code for v633
---
OPENAPI_VERSION | 2 +-
init.php | 2 +
lib/Service/Tax/RegistrationService.php | 57 +++++++++++++++++++++++++
lib/Service/Tax/TaxServiceFactory.php | 2 +
lib/Tax/Registration.php | 35 +++++++++++++++
lib/Util/ObjectTypes.php | 1 +
6 files changed, 98 insertions(+), 1 deletion(-)
create mode 100644 lib/Service/Tax/RegistrationService.php
create mode 100644 lib/Tax/Registration.php
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index 32401f20f..05e9a4e74 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v629
\ No newline at end of file
+v633
\ No newline at end of file
diff --git a/init.php b/init.php
index 79dbdeb35..008ca6e91 100644
--- a/init.php
+++ b/init.php
@@ -222,6 +222,7 @@
require __DIR__ . '/lib/Service/SubscriptionScheduleService.php';
require __DIR__ . '/lib/Service/SubscriptionService.php';
require __DIR__ . '/lib/Service/Tax/CalculationService.php';
+require __DIR__ . '/lib/Service/Tax/RegistrationService.php';
require __DIR__ . '/lib/Service/Tax/SettingsService.php';
require __DIR__ . '/lib/Service/Tax/TaxServiceFactory.php';
require __DIR__ . '/lib/Service/Tax/TransactionService.php';
@@ -274,6 +275,7 @@
require __DIR__ . '/lib/SubscriptionSchedule.php';
require __DIR__ . '/lib/Tax/Calculation.php';
require __DIR__ . '/lib/Tax/CalculationLineItem.php';
+require __DIR__ . '/lib/Tax/Registration.php';
require __DIR__ . '/lib/Tax/Settings.php';
require __DIR__ . '/lib/Tax/Transaction.php';
require __DIR__ . '/lib/Tax/TransactionLineItem.php';
diff --git a/lib/Service/Tax/RegistrationService.php b/lib/Service/Tax/RegistrationService.php
new file mode 100644
index 000000000..99481020a
--- /dev/null
+++ b/lib/Service/Tax/RegistrationService.php
@@ -0,0 +1,57 @@
+Registration objects.
+ *
+ * @param null|array $params
+ * @param null|array|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Tax\Registration>
+ */
+ public function all($params = null, $opts = null)
+ {
+ return $this->requestCollection('get', '/v1/tax/registrations', $params, $opts);
+ }
+
+ /**
+ * Creates a new Tax Registration
object.
+ *
+ * @param null|array $params
+ * @param null|array|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Tax\Registration
+ */
+ public function create($params = null, $opts = null)
+ {
+ return $this->request('post', '/v1/tax/registrations', $params, $opts);
+ }
+
+ /**
+ * Updates an existing Tax Registration
object.
+ *
+ * A registration cannot be deleted after it has been created. If you wish to end a
+ * registration you may do so by setting expires_at
.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|array|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Tax\Registration
+ */
+ public function update($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/tax/registrations/%s', $id), $params, $opts);
+ }
+}
diff --git a/lib/Service/Tax/TaxServiceFactory.php b/lib/Service/Tax/TaxServiceFactory.php
index 9429c016d..2aeeb64f1 100644
--- a/lib/Service/Tax/TaxServiceFactory.php
+++ b/lib/Service/Tax/TaxServiceFactory.php
@@ -8,6 +8,7 @@
* Service factory class for API resources in the Tax namespace.
*
* @property CalculationService $calculations
+ * @property RegistrationService $registrations
* @property SettingsService $settings
* @property TransactionService $transactions
*/
@@ -18,6 +19,7 @@ class TaxServiceFactory extends \Stripe\Service\AbstractServiceFactory
*/
private static $classMap = [
'calculations' => CalculationService::class,
+ 'registrations' => RegistrationService::class,
'settings' => SettingsService::class,
'transactions' => TransactionService::class,
];
diff --git a/lib/Tax/Registration.php b/lib/Tax/Registration.php
new file mode 100644
index 000000000..744b9bc1e
--- /dev/null
+++ b/lib/Tax/Registration.php
@@ -0,0 +1,35 @@
+Registration lets us know that your business is registered to collect tax on payments within a region, enabling you to automatically collect tax.
+ *
+ * Stripe doesn't register on your behalf with the relevant authorities when you create a Tax Registration
object. For more information on how to register to collect tax, see our guide.
+ *
+ * Related guide: Using the Registrations API
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property int $active_from Time at which the registration becomes active. Measured in seconds since the Unix epoch.
+ * @property string $country Two-letter country code (ISO 3166-1 alpha-2).
+ * @property \Stripe\StripeObject $country_options
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property null|int $expires_at If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. Measured in seconds since the Unix epoch.
+ * @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
+ * @property string $status The status of the registration. This field is present for convenience and can be deduced from active_from
and expires_at
.
+ */
+class Registration extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'tax.registration';
+
+ use \Stripe\ApiOperations\All;
+ use \Stripe\ApiOperations\Create;
+ use \Stripe\ApiOperations\Update;
+
+ const STATUS_ACTIVE = 'active';
+ const STATUS_EXPIRED = 'expired';
+ const STATUS_SCHEDULED = 'scheduled';
+}
diff --git a/lib/Util/ObjectTypes.php b/lib/Util/ObjectTypes.php
index ca5f58024..adbdfc469 100644
--- a/lib/Util/ObjectTypes.php
+++ b/lib/Util/ObjectTypes.php
@@ -94,6 +94,7 @@ class ObjectTypes
\Stripe\SubscriptionSchedule::OBJECT_NAME => \Stripe\SubscriptionSchedule::class,
\Stripe\Tax\Calculation::OBJECT_NAME => \Stripe\Tax\Calculation::class,
\Stripe\Tax\CalculationLineItem::OBJECT_NAME => \Stripe\Tax\CalculationLineItem::class,
+ \Stripe\Tax\Registration::OBJECT_NAME => \Stripe\Tax\Registration::class,
\Stripe\Tax\Settings::OBJECT_NAME => \Stripe\Tax\Settings::class,
\Stripe\Tax\Transaction::OBJECT_NAME => \Stripe\Tax\Transaction::class,
\Stripe\Tax\TransactionLineItem::OBJECT_NAME => \Stripe\Tax\TransactionLineItem::class,
From d12364260e61c642303bb9df66e086514efbee9d Mon Sep 17 00:00:00 2001
From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Wed, 1 Nov 2023 21:16:52 +0000
Subject: [PATCH 3/7] Update generated code for v636
---
OPENAPI_VERSION | 2 +-
lib/PaymentMethod.php | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index 05e9a4e74..defeacb84 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v633
\ No newline at end of file
+v636
\ No newline at end of file
diff --git a/lib/PaymentMethod.php b/lib/PaymentMethod.php
index 630b1d0c7..c0558b63f 100644
--- a/lib/PaymentMethod.php
+++ b/lib/PaymentMethod.php
@@ -47,6 +47,7 @@
* @property null|\Stripe\StripeObject $pix
* @property null|\Stripe\StripeObject $promptpay
* @property null|\Stripe\StripeObject $radar_options Options to configure Radar. See Radar Session for more information.
+ * @property null|\Stripe\StripeObject $revolut_pay
* @property null|\Stripe\StripeObject $sepa_debit
* @property null|\Stripe\StripeObject $sofort
* @property string $type The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
@@ -91,6 +92,7 @@ class PaymentMethod extends ApiResource
const TYPE_PAYPAL = 'paypal';
const TYPE_PIX = 'pix';
const TYPE_PROMPTPAY = 'promptpay';
+ const TYPE_REVOLUT_PAY = 'revolut_pay';
const TYPE_SEPA_DEBIT = 'sepa_debit';
const TYPE_SOFORT = 'sofort';
const TYPE_US_BANK_ACCOUNT = 'us_bank_account';
From f6dbc0ee15a3df9212bf919615a4c23ffef2b24a Mon Sep 17 00:00:00 2001
From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Thu, 2 Nov 2023 01:21:30 +0000
Subject: [PATCH 4/7] Update generated code for v638
---
OPENAPI_VERSION | 2 +-
lib/ErrorObject.php | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index defeacb84..bd6f67666 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v636
\ No newline at end of file
+v638
\ No newline at end of file
diff --git a/lib/ErrorObject.php b/lib/ErrorObject.php
index 727afd01c..a3bc145ce 100644
--- a/lib/ErrorObject.php
+++ b/lib/ErrorObject.php
@@ -197,6 +197,7 @@ class ErrorObject extends StripeObject
const CODE_TESTMODE_CHARGES_ONLY = 'testmode_charges_only';
const CODE_TLS_VERSION_UNSUPPORTED = 'tls_version_unsupported';
const CODE_TOKEN_ALREADY_USED = 'token_already_used';
+ const CODE_TOKEN_CARD_NETWORK_INVALID = 'token_card_network_invalid';
const CODE_TOKEN_IN_USE = 'token_in_use';
const CODE_TRANSFER_SOURCE_BALANCE_PARAMETERS_MISMATCH = 'transfer_source_balance_parameters_mismatch';
const CODE_TRANSFERS_NOT_ALLOWED = 'transfers_not_allowed';
From fff84a20c9257e62b6caff89d14244cf46b91132 Mon Sep 17 00:00:00 2001
From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Thu, 2 Nov 2023 10:41:51 +0000
Subject: [PATCH 5/7] Update generated code for v640
---
OPENAPI_VERSION | 2 +-
lib/ExchangeRate.php | 37 ++++++++++++++++++++++++++-----------
2 files changed, 27 insertions(+), 12 deletions(-)
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index bd6f67666..5730a1e88 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v638
\ No newline at end of file
+v640
\ No newline at end of file
diff --git a/lib/ExchangeRate.php b/lib/ExchangeRate.php
index e0bb19579..d8c621f28 100644
--- a/lib/ExchangeRate.php
+++ b/lib/ExchangeRate.php
@@ -5,17 +5,32 @@
namespace Stripe;
/**
- * Exchange Rate
objects allow you to determine the rates that Stripe is
- * currently using to convert from one currency to another. Since this number is
- * variable throughout the day, there are various reasons why you might want to
- * know the current rate (for example, to dynamically price an item for a user
- * with a default payment in a foreign currency).
- *
- * If you want a guarantee that the charge is made with a certain exchange rate
- * you expect is current, you can pass in exchange_rate
to charges endpoints.
- * If the value is no longer up to date, the charge won't go through. Please
- * refer to our Exchange Rates API guide for more
- * details.
+ * ExchangeRate
objects allow you to determine the rates that Stripe is currently
+ * using to convert from one currency to another. Since this number is variable
+ * throughout the day, there are various reasons why you might want to know the current
+ * rate (for example, to dynamically price an item for a user with a default
+ * payment in a foreign currency).
+ *
+ * Please refer to our Exchange Rates API guide for more details.
+ *
+ * [Note: this integration path is supported but no longer recommended] Additionally,
+ * you can guarantee that a charge is made with an exchange rate that you expect is
+ * current. To do so, you must pass in the exchange_rate to charges endpoints. If the
+ * value is no longer up to date, the charge won't go through. Please refer to our
+ * Using with charges guide for more details.
+ *
+ * -----
+ *
+ *
+ *
+ * This Exchange Rates API is a Beta Service and is subject to Stripe's terms of service. You may use the API solely for the purpose of transacting on Stripe. For example, the API may be queried in order to:
+ *
+ * - localize prices for processing payments on Stripe
+ * - reconcile Stripe transactions
+ * - determine how much money to send to a connected account
+ * - determine app fees to charge a connected account
+ *
+ * Using this Exchange Rates API beta for any purpose other than to transact on Stripe is strictly prohibited and constitutes a violation of Stripe's terms of service.
*
* @property string $id Unique identifier for the object. Represented as the three-letter ISO currency code in lowercase.
* @property string $object String representing the object's type. Objects of the same type share the same value.
From f9f1d9dde9031f1b0387a6391afb167557db6f02 Mon Sep 17 00:00:00 2001
From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Thu, 2 Nov 2023 19:33:37 +0000
Subject: [PATCH 6/7] Update generated code for v644
---
OPENAPI_VERSION | 2 +-
lib/BalanceTransaction.php | 3 ++-
lib/CustomerCashBalanceTransaction.php | 1 +
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index 5730a1e88..c78d48944 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v640
\ No newline at end of file
+v644
\ No newline at end of file
diff --git a/lib/BalanceTransaction.php b/lib/BalanceTransaction.php
index d04edaaf3..7424aa9e2 100644
--- a/lib/BalanceTransaction.php
+++ b/lib/BalanceTransaction.php
@@ -24,7 +24,7 @@
* @property string $reporting_category Learn more about how reporting categories can help you understand balance transactions from an accounting perspective.
* @property null|string|\Stripe\ApplicationFee|\Stripe\ApplicationFeeRefund|\Stripe\Charge|\Stripe\CustomerCashBalanceTransaction|\Stripe\Dispute|\Stripe\Issuing\Authorization|\Stripe\Issuing\Dispute|\Stripe\Issuing\Transaction|\Stripe\Payout|\Stripe\Refund|\Stripe\StripeObject|\Stripe\Topup|\Stripe\Transfer|\Stripe\TransferReversal $source This transaction relates to the Stripe object.
* @property string $status The transaction's net funds status in the Stripe balance, which are either available
or pending
.
- * @property string $type Transaction type: adjustment
, advance
, advance_funding
, anticipation_repayment
, application_fee
, application_fee_refund
, charge
, connect_collection_transfer
, contribution
, issuing_authorization_hold
, issuing_authorization_release
, issuing_dispute
, issuing_transaction
, obligation_inbound
, obligation_outbound
, obligation_reversal_inbound
, obligation_reversal_outbound
, obligation_payout
, obligation_payout_failure
, payment
, payment_failure_refund
, payment_refund
, payment_reversal
, payout
, payout_cancel
, payout_failure
, refund
, refund_failure
, reserve_transaction
, reserved_funds
, stripe_fee
, stripe_fx_fee
, tax_fee
, topup
, topup_reversal
, transfer
, transfer_cancel
, transfer_failure
, or transfer_refund
. Learn more about balance transaction types and what they represent. To classify transactions for accounting purposes, consider reporting_category
instead.
+ * @property string $type Transaction type: adjustment
, advance
, advance_funding
, anticipation_repayment
, application_fee
, application_fee_refund
, charge
, connect_collection_transfer
, contribution
, issuing_authorization_hold
, issuing_authorization_release
, issuing_dispute
, issuing_transaction
, obligation_inbound
, obligation_outbound
, obligation_reversal_inbound
, obligation_reversal_outbound
, obligation_payout
, obligation_payout_failure
, payment
, payment_failure_refund
, payment_refund
, payment_reversal
, payment_unreconciled
, payout
, payout_cancel
, payout_failure
, refund
, refund_failure
, reserve_transaction
, reserved_funds
, stripe_fee
, stripe_fx_fee
, tax_fee
, topup
, topup_reversal
, transfer
, transfer_cancel
, transfer_failure
, or transfer_refund
. Learn more about balance transaction types and what they represent. To classify transactions for accounting purposes, consider reporting_category
instead.
*/
class BalanceTransaction extends ApiResource
{
@@ -56,6 +56,7 @@ class BalanceTransaction extends ApiResource
const TYPE_PAYMENT_FAILURE_REFUND = 'payment_failure_refund';
const TYPE_PAYMENT_REFUND = 'payment_refund';
const TYPE_PAYMENT_REVERSAL = 'payment_reversal';
+ const TYPE_PAYMENT_UNRECONCILED = 'payment_unreconciled';
const TYPE_PAYOUT = 'payout';
const TYPE_PAYOUT_CANCEL = 'payout_cancel';
const TYPE_PAYOUT_FAILURE = 'payout_failure';
diff --git a/lib/CustomerCashBalanceTransaction.php b/lib/CustomerCashBalanceTransaction.php
index e7d182348..00ec89ad4 100644
--- a/lib/CustomerCashBalanceTransaction.php
+++ b/lib/CustomerCashBalanceTransaction.php
@@ -39,5 +39,6 @@ class CustomerCashBalanceTransaction extends ApiResource
const TYPE_REFUNDED_FROM_PAYMENT = 'refunded_from_payment';
const TYPE_RETURN_CANCELED = 'return_canceled';
const TYPE_RETURN_INITIATED = 'return_initiated';
+ const TYPE_TRANSFERRED_TO_BALANCE = 'transferred_to_balance';
const TYPE_UNAPPLIED_FROM_PAYMENT = 'unapplied_from_payment';
}
From 62c3edca4ac9c60ea1ddde3638313512e9ccab0b Mon Sep 17 00:00:00 2001
From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Thu, 2 Nov 2023 21:05:03 +0000
Subject: [PATCH 7/7] Update generated code for v645
---
OPENAPI_VERSION | 2 +-
lib/BankAccount.php | 2 +-
lib/Card.php | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index c78d48944..39c58a743 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v644
\ No newline at end of file
+v645
\ No newline at end of file
diff --git a/lib/BankAccount.php b/lib/BankAccount.php
index f58a52e97..31bbadea4 100644
--- a/lib/BankAccount.php
+++ b/lib/BankAccount.php
@@ -31,7 +31,7 @@
* @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* @property null|\Stripe\StripeObject $requirements Information about the requirements for the bank account, including what information needs to be collected.
* @property null|string $routing_number The routing transit number for the bank account.
- * @property string $status
For bank accounts, possible values are new
, validated
, verified
, verification_failed
, or errored
. A bank account that hasn't had any activity or validation performed is new
. If Stripe can determine that the bank account exists, its status will be validated
. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be verified
. If the verification failed for any reason, such as microdeposit failure, the status will be verification_failed
. If a transfer sent to this bank account fails, we'll set the status to errored
and will not continue to send transfers until the bank details are updated.
For external accounts, possible values are new
, errored
and verification_failed
. If a transfer fails, the status is set to errored
and transfers are stopped until account details are updated. In India, if we can't verify the owner of the bank account, we'll set the status to verification_failed
. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply.
For bank accounts, possible values are new
, validated
, verified
, verification_failed
, or errored
. A bank account that hasn't had any activity or validation performed is new
. If Stripe can determine that the bank account exists, its status will be validated
. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be verified
. If the verification failed for any reason, such as microdeposit failure, the status will be verification_failed
. If a payout sent to this bank account fails, we'll set the status to errored
and will not continue to send scheduled payouts until the bank details are updated.
For external accounts, possible values are new
, errored
and verification_failed
. If a payouts fails, the status is set to errored
and scheduled payouts are stopped until account details are updated. In India, if we can't verify the owner of the bank account, we'll set the status to verification_failed
. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply.
new
and errored
. If a transfer fails, the status is set to errored
and transfers are stopped until account details are updated.
+ * @property null|string $status For external accounts that are cards, possible values are new
and errored
. If a payout fails, the status is set to errored
and scheduled payouts are stopped until account details are updated.
* @property null|string $tokenization_method If the card number is tokenized, this is the method that was used. Can be android_pay
(includes Google Pay), apple_pay
, masterpass
, visa_checkout
, or null.
*/
class Card extends ApiResource