diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index 811498793..ca2b1285d 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v510
\ No newline at end of file
+v525
\ No newline at end of file
diff --git a/init.php b/init.php
index 2fc416939..dbe93336b 100644
--- a/init.php
+++ b/init.php
@@ -229,8 +229,10 @@
require __DIR__ . '/lib/Service/Terminal/ReaderService.php';
require __DIR__ . '/lib/Service/Terminal/TerminalServiceFactory.php';
require __DIR__ . '/lib/Service/TestHelpers/CustomerService.php';
+require __DIR__ . '/lib/Service/TestHelpers/Issuing/AuthorizationService.php';
require __DIR__ . '/lib/Service/TestHelpers/Issuing/CardService.php';
require __DIR__ . '/lib/Service/TestHelpers/Issuing/IssuingServiceFactory.php';
+require __DIR__ . '/lib/Service/TestHelpers/Issuing/TransactionService.php';
require __DIR__ . '/lib/Service/TestHelpers/RefundService.php';
require __DIR__ . '/lib/Service/TestHelpers/Terminal/ReaderService.php';
require __DIR__ . '/lib/Service/TestHelpers/Terminal/TerminalServiceFactory.php';
diff --git a/lib/Balance.php b/lib/Balance.php
index 05a94ccfa..8243f9a9f 100644
--- a/lib/Balance.php
+++ b/lib/Balance.php
@@ -18,12 +18,12 @@
* Related guide: Understanding Connect account balances
*
* @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property \Stripe\StripeObject[] $available Funds that are available to be transferred or paid out, whether automatically by Stripe or explicitly via the Transfers API or Payouts API. The available balance for each currency and payment type can be found in the source_types
property.
- * @property null|\Stripe\StripeObject[] $connect_reserved Funds held due to negative balances on connected Custom accounts. The connect reserve balance for each currency and payment type can be found in the source_types
property.
- * @property null|\Stripe\StripeObject[] $instant_available Funds that can be paid out using Instant Payouts.
+ * @property \Stripe\StripeObject[] $available Available funds that you can transfer or pay out automatically by Stripe or explicitly through the Transfers API or Payouts API. You can find the available balance for each currency and payment type in the source_types
property.
+ * @property null|\Stripe\StripeObject[] $connect_reserved Funds held due to negative balances on connected Custom accounts. You can find the connect reserve balance for each currency and payment type in the source_types
property.
+ * @property null|\Stripe\StripeObject[] $instant_available Funds that you can pay out using Instant Payouts.
* @property null|\Stripe\StripeObject $issuing
* @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 \Stripe\StripeObject[] $pending Funds that are not yet available in the balance. The pending balance for each currency, and for each payment type, can be found in the source_types
property.
+ * @property \Stripe\StripeObject[] $pending Funds that aren't available in the balance yet. You can find the pending balance for each currency and each payment type in the source_types
property.
*/
class Balance extends SingletonApiResource
{
diff --git a/lib/ErrorObject.php b/lib/ErrorObject.php
index c5a8cfa68..ec0ed4317 100644
--- a/lib/ErrorObject.php
+++ b/lib/ErrorObject.php
@@ -186,6 +186,7 @@ class ErrorObject extends StripeObject
const CODE_SKU_INACTIVE = 'sku_inactive';
const CODE_STATE_UNSUPPORTED = 'state_unsupported';
const CODE_STATUS_TRANSITION_INVALID = 'status_transition_invalid';
+ const CODE_STRIPE_TAX_INACTIVE = 'stripe_tax_inactive';
const CODE_TAX_ID_INVALID = 'tax_id_invalid';
const CODE_TAXES_CALCULATION_FAILED = 'taxes_calculation_failed';
const CODE_TERMINAL_LOCATION_COUNTRY_UNSUPPORTED = 'terminal_location_country_unsupported';
diff --git a/lib/Service/CustomerService.php b/lib/Service/CustomerService.php
index 3c13d008c..34346a1eb 100644
--- a/lib/Service/CustomerService.php
+++ b/lib/Service/CustomerService.php
@@ -179,7 +179,7 @@ public function createSource($parentId, $params = null, $opts = null)
}
/**
- * Creates a new TaxID
object for a customer.
+ * Creates a new tax_id
object for a customer.
*
* @param string $parentId
* @param null|array $params
@@ -245,7 +245,7 @@ public function deleteSource($parentId, $id, $params = null, $opts = null)
}
/**
- * Deletes an existing TaxID
object.
+ * Deletes an existing tax_id
object.
*
* @param string $parentId
* @param string $id
@@ -364,7 +364,7 @@ public function retrieveSource($parentId, $id, $params = null, $opts = null)
}
/**
- * Retrieves the TaxID
object with the given identifier.
+ * Retrieves the tax_id
object with the given identifier.
*
* @param string $parentId
* @param string $id
diff --git a/lib/Service/PaymentIntentService.php b/lib/Service/PaymentIntentService.php
index a27651957..a3fd8d133 100644
--- a/lib/Service/PaymentIntentService.php
+++ b/lib/Service/PaymentIntentService.php
@@ -196,12 +196,12 @@ public function incrementAuthorization($id, $params = null, $opts = null)
/**
* Retrieves the details of a PaymentIntent that has previously been created.
*
- * Client-side retrieval using a publishable key is allowed when the
- * client_secret
is provided in the query string.
+ * You can retrieve a PaymentIntent client-side using a publishable key when the
+ * client_secret
is in the query string.
*
- * When retrieved with a publishable key, only a subset of properties will be
- * returned. Please refer to the payment
- * intent object reference for more details.
+ * If you retrieve a PaymentIntent with a publishable key, it only returns a subset
+ * of properties. Refer to the payment intent
+ * object reference for more details.
*
* @param string $id
* @param null|array $params
diff --git a/lib/Service/TestHelpers/Issuing/AuthorizationService.php b/lib/Service/TestHelpers/Issuing/AuthorizationService.php
new file mode 100644
index 000000000..73de27cb9
--- /dev/null
+++ b/lib/Service/TestHelpers/Issuing/AuthorizationService.php
@@ -0,0 +1,87 @@
+request('post', $this->buildPath('/v1/test_helpers/issuing/authorizations/%s/capture', $id), $params, $opts);
+ }
+
+ /**
+ * Create a test-mode authorization.
+ *
+ * @param null|array $params
+ * @param null|array|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Authorization
+ */
+ public function create($params = null, $opts = null)
+ {
+ return $this->request('post', '/v1/test_helpers/issuing/authorizations', $params, $opts);
+ }
+
+ /**
+ * Expire a test-mode Authorization.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|array|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Authorization
+ */
+ public function expire($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/authorizations/%s/expire', $id), $params, $opts);
+ }
+
+ /**
+ * Increment a test-mode Authorization.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|array|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Authorization
+ */
+ public function increment($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/authorizations/%s/increment', $id), $params, $opts);
+ }
+
+ /**
+ * Reverse a test-mode Authorization.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|array|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Authorization
+ */
+ public function reverse($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/authorizations/%s/reverse', $id), $params, $opts);
+ }
+}
diff --git a/lib/Service/TestHelpers/Issuing/IssuingServiceFactory.php b/lib/Service/TestHelpers/Issuing/IssuingServiceFactory.php
index a202ec33f..e15a7c87c 100644
--- a/lib/Service/TestHelpers/Issuing/IssuingServiceFactory.php
+++ b/lib/Service/TestHelpers/Issuing/IssuingServiceFactory.php
@@ -7,7 +7,9 @@
/**
* Service factory class for API resources in the Issuing namespace.
*
+ * @property AuthorizationService $authorizations
* @property CardService $cards
+ * @property TransactionService $transactions
*/
class IssuingServiceFactory extends \Stripe\Service\AbstractServiceFactory
{
@@ -15,7 +17,9 @@ class IssuingServiceFactory extends \Stripe\Service\AbstractServiceFactory
* @var array
*/
private static $classMap = [
+ 'authorizations' => AuthorizationService::class,
'cards' => CardService::class,
+ 'transactions' => TransactionService::class,
];
protected function getServiceClass($name)
diff --git a/lib/Service/TestHelpers/Issuing/TransactionService.php b/lib/Service/TestHelpers/Issuing/TransactionService.php
new file mode 100644
index 000000000..5fb2965db
--- /dev/null
+++ b/lib/Service/TestHelpers/Issuing/TransactionService.php
@@ -0,0 +1,54 @@
+request('post', '/v1/test_helpers/issuing/transactions/create_force_capture', $params, $opts);
+ }
+
+ /**
+ * Allows the user to refund an arbitrary amount, also known as a unlinked refund.
+ *
+ * @param null|array $params
+ * @param null|array|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Transaction
+ */
+ public function createUnlinkedRefund($params = null, $opts = null)
+ {
+ return $this->request('post', '/v1/test_helpers/issuing/transactions/create_unlinked_refund', $params, $opts);
+ }
+
+ /**
+ * Refund a test-mode Transaction.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|array|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Transaction
+ */
+ public function refund($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/transactions/%s/refund', $id), $params, $opts);
+ }
+}
diff --git a/tests/Stripe/GeneratedExamplesTest.php b/tests/Stripe/GeneratedExamplesTest.php
index ef5f49425..ea37f68a6 100644
--- a/tests/Stripe/GeneratedExamplesTest.php
+++ b/tests/Stripe/GeneratedExamplesTest.php
@@ -101,8 +101,14 @@ public function testExpireSession()
public function testListLineItemsSession()
{
- $this->expectsRequest('get', '/v1/checkout/sessions/sess_xyz/line_items');
- $result = $this->client->checkout->sessions->allLineItems('sess_xyz', []);
+ $this->expectsRequest(
+ 'get',
+ '/v1/checkout/sessions/sess_xyz/line_items'
+ );
+ $result = $this->client->checkout->sessions->allLineItems(
+ 'sess_xyz',
+ []
+ );
static::assertInstanceOf(\Stripe\Collection::class, $result);
static::assertInstanceOf(\Stripe\LineItem::class, $result->data[0]);
}
@@ -126,7 +132,10 @@ public function testUpdateCashBalance()
public function testCreateFundingInstructionsCustomer()
{
- $this->expectsRequest('post', '/v1/customers/cus_123/funding_instructions');
+ $this->expectsRequest(
+ 'post',
+ '/v1/customers/cus_123/funding_instructions'
+ );
$result = $this->client->customers->createFundingInstructions(
'cus_123',
[
@@ -151,7 +160,10 @@ public function testListAccount()
public function testRetrieveAccount()
{
- $this->expectsRequest('get', '/v1/financial_connections/accounts/fca_xyz');
+ $this->expectsRequest(
+ 'get',
+ '/v1/financial_connections/accounts/fca_xyz'
+ );
$result = $this->client->financialConnections->accounts->retrieve(
'fca_xyz',
[]
@@ -367,7 +379,10 @@ public function testDeleteConfiguration()
public function testRetrieveConfiguration()
{
$this->expectsRequest('get', '/v1/terminal/configurations/uc_123');
- $result = $this->client->terminal->configurations->retrieve('uc_123', []);
+ $result = $this->client->terminal->configurations->retrieve(
+ 'uc_123',
+ []
+ );
static::assertInstanceOf(\Stripe\Terminal\Configuration::class, $result);
}
@@ -476,15 +491,24 @@ public function testCreateTestClock()
public function testDeleteTestClock()
{
- $this->expectsRequest('delete', '/v1/test_helpers/test_clocks/clock_xyz');
- $result = $this->client->testHelpers->testClocks->delete('clock_xyz', []);
+ $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);
}
public function testRetrieveTestClock()
{
$this->expectsRequest('get', '/v1/test_helpers/test_clocks/clock_xyz');
- $result = $this->client->testHelpers->testClocks->retrieve('clock_xyz', []);
+ $result = $this->client->testHelpers->testClocks->retrieve(
+ 'clock_xyz',
+ []
+ );
static::assertInstanceOf(\Stripe\TestHelpers\TestClock::class, $result);
}
@@ -581,7 +605,10 @@ public function testReturnOutboundTransferOutboundTransfer()
public function testCreateReceivedCredit()
{
- $this->expectsRequest('post', '/v1/test_helpers/treasury/received_credits');
+ $this->expectsRequest(
+ 'post',
+ '/v1/test_helpers/treasury/received_credits'
+ );
$result = $this->client->testHelpers->treasury->receivedCredits->create([
'financial_account' => 'fa_123',
'network' => 'ach',
@@ -593,7 +620,10 @@ public function testCreateReceivedCredit()
public function testCreateReceivedDebit()
{
- $this->expectsRequest('post', '/v1/test_helpers/treasury/received_debits');
+ $this->expectsRequest(
+ 'post',
+ '/v1/test_helpers/treasury/received_debits'
+ );
$result = $this->client->testHelpers->treasury->receivedDebits->create([
'financial_account' => 'fa_123',
'network' => 'ach',
@@ -754,7 +784,10 @@ public function testListPerson()
public function testCreatePerson()
{
- $this->expectsRequest('post', '/v1/accounts/acct_xxxxxxxxxxxxx/persons');
+ $this->expectsRequest(
+ 'post',
+ '/v1/accounts/acct_xxxxxxxxxxxxx/persons'
+ );
$result = $this->client->accounts->createPerson(
'acct_xxxxxxxxxxxxx',
[
@@ -818,7 +851,10 @@ public function testListApplicationFee()
public function testRetrieveApplicationFee()
{
$this->expectsRequest('get', '/v1/application_fees/fee_xxxxxxxxxxxxx');
- $result = $this->client->applicationFees->retrieve('fee_xxxxxxxxxxxxx', []);
+ $result = $this->client->applicationFees->retrieve(
+ 'fee_xxxxxxxxxxxxx',
+ []
+ );
static::assertInstanceOf(\Stripe\ApplicationFee::class, $result);
}
@@ -909,7 +945,10 @@ public function testListBalanceTransaction()
public function testRetrieveBalanceTransaction()
{
- $this->expectsRequest('get', '/v1/balance_transactions/txn_xxxxxxxxxxxxx');
+ $this->expectsRequest(
+ 'get',
+ '/v1/balance_transactions/txn_xxxxxxxxxxxxx'
+ );
$result = $this->client->balanceTransactions->retrieve(
'txn_xxxxxxxxxxxxx',
[]
@@ -920,7 +959,9 @@ public function testRetrieveBalanceTransaction()
public function testListConfiguration2()
{
$this->expectsRequest('get', '/v1/billing_portal/configurations');
- $result = $this->client->billingPortal->configurations->all(['limit' => 3]);
+ $result = $this->client->billingPortal->configurations->all([
+ 'limit' => 3,
+ ]);
static::assertInstanceOf(\Stripe\Collection::class, $result);
static::assertInstanceOf(\Stripe\BillingPortal\Configuration::class, $result->data[0]);
}
@@ -1046,7 +1087,10 @@ public function testCreateSession4()
public function testRetrieveSession2()
{
- $this->expectsRequest('get', '/v1/checkout/sessions/cs_test_xxxxxxxxxxxxx');
+ $this->expectsRequest(
+ 'get',
+ '/v1/checkout/sessions/cs_test_xxxxxxxxxxxxx'
+ );
$result = $this->client->checkout->sessions->retrieve(
'cs_test_xxxxxxxxxxxxx',
[]
@@ -1306,7 +1350,10 @@ public function testListTaxId()
public function testCreateTaxId()
{
- $this->expectsRequest('post', '/v1/customers/cus_xxxxxxxxxxxxx/tax_ids');
+ $this->expectsRequest(
+ 'post',
+ '/v1/customers/cus_xxxxxxxxxxxxx/tax_ids'
+ );
$result = $this->client->customers->createTaxId(
'cus_xxxxxxxxxxxxx',
[
@@ -1544,7 +1591,9 @@ public function testRetrieveSession3()
public function testListVerificationReport()
{
$this->expectsRequest('get', '/v1/identity/verification_reports');
- $result = $this->client->identity->verificationReports->all(['limit' => 3]);
+ $result = $this->client->identity->verificationReports->all([
+ 'limit' => 3,
+ ]);
static::assertInstanceOf(\Stripe\Collection::class, $result);
static::assertInstanceOf(\Stripe\Identity\VerificationReport::class, $result->data[0]);
}
@@ -1729,7 +1778,10 @@ public function testUpdateInvoice()
public function testFinalizeInvoiceInvoice()
{
$this->expectsRequest('post', '/v1/invoices/in_xxxxxxxxxxxxx/finalize');
- $result = $this->client->invoices->finalizeInvoice('in_xxxxxxxxxxxxx', []);
+ $result = $this->client->invoices->finalizeInvoice(
+ 'in_xxxxxxxxxxxxx',
+ []
+ );
static::assertInstanceOf(\Stripe\Invoice::class, $result);
}
@@ -1868,7 +1920,10 @@ public function testCreateCardholder()
public function testRetrieveCardholder()
{
- $this->expectsRequest('get', '/v1/issuing/cardholders/ich_xxxxxxxxxxxxx');
+ $this->expectsRequest(
+ 'get',
+ '/v1/issuing/cardholders/ich_xxxxxxxxxxxxx'
+ );
$result = $this->client->issuing->cardholders->retrieve(
'ich_xxxxxxxxxxxxx',
[]
@@ -1878,7 +1933,10 @@ public function testRetrieveCardholder()
public function testUpdateCardholder()
{
- $this->expectsRequest('post', '/v1/issuing/cardholders/ich_xxxxxxxxxxxxx');
+ $this->expectsRequest(
+ 'post',
+ '/v1/issuing/cardholders/ich_xxxxxxxxxxxxx'
+ );
$result = $this->client->issuing->cardholders->update(
'ich_xxxxxxxxxxxxx',
['metadata' => ['order_id' => '6735']]
@@ -1908,7 +1966,10 @@ public function testCreateCard()
public function testRetrieveCard()
{
$this->expectsRequest('get', '/v1/issuing/cards/ic_xxxxxxxxxxxxx');
- $result = $this->client->issuing->cards->retrieve('ic_xxxxxxxxxxxxx', []);
+ $result = $this->client->issuing->cards->retrieve(
+ 'ic_xxxxxxxxxxxxx',
+ []
+ );
static::assertInstanceOf(\Stripe\Issuing\Card::class, $result);
}
@@ -1959,7 +2020,10 @@ public function testSubmitDispute()
'post',
'/v1/issuing/disputes/idp_xxxxxxxxxxxxx/submit'
);
- $result = $this->client->issuing->disputes->submit('idp_xxxxxxxxxxxxx', []);
+ $result = $this->client->issuing->disputes->submit(
+ 'idp_xxxxxxxxxxxxx',
+ []
+ );
static::assertInstanceOf(\Stripe\Issuing\Dispute::class, $result);
}
@@ -1973,7 +2037,10 @@ public function testListTransaction()
public function testRetrieveTransaction()
{
- $this->expectsRequest('get', '/v1/issuing/transactions/ipi_xxxxxxxxxxxxx');
+ $this->expectsRequest(
+ 'get',
+ '/v1/issuing/transactions/ipi_xxxxxxxxxxxxx'
+ );
$result = $this->client->issuing->transactions->retrieve(
'ipi_xxxxxxxxxxxxx',
[]
@@ -1983,7 +2050,10 @@ public function testRetrieveTransaction()
public function testUpdateTransaction()
{
- $this->expectsRequest('post', '/v1/issuing/transactions/ipi_xxxxxxxxxxxxx');
+ $this->expectsRequest(
+ 'post',
+ '/v1/issuing/transactions/ipi_xxxxxxxxxxxxx'
+ );
$result = $this->client->issuing->transactions->update(
'ipi_xxxxxxxxxxxxx',
['metadata' => ['order_id' => '6735']]
@@ -1994,7 +2064,10 @@ public function testUpdateTransaction()
public function testRetrieveMandate()
{
$this->expectsRequest('get', '/v1/mandates/mandate_xxxxxxxxxxxxx');
- $result = $this->client->mandates->retrieve('mandate_xxxxxxxxxxxxx', []);
+ $result = $this->client->mandates->retrieve(
+ 'mandate_xxxxxxxxxxxxx',
+ []
+ );
static::assertInstanceOf(\Stripe\Mandate::class, $result);
}
@@ -2020,7 +2093,10 @@ public function testCreatePaymentIntent2()
public function testRetrievePaymentIntent()
{
$this->expectsRequest('get', '/v1/payment_intents/pi_xxxxxxxxxxxxx');
- $result = $this->client->paymentIntents->retrieve('pi_xxxxxxxxxxxxx', []);
+ $result = $this->client->paymentIntents->retrieve(
+ 'pi_xxxxxxxxxxxxx',
+ []
+ );
static::assertInstanceOf(\Stripe\PaymentIntent::class, $result);
}
@@ -2063,7 +2139,10 @@ public function testCapturePaymentIntent()
'post',
'/v1/payment_intents/pi_xxxxxxxxxxxxx/capture'
);
- $result = $this->client->paymentIntents->capture('pi_xxxxxxxxxxxxx', []);
+ $result = $this->client->paymentIntents->capture(
+ 'pi_xxxxxxxxxxxxx',
+ []
+ );
static::assertInstanceOf(\Stripe\PaymentIntent::class, $result);
}
@@ -2141,7 +2220,10 @@ public function testCreatePaymentLink2()
public function testRetrievePaymentLink2()
{
$this->expectsRequest('get', '/v1/payment_links/plink_xxxxxxxxxxxxx');
- $result = $this->client->paymentLinks->retrieve('plink_xxxxxxxxxxxxx', []);
+ $result = $this->client->paymentLinks->retrieve(
+ 'plink_xxxxxxxxxxxxx',
+ []
+ );
static::assertInstanceOf(\Stripe\PaymentLink::class, $result);
}
@@ -2184,7 +2266,10 @@ public function testCreatePaymentMethod()
public function testRetrievePaymentMethod()
{
$this->expectsRequest('get', '/v1/payment_methods/pm_xxxxxxxxxxxxx');
- $result = $this->client->paymentMethods->retrieve('pm_xxxxxxxxxxxxx', []);
+ $result = $this->client->paymentMethods->retrieve(
+ 'pm_xxxxxxxxxxxxx',
+ []
+ );
static::assertInstanceOf(\Stripe\PaymentMethod::class, $result);
}
@@ -2433,7 +2518,9 @@ public function testListPromotionCode()
public function testCreatePromotionCode()
{
$this->expectsRequest('post', '/v1/promotion_codes');
- $result = $this->client->promotionCodes->create(['coupon' => 'Z4OV52SU']);
+ $result = $this->client->promotionCodes->create([
+ 'coupon' => 'Z4OV52SU',
+ ]);
static::assertInstanceOf(\Stripe\PromotionCode::class, $result);
}
@@ -2449,7 +2536,10 @@ public function testRetrievePromotionCode()
public function testUpdatePromotionCode()
{
- $this->expectsRequest('post', '/v1/promotion_codes/promo_xxxxxxxxxxxxx');
+ $this->expectsRequest(
+ 'post',
+ '/v1/promotion_codes/promo_xxxxxxxxxxxxx'
+ );
$result = $this->client->promotionCodes->update(
'promo_xxxxxxxxxxxxx',
['metadata' => ['order_id' => '6735']]
@@ -2607,8 +2697,14 @@ public function testCreateValueList()
public function testDeleteValueList()
{
- $this->expectsRequest('delete', '/v1/radar/value_lists/rsl_xxxxxxxxxxxxx');
- $result = $this->client->radar->valueLists->delete('rsl_xxxxxxxxxxxxx', []);
+ $this->expectsRequest(
+ 'delete',
+ '/v1/radar/value_lists/rsl_xxxxxxxxxxxxx'
+ );
+ $result = $this->client->radar->valueLists->delete(
+ 'rsl_xxxxxxxxxxxxx',
+ []
+ );
static::assertInstanceOf(\Stripe\Radar\ValueList::class, $result);
}
@@ -2624,7 +2720,10 @@ public function testRetrieveValueList()
public function testUpdateValueList()
{
- $this->expectsRequest('post', '/v1/radar/value_lists/rsl_xxxxxxxxxxxxx');
+ $this->expectsRequest(
+ 'post',
+ '/v1/radar/value_lists/rsl_xxxxxxxxxxxxx'
+ );
$result = $this->client->radar->valueLists->update(
'rsl_xxxxxxxxxxxxx',
['name' => 'Updated IP Block List']
@@ -2643,7 +2742,9 @@ public function testListRefund()
public function testCreateRefund()
{
$this->expectsRequest('post', '/v1/refunds');
- $result = $this->client->refunds->create(['charge' => 'ch_xxxxxxxxxxxxx']);
+ $result = $this->client->refunds->create([
+ 'charge' => 'ch_xxxxxxxxxxxxx',
+ ]);
static::assertInstanceOf(\Stripe\Refund::class, $result);
}
@@ -2694,7 +2795,10 @@ public function testCreateReportRun()
public function testRetrieveReportRun()
{
- $this->expectsRequest('get', '/v1/reporting/report_runs/frr_xxxxxxxxxxxxx');
+ $this->expectsRequest(
+ 'get',
+ '/v1/reporting/report_runs/frr_xxxxxxxxxxxxx'
+ );
$result = $this->client->reporting->reportRuns->retrieve(
'frr_xxxxxxxxxxxxx',
[]
@@ -2765,7 +2869,10 @@ public function testCreateSetupIntent()
public function testRetrieveSetupIntent()
{
$this->expectsRequest('get', '/v1/setup_intents/seti_xxxxxxxxxxxxx');
- $result = $this->client->setupIntents->retrieve('seti_xxxxxxxxxxxxx', []);
+ $result = $this->client->setupIntents->retrieve(
+ 'seti_xxxxxxxxxxxxx',
+ []
+ );
static::assertInstanceOf(\Stripe\SetupIntent::class, $result);
}
@@ -2840,7 +2947,10 @@ public function testCreateShippingRate2()
public function testRetrieveShippingRate()
{
$this->expectsRequest('get', '/v1/shipping_rates/shr_xxxxxxxxxxxxx');
- $result = $this->client->shippingRates->retrieve('shr_xxxxxxxxxxxxx', []);
+ $result = $this->client->shippingRates->retrieve(
+ 'shr_xxxxxxxxxxxxx',
+ []
+ );
static::assertInstanceOf(\Stripe\ShippingRate::class, $result);
}
@@ -2922,8 +3032,14 @@ public function testCreateSubscriptionItem()
public function testDeleteSubscriptionItem()
{
- $this->expectsRequest('delete', '/v1/subscription_items/si_xxxxxxxxxxxxx');
- $result = $this->client->subscriptionItems->delete('si_xxxxxxxxxxxxx', []);
+ $this->expectsRequest(
+ 'delete',
+ '/v1/subscription_items/si_xxxxxxxxxxxxx'
+ );
+ $result = $this->client->subscriptionItems->delete(
+ 'si_xxxxxxxxxxxxx',
+ []
+ );
static::assertInstanceOf(\Stripe\SubscriptionItem::class, $result);
}
@@ -2939,7 +3055,10 @@ public function testRetrieveSubscriptionItem()
public function testUpdateSubscriptionItem()
{
- $this->expectsRequest('post', '/v1/subscription_items/si_xxxxxxxxxxxxx');
+ $this->expectsRequest(
+ 'post',
+ '/v1/subscription_items/si_xxxxxxxxxxxxx'
+ );
$result = $this->client->subscriptionItems->update(
'si_xxxxxxxxxxxxx',
['metadata' => ['order_id' => '6735']]
@@ -3087,7 +3206,10 @@ public function testCancelSubscription()
public function testRetrieveSubscription()
{
$this->expectsRequest('get', '/v1/subscriptions/sub_xxxxxxxxxxxxx');
- $result = $this->client->subscriptions->retrieve('sub_xxxxxxxxxxxxx', []);
+ $result = $this->client->subscriptions->retrieve(
+ 'sub_xxxxxxxxxxxxx',
+ []
+ );
static::assertInstanceOf(\Stripe\Subscription::class, $result);
}
@@ -3244,7 +3366,10 @@ public function testCreateLocation()
public function testDeleteLocation()
{
- $this->expectsRequest('delete', '/v1/terminal/locations/tml_xxxxxxxxxxxxx');
+ $this->expectsRequest(
+ 'delete',
+ '/v1/terminal/locations/tml_xxxxxxxxxxxxx'
+ );
$result = $this->client->terminal->locations->delete(
'tml_xxxxxxxxxxxxx',
[]
@@ -3254,7 +3379,10 @@ public function testDeleteLocation()
public function testRetrieveLocation()
{
- $this->expectsRequest('get', '/v1/terminal/locations/tml_xxxxxxxxxxxxx');
+ $this->expectsRequest(
+ 'get',
+ '/v1/terminal/locations/tml_xxxxxxxxxxxxx'
+ );
$result = $this->client->terminal->locations->retrieve(
'tml_xxxxxxxxxxxxx',
[]
@@ -3264,7 +3392,10 @@ public function testRetrieveLocation()
public function testUpdateLocation()
{
- $this->expectsRequest('post', '/v1/terminal/locations/tml_xxxxxxxxxxxxx');
+ $this->expectsRequest(
+ 'post',
+ '/v1/terminal/locations/tml_xxxxxxxxxxxxx'
+ );
$result = $this->client->terminal->locations->update(
'tml_xxxxxxxxxxxxx',
['display_name' => 'My First Store']
@@ -3293,8 +3424,14 @@ public function testCreateReader()
public function testDeleteReader()
{
- $this->expectsRequest('delete', '/v1/terminal/readers/tmr_xxxxxxxxxxxxx');
- $result = $this->client->terminal->readers->delete('tmr_xxxxxxxxxxxxx', []);
+ $this->expectsRequest(
+ 'delete',
+ '/v1/terminal/readers/tmr_xxxxxxxxxxxxx'
+ );
+ $result = $this->client->terminal->readers->delete(
+ 'tmr_xxxxxxxxxxxxx',
+ []
+ );
static::assertInstanceOf(\Stripe\Terminal\Reader::class, $result);
}
@@ -3472,7 +3609,9 @@ public function testCreateToken5()
public function testCreateToken6()
{
$this->expectsRequest('post', '/v1/tokens');
- $result = $this->client->tokens->create(['cvc_update' => ['cvc' => '123']]);
+ $result = $this->client->tokens->create([
+ 'cvc_update' => ['cvc' => '123'],
+ ]);
static::assertInstanceOf(\Stripe\Token::class, $result);
}
@@ -3566,7 +3705,10 @@ public function testUpdateTransfer()
public function testListTransferReversal()
{
- $this->expectsRequest('get', '/v1/transfers/tr_xxxxxxxxxxxxx/reversals');
+ $this->expectsRequest(
+ 'get',
+ '/v1/transfers/tr_xxxxxxxxxxxxx/reversals'
+ );
$result = $this->client->transfers->allReversals(
'tr_xxxxxxxxxxxxx',
['limit' => 3]
@@ -3577,7 +3719,10 @@ public function testListTransferReversal()
public function testCreateTransferReversal()
{
- $this->expectsRequest('post', '/v1/transfers/tr_xxxxxxxxxxxxx/reversals');
+ $this->expectsRequest(
+ 'post',
+ '/v1/transfers/tr_xxxxxxxxxxxxx/reversals'
+ );
$result = $this->client->transfers->createReversal(
'tr_xxxxxxxxxxxxx',
['amount' => 100]
@@ -3682,7 +3827,9 @@ public function testRetrieveDebitReversal()
public function testListFinancialAccount()
{
$this->expectsRequest('get', '/v1/treasury/financial_accounts');
- $result = $this->client->treasury->financialAccounts->all(['limit' => 3]);
+ $result = $this->client->treasury->financialAccounts->all([
+ 'limit' => 3,
+ ]);
static::assertInstanceOf(\Stripe\Collection::class, $result);
static::assertInstanceOf(\Stripe\Treasury\FinancialAccount::class, $result->data[0]);
}
@@ -3993,15 +4140,24 @@ public function testListWebhookEndpoint()
public function testDeleteWebhookEndpoint()
{
- $this->expectsRequest('delete', '/v1/webhook_endpoints/we_xxxxxxxxxxxxx');
- $result = $this->client->webhookEndpoints->delete('we_xxxxxxxxxxxxx', []);
+ $this->expectsRequest(
+ 'delete',
+ '/v1/webhook_endpoints/we_xxxxxxxxxxxxx'
+ );
+ $result = $this->client->webhookEndpoints->delete(
+ 'we_xxxxxxxxxxxxx',
+ []
+ );
static::assertInstanceOf(\Stripe\WebhookEndpoint::class, $result);
}
public function testRetrieveWebhookEndpoint()
{
$this->expectsRequest('get', '/v1/webhook_endpoints/we_xxxxxxxxxxxxx');
- $result = $this->client->webhookEndpoints->retrieve('we_xxxxxxxxxxxxx', []);
+ $result = $this->client->webhookEndpoints->retrieve(
+ 'we_xxxxxxxxxxxxx',
+ []
+ );
static::assertInstanceOf(\Stripe\WebhookEndpoint::class, $result);
}