From b5d340eb419c5ce301dcecfc84f48112b1e77e04 Mon Sep 17 00:00:00 2001
From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Fri, 15 Dec 2023 06:27:08 +0000
Subject: [PATCH 01/12] Update generated code for v717
---
OPENAPI_VERSION | 2 +-
lib/Refund.php | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index 2689ae6f7..52a96e6e5 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v710
\ No newline at end of file
+v717
\ No newline at end of file
diff --git a/lib/Refund.php b/lib/Refund.php
index 2fd33949a..7ed0b37e1 100644
--- a/lib/Refund.php
+++ b/lib/Refund.php
@@ -19,6 +19,7 @@
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
* @property null|string $description An arbitrary string attached to the object. You can use this for displaying to users (available on non-card refunds only).
+ * @property null|\Stripe\StripeObject $destination_details
* @property null|string|\Stripe\BalanceTransaction $failure_balance_transaction After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction.
* @property null|string $failure_reason Provides the reason for the refund failure. Possible values are: lost_or_stolen_card
, expired_or_canceled_card
, charge_for_pending_refund_disputed
, insufficient_funds
, declined
, merchant_request
, or unknown
.
* @property null|string $instructions_email For payment methods without native refund support (for example, Konbini, PromptPay), provide an email address for the customer to receive refund instructions.
From a42edb03a289a43fbc60c1a10914e32d0f8328a7 Mon Sep 17 00:00:00 2001
From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Fri, 15 Dec 2023 17:17:13 +0000
Subject: [PATCH 02/12] Update generated code for v718
---
OPENAPI_VERSION | 2 +-
lib/ErrorObject.php | 1 +
lib/Tax/Calculation.php | 1 +
lib/Tax/Transaction.php | 1 +
4 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index 52a96e6e5..e9217cf09 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v717
\ No newline at end of file
+v718
\ No newline at end of file
diff --git a/lib/ErrorObject.php b/lib/ErrorObject.php
index 6e94a2041..87650e290 100644
--- a/lib/ErrorObject.php
+++ b/lib/ErrorObject.php
@@ -190,6 +190,7 @@ class ErrorObject extends StripeObject
const CODE_SETUP_INTENT_MANDATE_INVALID = 'setup_intent_mandate_invalid';
const CODE_SETUP_INTENT_SETUP_ATTEMPT_EXPIRED = 'setup_intent_setup_attempt_expired';
const CODE_SETUP_INTENT_UNEXPECTED_STATE = 'setup_intent_unexpected_state';
+ const CODE_SHIPPING_ADDRESS_INVALID = 'shipping_address_invalid';
const CODE_SHIPPING_CALCULATION_FAILED = 'shipping_calculation_failed';
const CODE_SKU_INACTIVE = 'sku_inactive';
const CODE_STATE_UNSUPPORTED = 'state_unsupported';
diff --git a/lib/Tax/Calculation.php b/lib/Tax/Calculation.php
index db2f3480a..35b54bd73 100644
--- a/lib/Tax/Calculation.php
+++ b/lib/Tax/Calculation.php
@@ -18,6 +18,7 @@
* @property null|int $expires_at Timestamp of date at which the tax calculation will expire.
* @property null|\Stripe\Collection<\Stripe\Tax\CalculationLineItem> $line_items The list of items the customer is purchasing.
* @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 null|\Stripe\StripeObject $ship_from_details The details of the ship from location, such as the address.
* @property null|\Stripe\StripeObject $shipping_cost The shipping cost details for the calculation.
* @property int $tax_amount_exclusive The amount of tax to be collected on top of the line item prices.
* @property int $tax_amount_inclusive The amount of tax already included in the line item prices.
diff --git a/lib/Tax/Transaction.php b/lib/Tax/Transaction.php
index 587a49bc2..7dcc373b6 100644
--- a/lib/Tax/Transaction.php
+++ b/lib/Tax/Transaction.php
@@ -20,6 +20,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 string $reference A custom unique identifier, such as 'myOrder_123'.
* @property null|\Stripe\StripeObject $reversal If type=reversal
, contains information about what was reversed.
+ * @property null|\Stripe\StripeObject $ship_from_details The details of the ship from location, such as the address.
* @property null|\Stripe\StripeObject $shipping_cost The shipping cost details for the transaction.
* @property int $tax_date Timestamp of date at which the tax rules and rates in effect applies for the calculation.
* @property string $type If reversal
, this transaction reverses an earlier transaction.
From dcea34243460f89bff20fe550de38eac837a88c6 Mon Sep 17 00:00:00 2001
From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Mon, 18 Dec 2023 09:58:28 +0000
Subject: [PATCH 03/12] Update generated code for v719
---
OPENAPI_VERSION | 2 +-
lib/Invoice.php | 2 +-
lib/QuotePreviewInvoice.php | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index e9217cf09..e4a705793 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v718
\ No newline at end of file
+v719
\ No newline at end of file
diff --git a/lib/Invoice.php b/lib/Invoice.php
index 74ae66b04..f984bdb06 100644
--- a/lib/Invoice.php
+++ b/lib/Invoice.php
@@ -82,7 +82,7 @@
* @property null|\Stripe\StripeObject $from_invoice Details of the invoice that was cloned. See the revision documentation for more details.
* @property null|string $hosted_invoice_url The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null.
* @property null|string $invoice_pdf The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null.
- * @property null|\Stripe\StripeObject $issuer The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ * @property null|\Stripe\StripeObject $issuer
* @property null|\Stripe\StripeObject $last_finalization_error The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized.
* @property null|string|\Stripe\Invoice $latest_revision The ID of the most recent non-draft revision of this invoice
* @property \Stripe\Collection<\Stripe\InvoiceLineItem> $lines The individual line items that make up the invoice. lines
is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order.
diff --git a/lib/QuotePreviewInvoice.php b/lib/QuotePreviewInvoice.php
index 3f26ae103..c3d592e1e 100644
--- a/lib/QuotePreviewInvoice.php
+++ b/lib/QuotePreviewInvoice.php
@@ -78,7 +78,7 @@
* @property null|int $ending_balance Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null.
* @property null|string $footer Footer displayed on the invoice.
* @property null|\Stripe\StripeObject $from_invoice Details of the invoice that was cloned. See the revision documentation for more details.
- * @property null|\Stripe\StripeObject $issuer The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ * @property null|\Stripe\StripeObject $issuer
* @property null|\Stripe\StripeObject $last_finalization_error The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized.
* @property null|string|\Stripe\Invoice $latest_revision The ID of the most recent non-draft revision of this invoice
* @property \Stripe\Collection<\Stripe\InvoiceLineItem> $lines The individual line items that make up the invoice. lines
is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order.
From 20d29e8a3c944cbff513e57446011db92632d84a Mon Sep 17 00:00:00 2001
From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Mon, 18 Dec 2023 17:59:09 +0000
Subject: [PATCH 04/12] Update generated code for v721
---
OPENAPI_VERSION | 2 +-
lib/PaymentMethodConfiguration.php | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index e4a705793..7d987f293 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v719
\ No newline at end of file
+v721
\ No newline at end of file
diff --git a/lib/PaymentMethodConfiguration.php b/lib/PaymentMethodConfiguration.php
index 39d6be8ac..ad0b4a49a 100644
--- a/lib/PaymentMethodConfiguration.php
+++ b/lib/PaymentMethodConfiguration.php
@@ -60,6 +60,7 @@
* @property null|\Stripe\StripeObject $paynow
* @property null|\Stripe\StripeObject $paypal
* @property null|\Stripe\StripeObject $promptpay
+ * @property null|\Stripe\StripeObject $revolut_pay
* @property null|\Stripe\StripeObject $sepa_debit
* @property null|\Stripe\StripeObject $sofort
* @property null|\Stripe\StripeObject $upi
From b6a6e10c1226e7bcaf3c8bf0ec54776cdf73b270 Mon Sep 17 00:00:00 2001
From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Tue, 19 Dec 2023 10:28:11 +0000
Subject: [PATCH 05/12] Update generated code for v722
---
OPENAPI_VERSION | 2 +-
lib/Quote.php | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index 7d987f293..40e4e0d28 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v721
\ No newline at end of file
+v722
\ No newline at end of file
diff --git a/lib/Quote.php b/lib/Quote.php
index d8cf17e24..3dbe32046 100644
--- a/lib/Quote.php
+++ b/lib/Quote.php
@@ -30,7 +30,7 @@
* @property null|\Stripe\StripeObject $from_quote Details of the quote that was cloned. See the cloning documentation for more details.
* @property null|string $header A header that will be displayed on the quote PDF.
* @property null|string|\Stripe\Invoice $invoice The invoice that was created from this quote.
- * @property null|\Stripe\StripeObject $invoice_settings All invoices will be billed using the specified settings.
+ * @property \Stripe\StripeObject $invoice_settings
* @property null|\Stripe\Collection<\Stripe\LineItem> $line_items A list of items the customer is being quoted for.
* @property null|string[] $lines A list of lines on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
* @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.
From 440c5dc7a1b70137fc674964de52e10949adfd85 Mon Sep 17 00:00:00 2001
From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Tue, 19 Dec 2023 18:16:40 +0000
Subject: [PATCH 06/12] Update generated code for v724
---
OPENAPI_VERSION | 2 +-
lib/ConfirmationToken.php | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index 40e4e0d28..a845eb0d4 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v722
\ No newline at end of file
+v724
\ No newline at end of file
diff --git a/lib/ConfirmationToken.php b/lib/ConfirmationToken.php
index 2d9fbacef..e86ed6685 100644
--- a/lib/ConfirmationToken.php
+++ b/lib/ConfirmationToken.php
@@ -9,6 +9,8 @@
* to your server for confirming a PaymentIntent or SetupIntent. If the confirmation
* is successful, values present on the ConfirmationToken are written onto the Intent.
*
+ * To learn more or request access, visit the related guided: Finalize payments on the server using Confirmation Tokens.
+ *
* @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 $created Time at which the object was created. Measured in seconds since the Unix epoch.
From a6e11d4cdbbddf73b69e47b70a1a9c0e9b3a556f Mon Sep 17 00:00:00 2001
From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Wed, 20 Dec 2023 00:05:54 +0000
Subject: [PATCH 07/12] Update generated code for v726
---
OPENAPI_VERSION | 2 +-
lib/File.php | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index a845eb0d4..c4193224c 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v724
\ No newline at end of file
+v726
\ No newline at end of file
diff --git a/lib/File.php b/lib/File.php
index a5d2b9e27..b64c77a5c 100644
--- a/lib/File.php
+++ b/lib/File.php
@@ -8,7 +8,7 @@
* This object represents files hosted on Stripe's servers. You can upload
* files with the create file request
* (for example, when uploading dispute evidence). Stripe also
- * creates files independetly (for example, the results of a Sigma scheduled
+ * creates files independently (for example, the results of a Sigma scheduled
* query).
*
* Related guide: File upload guide
From 7804a71fb16d0ece9813a432e8138239fb0e97c7 Mon Sep 17 00:00:00 2001
From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Thu, 21 Dec 2023 19:43:04 +0000
Subject: [PATCH 08/12] Update generated code for v733
---
OPENAPI_VERSION | 2 +-
tests/Stripe/GeneratedExamplesTest.php | 16 ++++++++++++++++
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index c4193224c..5c17803ea 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v726
\ No newline at end of file
+v733
\ No newline at end of file
diff --git a/tests/Stripe/GeneratedExamplesTest.php b/tests/Stripe/GeneratedExamplesTest.php
index 69ab1dd09..a1e500328 100644
--- a/tests/Stripe/GeneratedExamplesTest.php
+++ b/tests/Stripe/GeneratedExamplesTest.php
@@ -3153,6 +3153,22 @@ public function testTaxRatesPost2()
static::assertInstanceOf(\Stripe\TaxRate::class, $result);
}
+ public function testTaxSettingsGet()
+ {
+ $this->expectsRequest('get', '/v1/tax/settings');
+ $result = $this->client->tax->settings->retrieve([]);
+ static::assertInstanceOf(\Stripe\Tax\Settings::class, $result);
+ }
+
+ public function testTaxSettingsPost()
+ {
+ $this->expectsRequest('post', '/v1/tax/settings');
+ $result = $this->client->tax->settings->update([
+ 'defaults' => ['tax_code' => 'txcd_10000000'],
+ ]);
+ static::assertInstanceOf(\Stripe\Tax\Settings::class, $result);
+ }
+
public function testTaxTransactionsCreateFromCalculationPost()
{
$this->expectsRequest(
From 19de34e828309eab4acfc67cd2bf7f049451b865 Mon Sep 17 00:00:00 2001
From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Thu, 21 Dec 2023 22:27:36 +0000
Subject: [PATCH 09/12] Update generated code for v734
---
OPENAPI_VERSION | 2 +-
lib/Checkout/Session.php | 2 +-
tests/Stripe/GeneratedExamplesTest.php | 32 ++++++++++++++++++++++++++
3 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index 5c17803ea..409300d1c 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v733
\ No newline at end of file
+v734
\ No newline at end of file
diff --git a/lib/Checkout/Session.php b/lib/Checkout/Session.php
index 5b0b0e974..531a74e78 100644
--- a/lib/Checkout/Session.php
+++ b/lib/Checkout/Session.php
@@ -67,7 +67,7 @@
* @property null|\Stripe\StripeObject $shipping_details Shipping information for this Checkout Session.
* @property \Stripe\StripeObject[] $shipping_options The shipping rate options applied to this Session.
* @property null|string $status The status of the Checkout Session, one of open
, complete
, or expired
.
- * @property null|string $submit_type Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the submit button. submit_type
can only be specified on Checkout Sessions in payment
mode, but not Checkout Sessions in subscription
or setup
mode.
+ * @property null|string $submit_type Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the submit button. submit_type
can only be specified on Checkout Sessions in payment
mode, but not Checkout Sessions in subscription
or setup
mode. Possible values are auto
, pay
, book
, donate
. If blank or auto
, pay
is used.
* @property null|string|\Stripe\Subscription $subscription The ID of the subscription for Checkout Sessions in subscription
mode.
* @property null|string $success_url The URL the customer will be directed to after the payment or subscription creation is successful.
* @property null|\Stripe\StripeObject $tax_id_collection
diff --git a/tests/Stripe/GeneratedExamplesTest.php b/tests/Stripe/GeneratedExamplesTest.php
index a1e500328..e7b0bc03e 100644
--- a/tests/Stripe/GeneratedExamplesTest.php
+++ b/tests/Stripe/GeneratedExamplesTest.php
@@ -3153,6 +3153,38 @@ public function testTaxRatesPost2()
static::assertInstanceOf(\Stripe\TaxRate::class, $result);
}
+ public function testTaxRegistrationsGet()
+ {
+ $this->expectsRequest('get', '/v1/tax/registrations');
+ $result = $this->client->tax->registrations->all(['status' => 'all']);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\Tax\Registration::class, $result->data[0]);
+ }
+
+ public function testTaxRegistrationsPost()
+ {
+ $this->expectsRequest('post', '/v1/tax/registrations');
+ $result = $this->client->tax->registrations->create([
+ 'country' => 'IE',
+ 'country_options' => ['ie' => ['type' => 'oss_union']],
+ 'active_from' => 'now',
+ ]);
+ static::assertInstanceOf(\Stripe\Tax\Registration::class, $result);
+ }
+
+ public function testTaxRegistrationsPost2()
+ {
+ $this->expectsRequest(
+ 'post',
+ '/v1/tax/registrations/taxreg_xxxxxxxxxxxxx'
+ );
+ $result = $this->client->tax->registrations->update(
+ 'taxreg_xxxxxxxxxxxxx',
+ ['expires_at' => 'now']
+ );
+ static::assertInstanceOf(\Stripe\Tax\Registration::class, $result);
+ }
+
public function testTaxSettingsGet()
{
$this->expectsRequest('get', '/v1/tax/settings');
From e70b6e159f10ecfae24bbf00c9b2e2b790391625 Mon Sep 17 00:00:00 2001
From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Thu, 21 Dec 2023 22:42:24 +0000
Subject: [PATCH 10/12] Update generated code for v734
---
tests/Stripe/GeneratedExamplesTest.php | 49 ++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/tests/Stripe/GeneratedExamplesTest.php b/tests/Stripe/GeneratedExamplesTest.php
index e7b0bc03e..41d95c220 100644
--- a/tests/Stripe/GeneratedExamplesTest.php
+++ b/tests/Stripe/GeneratedExamplesTest.php
@@ -1136,6 +1136,32 @@ public function testFinancialConnectionsAccountsRefreshPost()
static::assertInstanceOf(\Stripe\FinancialConnections\Account::class, $result);
}
+ public function testFinancialConnectionsAccountsSubscribePost()
+ {
+ $this->expectsRequest(
+ 'post',
+ '/v1/financial_connections/accounts/fa_123/subscribe'
+ );
+ $result = $this->client->financialConnections->accounts->subscribe(
+ 'fa_123',
+ ['features' => ['transactions']]
+ );
+ static::assertInstanceOf(\Stripe\FinancialConnections\Account::class, $result);
+ }
+
+ public function testFinancialConnectionsAccountsUnsubscribePost()
+ {
+ $this->expectsRequest(
+ 'post',
+ '/v1/financial_connections/accounts/fa_123/unsubscribe'
+ );
+ $result = $this->client->financialConnections->accounts->unsubscribe(
+ 'fa_123',
+ ['features' => ['transactions']]
+ );
+ static::assertInstanceOf(\Stripe\FinancialConnections\Account::class, $result);
+ }
+
public function testFinancialConnectionsSessionsGet()
{
$this->expectsRequest(
@@ -1189,6 +1215,29 @@ public function testFinancialConnectionsSessionsPost2()
static::assertInstanceOf(\Stripe\FinancialConnections\Session::class, $result);
}
+ public function testFinancialConnectionsTransactionsGet()
+ {
+ $this->expectsRequest(
+ 'get',
+ '/v1/financial_connections/transactions/tr_123'
+ );
+ $result = $this->client->financialConnections->transactions->retrieve(
+ 'tr_123',
+ []
+ );
+ static::assertInstanceOf(\Stripe\FinancialConnections\Transaction::class, $result);
+ }
+
+ public function testFinancialConnectionsTransactionsGet2()
+ {
+ $this->expectsRequest('get', '/v1/financial_connections/transactions');
+ $result = $this->client->financialConnections->transactions->all([
+ 'account' => 'fca_xyz',
+ ]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\FinancialConnections\Transaction::class, $result->data[0]);
+ }
+
public function testIdentityVerificationReportsGet()
{
$this->expectsRequest('get', '/v1/identity/verification_reports');
From 851c75ee55ac05d57d7a8a65557d980bdd694d5f Mon Sep 17 00:00:00 2001
From: "stripe-openapi[bot]"
<105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Thu, 21 Dec 2023 14:52:41 -0800
Subject: [PATCH 11/12] Update generated code (#1621)
* Update generated code for v716
* Update generated code for v717
* Update generated code for v721
* Update generated code for v722
* Update generated code for v726
* Update generated code for v733
* Update generated code for v733
* Update generated code for v734
* Update generated code for v734
---------
Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
---
OPENAPI_VERSION | 2 +-
init.php | 2 +
lib/Checkout/Session.php | 2 +-
lib/Event.php | 2 +
lib/File.php | 2 +-
lib/FinancialConnections/Account.php | 36 +++++++
lib/FinancialConnections/Transaction.php | 33 +++++++
lib/PaymentIntent.php | 2 +-
lib/PaymentMethodConfiguration.php | 1 +
lib/Quote.php | 2 +-
lib/Refund.php | 1 +
.../FinancialConnections/AccountService.php | 34 +++++++
.../FinancialConnectionsServiceFactory.php | 2 +
.../TransactionService.php | 39 ++++++++
lib/Util/ObjectTypes.php | 1 +
tests/Stripe/GeneratedExamplesTest.php | 97 +++++++++++++++++++
16 files changed, 253 insertions(+), 5 deletions(-)
create mode 100644 lib/FinancialConnections/Transaction.php
create mode 100644 lib/Service/FinancialConnections/TransactionService.php
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index 55d0a33c4..409300d1c 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v704
\ No newline at end of file
+v734
\ No newline at end of file
diff --git a/init.php b/init.php
index 3b7353232..b3e3bc457 100644
--- a/init.php
+++ b/init.php
@@ -119,6 +119,7 @@
require __DIR__ . '/lib/FinancialConnections/AccountOwner.php';
require __DIR__ . '/lib/FinancialConnections/AccountOwnership.php';
require __DIR__ . '/lib/FinancialConnections/Session.php';
+require __DIR__ . '/lib/FinancialConnections/Transaction.php';
require __DIR__ . '/lib/FundingInstructions.php';
require __DIR__ . '/lib/Identity/VerificationReport.php';
require __DIR__ . '/lib/Identity/VerificationSession.php';
@@ -186,6 +187,7 @@
require __DIR__ . '/lib/Service/FinancialConnections/AccountService.php';
require __DIR__ . '/lib/Service/FinancialConnections/FinancialConnectionsServiceFactory.php';
require __DIR__ . '/lib/Service/FinancialConnections/SessionService.php';
+require __DIR__ . '/lib/Service/FinancialConnections/TransactionService.php';
require __DIR__ . '/lib/Service/Identity/IdentityServiceFactory.php';
require __DIR__ . '/lib/Service/Identity/VerificationReportService.php';
require __DIR__ . '/lib/Service/Identity/VerificationSessionService.php';
diff --git a/lib/Checkout/Session.php b/lib/Checkout/Session.php
index 5b0b0e974..531a74e78 100644
--- a/lib/Checkout/Session.php
+++ b/lib/Checkout/Session.php
@@ -67,7 +67,7 @@
* @property null|\Stripe\StripeObject $shipping_details Shipping information for this Checkout Session.
* @property \Stripe\StripeObject[] $shipping_options The shipping rate options applied to this Session.
* @property null|string $status The status of the Checkout Session, one of open
, complete
, or expired
.
- * @property null|string $submit_type Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the submit button. submit_type
can only be specified on Checkout Sessions in payment
mode, but not Checkout Sessions in subscription
or setup
mode.
+ * @property null|string $submit_type Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the submit button. submit_type
can only be specified on Checkout Sessions in payment
mode, but not Checkout Sessions in subscription
or setup
mode. Possible values are auto
, pay
, book
, donate
. If blank or auto
, pay
is used.
* @property null|string|\Stripe\Subscription $subscription The ID of the subscription for Checkout Sessions in subscription
mode.
* @property null|string $success_url The URL the customer will be directed to after the payment or subscription creation is successful.
* @property null|\Stripe\StripeObject $tax_id_collection
diff --git a/lib/Event.php b/lib/Event.php
index f430fdf0d..4bd0270f1 100644
--- a/lib/Event.php
+++ b/lib/Event.php
@@ -130,6 +130,7 @@ class Event extends ApiResource
const FINANCIAL_CONNECTIONS_ACCOUNT_DISCONNECTED = 'financial_connections.account.disconnected';
const FINANCIAL_CONNECTIONS_ACCOUNT_REACTIVATED = 'financial_connections.account.reactivated';
const FINANCIAL_CONNECTIONS_ACCOUNT_REFRESHED_BALANCE = 'financial_connections.account.refreshed_balance';
+ const FINANCIAL_CONNECTIONS_ACCOUNT_REFRESHED_TRANSACTIONS = 'financial_connections.account.refreshed_transactions';
const IDENTITY_VERIFICATION_SESSION_CANCELED = 'identity.verification_session.canceled';
const IDENTITY_VERIFICATION_SESSION_CREATED = 'identity.verification_session.created';
const IDENTITY_VERIFICATION_SESSION_PROCESSING = 'identity.verification_session.processing';
@@ -363,6 +364,7 @@ class Event extends ApiResource
const TYPE_FINANCIAL_CONNECTIONS_ACCOUNT_DISCONNECTED = 'financial_connections.account.disconnected';
const TYPE_FINANCIAL_CONNECTIONS_ACCOUNT_REACTIVATED = 'financial_connections.account.reactivated';
const TYPE_FINANCIAL_CONNECTIONS_ACCOUNT_REFRESHED_BALANCE = 'financial_connections.account.refreshed_balance';
+ const TYPE_FINANCIAL_CONNECTIONS_ACCOUNT_REFRESHED_TRANSACTIONS = 'financial_connections.account.refreshed_transactions';
const TYPE_IDENTITY_VERIFICATION_SESSION_CANCELED = 'identity.verification_session.canceled';
const TYPE_IDENTITY_VERIFICATION_SESSION_CREATED = 'identity.verification_session.created';
const TYPE_IDENTITY_VERIFICATION_SESSION_PROCESSING = 'identity.verification_session.processing';
diff --git a/lib/File.php b/lib/File.php
index a5d2b9e27..b64c77a5c 100644
--- a/lib/File.php
+++ b/lib/File.php
@@ -8,7 +8,7 @@
* This object represents files hosted on Stripe's servers. You can upload
* files with the create file request
* (for example, when uploading dispute evidence). Stripe also
- * creates files independetly (for example, the results of a Sigma scheduled
+ * creates files independently (for example, the results of a Sigma scheduled
* query).
*
* Related guide: File upload guide
diff --git a/lib/FinancialConnections/Account.php b/lib/FinancialConnections/Account.php
index 70bc46306..e83289bda 100644
--- a/lib/FinancialConnections/Account.php
+++ b/lib/FinancialConnections/Account.php
@@ -23,7 +23,9 @@
* @property null|string[] $permissions The list of permissions granted by this account.
* @property string $status The status of the link to the account.
* @property string $subcategory
If category
is cash
, one of:
- checking
- savings
- other
If category
is credit
, one of:
- mortgage
- line_of_credit
- credit_card
- other
If category
is investment
or other
, this will be other
.
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 transaction.
+ * @property \Stripe\StripeObject $status_transitions
+ * @property int $transacted_at Time at which the transaction was transacted. Measured in seconds since the Unix epoch.
+ * @property string $transaction_refresh The token of the transaction refresh that last updated or created this transaction.
+ * @property int $updated Time at which the object was last updated. Measured in seconds since the Unix epoch.
+ */
+class Transaction extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'financial_connections.transaction';
+
+ use \Stripe\ApiOperations\All;
+ use \Stripe\ApiOperations\Retrieve;
+
+ const STATUS_PENDING = 'pending';
+ const STATUS_POSTED = 'posted';
+ const STATUS_VOID = 'void';
+}
diff --git a/lib/PaymentIntent.php b/lib/PaymentIntent.php
index 41b293c03..204c7d80c 100644
--- a/lib/PaymentIntent.php
+++ b/lib/PaymentIntent.php
@@ -30,7 +30,7 @@
* @property null|string $cancellation_reason Reason for cancellation of this PaymentIntent, either user-provided (duplicate
, fraudulent
, requested_by_customer
, or abandoned
) or generated by Stripe internally (failed_invoice
, void_invoice
, or automatic
).
* @property string $capture_method Controls when the funds will be captured from the customer's account.
* @property null|string $client_secret The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key.
The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
Refer to our docs to accept a payment and learn about how client_secret
should be handled.
ID of the Customer this PaymentIntent belongs to, if one exists.
Payment methods attached to other Customers cannot be used with this PaymentIntent.
If present in combination with setup_future_usage, this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete.
diff --git a/lib/PaymentMethodConfiguration.php b/lib/PaymentMethodConfiguration.php index 39d6be8ac..ad0b4a49a 100644 --- a/lib/PaymentMethodConfiguration.php +++ b/lib/PaymentMethodConfiguration.php @@ -60,6 +60,7 @@ * @property null|\Stripe\StripeObject $paynow * @property null|\Stripe\StripeObject $paypal * @property null|\Stripe\StripeObject $promptpay + * @property null|\Stripe\StripeObject $revolut_pay * @property null|\Stripe\StripeObject $sepa_debit * @property null|\Stripe\StripeObject $sofort * @property null|\Stripe\StripeObject $upi diff --git a/lib/Quote.php b/lib/Quote.php index 5904b7294..51a5e6484 100644 --- a/lib/Quote.php +++ b/lib/Quote.php @@ -29,7 +29,7 @@ * @property null|\Stripe\StripeObject $from_quote Details of the quote that was cloned. See the cloning documentation for more details. * @property null|string $header A header that will be displayed on the quote PDF. * @property null|string|\Stripe\Invoice $invoice The invoice that was created from this quote. - * @property null|\Stripe\StripeObject $invoice_settings All invoices will be billed using the specified settings. + * @property \Stripe\StripeObject $invoice_settings * @property null|\Stripe\Collection<\Stripe\LineItem> $line_items A list of items the customer is being quoted for. * @property bool $livemode Has the valuetrue
if the object exists in live mode or the value false
if the object exists in test mode.
* @property \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.
diff --git a/lib/Refund.php b/lib/Refund.php
index 2fd33949a..7ed0b37e1 100644
--- a/lib/Refund.php
+++ b/lib/Refund.php
@@ -19,6 +19,7 @@
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
* @property null|string $description An arbitrary string attached to the object. You can use this for displaying to users (available on non-card refunds only).
+ * @property null|\Stripe\StripeObject $destination_details
* @property null|string|\Stripe\BalanceTransaction $failure_balance_transaction After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction.
* @property null|string $failure_reason Provides the reason for the refund failure. Possible values are: lost_or_stolen_card
, expired_or_canceled_card
, charge_for_pending_refund_disputed
, insufficient_funds
, declined
, merchant_request
, or unknown
.
* @property null|string $instructions_email For payment methods without native refund support (for example, Konbini, PromptPay), provide an email address for the customer to receive refund instructions.
diff --git a/lib/Service/FinancialConnections/AccountService.php b/lib/Service/FinancialConnections/AccountService.php
index 213d17271..c7119687b 100644
--- a/lib/Service/FinancialConnections/AccountService.php
+++ b/lib/Service/FinancialConnections/AccountService.php
@@ -86,4 +86,38 @@ public function retrieve($id, $params = null, $opts = null)
{
return $this->request('get', $this->buildPath('/v1/financial_connections/accounts/%s', $id), $params, $opts);
}
+
+ /**
+ * Subscribes to periodic refreshes of data associated with a Financial Connections
+ * Account
.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|array|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\FinancialConnections\Account
+ */
+ public function subscribe($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/financial_connections/accounts/%s/subscribe', $id), $params, $opts);
+ }
+
+ /**
+ * Unsubscribes from periodic refreshes of data associated with a Financial
+ * Connections Account
.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|array|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\FinancialConnections\Account
+ */
+ public function unsubscribe($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/financial_connections/accounts/%s/unsubscribe', $id), $params, $opts);
+ }
}
diff --git a/lib/Service/FinancialConnections/FinancialConnectionsServiceFactory.php b/lib/Service/FinancialConnections/FinancialConnectionsServiceFactory.php
index 7dd826341..5c24c3236 100644
--- a/lib/Service/FinancialConnections/FinancialConnectionsServiceFactory.php
+++ b/lib/Service/FinancialConnections/FinancialConnectionsServiceFactory.php
@@ -9,6 +9,7 @@
*
* @property AccountService $accounts
* @property SessionService $sessions
+ * @property TransactionService $transactions
*/
class FinancialConnectionsServiceFactory extends \Stripe\Service\AbstractServiceFactory
{
@@ -18,6 +19,7 @@ class FinancialConnectionsServiceFactory extends \Stripe\Service\AbstractService
private static $classMap = [
'accounts' => AccountService::class,
'sessions' => SessionService::class,
+ 'transactions' => TransactionService::class,
];
protected function getServiceClass($name)
diff --git a/lib/Service/FinancialConnections/TransactionService.php b/lib/Service/FinancialConnections/TransactionService.php
new file mode 100644
index 000000000..846662ee6
--- /dev/null
+++ b/lib/Service/FinancialConnections/TransactionService.php
@@ -0,0 +1,39 @@
+Transaction objects.
+ *
+ * @param null|array $params
+ * @param null|array|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\FinancialConnections\Transaction>
+ */
+ public function all($params = null, $opts = null)
+ {
+ return $this->requestCollection('get', '/v1/financial_connections/transactions', $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of a Financial Connections 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\FinancialConnections\Transaction
+ */
+ public function retrieve($id, $params = null, $opts = null)
+ {
+ return $this->request('get', $this->buildPath('/v1/financial_connections/transactions/%s', $id), $params, $opts);
+ }
+}
diff --git a/lib/Util/ObjectTypes.php b/lib/Util/ObjectTypes.php
index 97cf6fe93..341c62410 100644
--- a/lib/Util/ObjectTypes.php
+++ b/lib/Util/ObjectTypes.php
@@ -52,6 +52,7 @@ class ObjectTypes
\Stripe\FinancialConnections\AccountOwner::OBJECT_NAME => \Stripe\FinancialConnections\AccountOwner::class,
\Stripe\FinancialConnections\AccountOwnership::OBJECT_NAME => \Stripe\FinancialConnections\AccountOwnership::class,
\Stripe\FinancialConnections\Session::OBJECT_NAME => \Stripe\FinancialConnections\Session::class,
+ \Stripe\FinancialConnections\Transaction::OBJECT_NAME => \Stripe\FinancialConnections\Transaction::class,
\Stripe\FundingInstructions::OBJECT_NAME => \Stripe\FundingInstructions::class,
\Stripe\Identity\VerificationReport::OBJECT_NAME => \Stripe\Identity\VerificationReport::class,
\Stripe\Identity\VerificationSession::OBJECT_NAME => \Stripe\Identity\VerificationSession::class,
diff --git a/tests/Stripe/GeneratedExamplesTest.php b/tests/Stripe/GeneratedExamplesTest.php
index d7aa463cc..498ce4d38 100644
--- a/tests/Stripe/GeneratedExamplesTest.php
+++ b/tests/Stripe/GeneratedExamplesTest.php
@@ -1136,6 +1136,32 @@ public function testFinancialConnectionsAccountsRefreshPost()
static::assertInstanceOf(\Stripe\FinancialConnections\Account::class, $result);
}
+ public function testFinancialConnectionsAccountsSubscribePost()
+ {
+ $this->expectsRequest(
+ 'post',
+ '/v1/financial_connections/accounts/fa_123/subscribe'
+ );
+ $result = $this->client->financialConnections->accounts->subscribe(
+ 'fa_123',
+ ['features' => ['transactions']]
+ );
+ static::assertInstanceOf(\Stripe\FinancialConnections\Account::class, $result);
+ }
+
+ public function testFinancialConnectionsAccountsUnsubscribePost()
+ {
+ $this->expectsRequest(
+ 'post',
+ '/v1/financial_connections/accounts/fa_123/unsubscribe'
+ );
+ $result = $this->client->financialConnections->accounts->unsubscribe(
+ 'fa_123',
+ ['features' => ['transactions']]
+ );
+ static::assertInstanceOf(\Stripe\FinancialConnections\Account::class, $result);
+ }
+
public function testFinancialConnectionsSessionsGet()
{
$this->expectsRequest(
@@ -1189,6 +1215,29 @@ public function testFinancialConnectionsSessionsPost2()
static::assertInstanceOf(\Stripe\FinancialConnections\Session::class, $result);
}
+ public function testFinancialConnectionsTransactionsGet()
+ {
+ $this->expectsRequest(
+ 'get',
+ '/v1/financial_connections/transactions/tr_123'
+ );
+ $result = $this->client->financialConnections->transactions->retrieve(
+ 'tr_123',
+ []
+ );
+ static::assertInstanceOf(\Stripe\FinancialConnections\Transaction::class, $result);
+ }
+
+ public function testFinancialConnectionsTransactionsGet2()
+ {
+ $this->expectsRequest('get', '/v1/financial_connections/transactions');
+ $result = $this->client->financialConnections->transactions->all([
+ 'account' => 'fca_xyz',
+ ]);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\FinancialConnections\Transaction::class, $result->data[0]);
+ }
+
public function testIdentityVerificationReportsGet()
{
$this->expectsRequest('get', '/v1/identity/verification_reports');
@@ -3124,6 +3173,54 @@ public function testTaxRatesPost2()
static::assertInstanceOf(\Stripe\TaxRate::class, $result);
}
+ public function testTaxRegistrationsGet()
+ {
+ $this->expectsRequest('get', '/v1/tax/registrations');
+ $result = $this->client->tax->registrations->all(['status' => 'all']);
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\Tax\Registration::class, $result->data[0]);
+ }
+
+ public function testTaxRegistrationsPost()
+ {
+ $this->expectsRequest('post', '/v1/tax/registrations');
+ $result = $this->client->tax->registrations->create([
+ 'country' => 'IE',
+ 'country_options' => ['ie' => ['type' => 'oss_union']],
+ 'active_from' => 'now',
+ ]);
+ static::assertInstanceOf(\Stripe\Tax\Registration::class, $result);
+ }
+
+ public function testTaxRegistrationsPost2()
+ {
+ $this->expectsRequest(
+ 'post',
+ '/v1/tax/registrations/taxreg_xxxxxxxxxxxxx'
+ );
+ $result = $this->client->tax->registrations->update(
+ 'taxreg_xxxxxxxxxxxxx',
+ ['expires_at' => 'now']
+ );
+ static::assertInstanceOf(\Stripe\Tax\Registration::class, $result);
+ }
+
+ public function testTaxSettingsGet()
+ {
+ $this->expectsRequest('get', '/v1/tax/settings');
+ $result = $this->client->tax->settings->retrieve([]);
+ static::assertInstanceOf(\Stripe\Tax\Settings::class, $result);
+ }
+
+ public function testTaxSettingsPost()
+ {
+ $this->expectsRequest('post', '/v1/tax/settings');
+ $result = $this->client->tax->settings->update([
+ 'defaults' => ['tax_code' => 'txcd_10000000'],
+ ]);
+ static::assertInstanceOf(\Stripe\Tax\Settings::class, $result);
+ }
+
public function testTaxTransactionsCreateFromCalculationPost()
{
$this->expectsRequest(
From 1f60eb1a1b86b29f2ba0e14c0ae905ca838c1cdd Mon Sep 17 00:00:00 2001
From: Pavel Krymets