paid
, unpaid
, or no_payment_required
. You can use this value to decide when to fulfill your customer's order.
* @property null|\Stripe\StripeObject $phone_number_collection
* @property null|string $recovered_from The ID of the original expired Checkout Session that triggered the recovery flow.
- * @property null|string $redirect_on_completion This parameter applies to ui_mode: embedded
. Learn more about the redirect behavior of embedded sessions. Defaults to always
.
+ * @property null|string $redirect_on_completion This parameter applies to ui_mode: embedded
. Learn more about the redirect behavior of embedded sessions. Defaults to always
.
* @property null|string $return_url Applies to Checkout Sessions with ui_mode: embedded
. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site.
* @property null|\Stripe\StripeObject $saved_payment_method_options Controls saved payment method settings for the session. Only available in payment
and subscription
mode.
* @property null|string|\Stripe\SetupIntent $setup_intent The ID of the SetupIntent for Checkout Sessions in setup
mode. You can't confirm or cancel the SetupIntent for a Checkout Session. To cancel, expire the Checkout Session instead.
diff --git a/lib/InvoiceLineItem.php b/lib/InvoiceLineItem.php
index 6a1626171..2344d115a 100644
--- a/lib/InvoiceLineItem.php
+++ b/lib/InvoiceLineItem.php
@@ -30,8 +30,8 @@
* @property null|int $quantity The quantity of the subscription, if the line item is a subscription or a proration.
* @property null|string|\Stripe\Subscription $subscription The subscription that the invoice item pertains to, if any.
* @property null|string|\Stripe\SubscriptionItem $subscription_item The subscription item that generated this line item. Left empty if the line item is not an explicit result of a subscription.
- * @property null|\Stripe\StripeObject[] $tax_amounts The amount of tax calculated per tax rate for this line item
- * @property null|\Stripe\TaxRate[] $tax_rates The tax rates which apply to the line item.
+ * @property \Stripe\StripeObject[] $tax_amounts The amount of tax calculated per tax rate for this line item
+ * @property \Stripe\TaxRate[] $tax_rates The tax rates which apply to the line item.
* @property string $type A string identifying the type of the source of this line item, either an invoiceitem
or a subscription
.
* @property null|string $unit_amount_excluding_tax The amount in cents (or local equivalent) representing the unit amount for this line item, excluding all tax and discounts.
*/
diff --git a/lib/InvoiceRenderingTemplate.php b/lib/InvoiceRenderingTemplate.php
new file mode 100644
index 000000000..576fd5945
--- /dev/null
+++ b/lib/InvoiceRenderingTemplate.php
@@ -0,0 +1,96 @@
+true if the object exists in live mode or the value false
if the object exists in test mode.
+ * @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|string $nickname A brief description of the template, hidden from customers
+ * @property string $status The status of the template, one of active
or archived
.
+ * @property int $version Version of this template; version increases by one when an update on the template changes any field that controls invoice rendering
+ */
+class InvoiceRenderingTemplate extends ApiResource
+{
+ const OBJECT_NAME = 'invoice_rendering_template';
+
+ const STATUS_ACTIVE = 'active';
+ const STATUS_ARCHIVED = 'archived';
+
+ /**
+ * List all templates, ordered by creation date, with the most recently created
+ * template appearing first.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\InvoiceRenderingTemplate> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves an invoice rendering template with the given ID. It by default returns
+ * the latest version of the template. Optionally, specify a version to see
+ * previous versions.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\InvoiceRenderingTemplate
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\InvoiceRenderingTemplate the archived invoice rendering template
+ */
+ public function archive($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/archive';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\InvoiceRenderingTemplate the unarchived invoice rendering template
+ */
+ public function unarchive($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/unarchive';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+}
diff --git a/lib/Service/CoreServiceFactory.php b/lib/Service/CoreServiceFactory.php
index e292c2a18..6c9af6d1b 100644
--- a/lib/Service/CoreServiceFactory.php
+++ b/lib/Service/CoreServiceFactory.php
@@ -37,6 +37,7 @@
* @property Forwarding\ForwardingServiceFactory $forwarding
* @property Identity\IdentityServiceFactory $identity
* @property InvoiceItemService $invoiceItems
+ * @property InvoiceRenderingTemplateService $invoiceRenderingTemplates
* @property InvoiceService $invoices
* @property Issuing\IssuingServiceFactory $issuing
* @property MandateService $mandates
@@ -114,6 +115,7 @@ class CoreServiceFactory extends \Stripe\Service\AbstractServiceFactory
'forwarding' => Forwarding\ForwardingServiceFactory::class,
'identity' => Identity\IdentityServiceFactory::class,
'invoiceItems' => InvoiceItemService::class,
+ 'invoiceRenderingTemplates' => InvoiceRenderingTemplateService::class,
'invoices' => InvoiceService::class,
'issuing' => Issuing\IssuingServiceFactory::class,
'mandates' => MandateService::class,
diff --git a/lib/Service/InvoiceRenderingTemplateService.php b/lib/Service/InvoiceRenderingTemplateService.php
new file mode 100644
index 000000000..90d8f23a5
--- /dev/null
+++ b/lib/Service/InvoiceRenderingTemplateService.php
@@ -0,0 +1,82 @@
+
+ */
+ public function all($params = null, $opts = null)
+ {
+ return $this->requestCollection('get', '/v1/invoice_rendering_templates', $params, $opts);
+ }
+
+ /**
+ * Updates the status of an invoice rendering template to ‘archived’ so no new
+ * Stripe objects (customers, invoices, etc.) can reference it. The template can
+ * also no longer be updated. However, if the template is already set on a Stripe
+ * object, it will continue to be applied on invoices generated by it.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\InvoiceRenderingTemplate
+ */
+ public function archive($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/invoice_rendering_templates/%s/archive', $id), $params, $opts);
+ }
+
+ /**
+ * Retrieves an invoice rendering template with the given ID. It by default returns
+ * the latest version of the template. Optionally, specify a version to see
+ * previous versions.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\InvoiceRenderingTemplate
+ */
+ public function retrieve($id, $params = null, $opts = null)
+ {
+ return $this->request('get', $this->buildPath('/v1/invoice_rendering_templates/%s', $id), $params, $opts);
+ }
+
+ /**
+ * Unarchive an invoice rendering template so it can be used on new Stripe objects
+ * again.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\InvoiceRenderingTemplate
+ */
+ public function unarchive($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/invoice_rendering_templates/%s/unarchive', $id), $params, $opts);
+ }
+}
diff --git a/lib/Service/PaymentIntentService.php b/lib/Service/PaymentIntentService.php
index 99aad6f3e..58b54bd33 100644
--- a/lib/Service/PaymentIntentService.php
+++ b/lib/Service/PaymentIntentService.php
@@ -115,7 +115,10 @@ public function capture($id, $params = null, $opts = null)
* If any actions are required for the payment, the PaymentIntent will return to
* the requires_confirmation
state after those actions are completed.
* Your server needs to then explicitly re-confirm the PaymentIntent to initiate
- * the next payment attempt.
+ * the next payment attempt. There is a variable upper limit on how many times a
+ * PaymentIntent can be confirmed. After this limit is reached, any further calls
+ * to this endpoint will transition the PaymentIntent to the canceled
+ * state.
*
* @param string $id
* @param null|array $params
diff --git a/lib/StripeClient.php b/lib/StripeClient.php
index 4103c5c79..d46751f14 100644
--- a/lib/StripeClient.php
+++ b/lib/StripeClient.php
@@ -37,6 +37,7 @@
* @property \Stripe\Service\Forwarding\ForwardingServiceFactory $forwarding
* @property \Stripe\Service\Identity\IdentityServiceFactory $identity
* @property \Stripe\Service\InvoiceItemService $invoiceItems
+ * @property \Stripe\Service\InvoiceRenderingTemplateService $invoiceRenderingTemplates
* @property \Stripe\Service\InvoiceService $invoices
* @property \Stripe\Service\Issuing\IssuingServiceFactory $issuing
* @property \Stripe\Service\MandateService $mandates
diff --git a/lib/TestHelpers/TestClock.php b/lib/TestHelpers/TestClock.php
index cd9fc4456..361b2692f 100644
--- a/lib/TestHelpers/TestClock.php
+++ b/lib/TestHelpers/TestClock.php
@@ -17,7 +17,7 @@
* @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|string $name The custom name supplied at creation.
* @property string $status The status of the Test Clock.
- * @property null|\Stripe\StripeObject $status_details
+ * @property \Stripe\StripeObject $status_details
*/
class TestClock extends \Stripe\ApiResource
{
diff --git a/lib/Transfer.php b/lib/Transfer.php
index d0b766db8..16c7b1b28 100644
--- a/lib/Transfer.php
+++ b/lib/Transfer.php
@@ -30,7 +30,7 @@
* @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.
* @property \Stripe\Collection<\Stripe\TransferReversal> $reversals A list of reversals that have been applied to the transfer.
* @property bool $reversed Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false.
- * @property null|string|\Stripe\Charge $source_transaction ID of the charge or payment that was used to fund the transfer. If null, the transfer was funded from the available balance.
+ * @property null|string|\Stripe\Charge $source_transaction ID of the charge that was used to fund the transfer. If null, the transfer was funded from the available balance.
* @property null|string $source_type The source balance this transfer came from. One of card
, fpx
, or bank_account
.
* @property null|string $transfer_group A string that identifies this transaction as part of a group. See the Connect documentation for details.
*/
diff --git a/lib/Util/ObjectTypes.php b/lib/Util/ObjectTypes.php
index c79cc6bb6..cbe5a4f70 100644
--- a/lib/Util/ObjectTypes.php
+++ b/lib/Util/ObjectTypes.php
@@ -73,6 +73,7 @@ class ObjectTypes
\Stripe\Invoice::OBJECT_NAME => \Stripe\Invoice::class,
\Stripe\InvoiceItem::OBJECT_NAME => \Stripe\InvoiceItem::class,
\Stripe\InvoiceLineItem::OBJECT_NAME => \Stripe\InvoiceLineItem::class,
+ \Stripe\InvoiceRenderingTemplate::OBJECT_NAME => \Stripe\InvoiceRenderingTemplate::class,
\Stripe\Issuing\Authorization::OBJECT_NAME => \Stripe\Issuing\Authorization::class,
\Stripe\Issuing\Card::OBJECT_NAME => \Stripe\Issuing\Card::class,
\Stripe\Issuing\Cardholder::OBJECT_NAME => \Stripe\Issuing\Cardholder::class,
From dc9726ac0cfbba7b3c97e2cf6042f2c090551cdb Mon Sep 17 00:00:00 2001
From: Helen Ye invoice.created
webhook, for example, so you might not want to display that invoice as unpaid to your users.
* @property null|bool $auto_advance Controls whether Stripe performs automatic collection of the invoice. If false
, the invoice's state doesn't automatically advance without an explicit action.
* @property \Stripe\StripeObject $automatic_tax
+ * @property null|int $automatically_finalizes_at The time when this invoice is currently scheduled to be automatically finalized. The field will be null
if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be null
- see finalized_at
for the time when an already-finalized invoice was finalized.
* @property null|string $billing_reason Indicates the reason why the invoice was created.
* manual
: Unrelated to a subscription, for example, created via the invoice editor. * subscription
: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds. * subscription_create
: A new subscription was created. * subscription_cycle
: A subscription advanced into a new period. * subscription_threshold
: A subscription reached a billing threshold. * subscription_update
: A subscription was updated. * upcoming
: Reserved for simulated invoices, per the upcoming invoice endpoint.
charge_automatically
, or send_invoice
. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions.
diff --git a/lib/InvoiceRenderingTemplate.php b/lib/InvoiceRenderingTemplate.php
index 576fd5945..f6ca508fd 100644
--- a/lib/InvoiceRenderingTemplate.php
+++ b/lib/InvoiceRenderingTemplate.php
@@ -5,6 +5,9 @@
namespace Stripe;
/**
+ * Invoice Rendering Templates are used to configure how invoices are rendered on surfaces like the PDF. Invoice Rendering Templates
+ * can be created from within the Dashboard, and they can be used over the API when creating invoices.
+ *
* @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 59e4339615014d4c838b228e38fd3946440ae2db Mon Sep 17 00:00:00 2001
From: "stripe-openapi[bot]"
<105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Wed, 18 Sep 2024 11:30:00 -0700
Subject: [PATCH 4/5] Update generated code for v1267 (#1747)
Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
---
OPENAPI_VERSION | 2 +-
lib/Treasury/ReceivedDebit.php | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index 1f205edf7..5f5b31119 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v1266
\ No newline at end of file
+v1267
\ No newline at end of file
diff --git a/lib/Treasury/ReceivedDebit.php b/lib/Treasury/ReceivedDebit.php
index 230a25dd0..ba9bf4827 100644
--- a/lib/Treasury/ReceivedDebit.php
+++ b/lib/Treasury/ReceivedDebit.php
@@ -31,6 +31,7 @@ class ReceivedDebit extends \Stripe\ApiResource
const FAILURE_CODE_ACCOUNT_CLOSED = 'account_closed';
const FAILURE_CODE_ACCOUNT_FROZEN = 'account_frozen';
const FAILURE_CODE_INSUFFICIENT_FUNDS = 'insufficient_funds';
+ const FAILURE_CODE_INTERNATIONAL_TRANSACTION = 'international_transaction';
const FAILURE_CODE_OTHER = 'other';
const NETWORK_ACH = 'ach';
From 3df1a19a33477af9ead8984dbd84e8f637c36199 Mon Sep 17 00:00:00 2001
From: Ramya Rao