From 97a51f193377713f9980794ac53393f540e840a7 Mon Sep 17 00:00:00 2001
From: "stripe-openapi[bot]"
<105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Fri, 5 Jul 2024 14:28:26 -0400
Subject: [PATCH 1/5] Update generated code (#1718)
* Update generated code for v1097
* Update generated code for v1105
* Update generated code for v1111
* Update generated code for v1112
* Update generated code for v1113
* Update generated code for v1115
* Update generated code for v1116
---------
Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
---
OPENAPI_VERSION | 2 +-
lib/Billing/MeterEventSummary.php | 4 +-
lib/Customer.php | 2 +-
lib/CustomerSession.php | 14 +++----
lib/ErrorObject.php | 1 +
lib/Invoice.php | 51 ++++++++++++++++++++++++++
lib/Service/CustomerSessionService.php | 2 +-
lib/Service/InvoiceService.php | 51 ++++++++++++++++++++++++++
lib/Tax/Transaction.php | 1 +
lib/Terminal/Configuration.php | 1 +
10 files changed, 117 insertions(+), 12 deletions(-)
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index eb43ae0c9..dbdf3c1cb 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v1095
\ No newline at end of file
+v1116
\ No newline at end of file
diff --git a/lib/Billing/MeterEventSummary.php b/lib/Billing/MeterEventSummary.php
index bac4e3b32..e56ada7fd 100644
--- a/lib/Billing/MeterEventSummary.php
+++ b/lib/Billing/MeterEventSummary.php
@@ -11,10 +11,10 @@
* @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 float $aggregated_value Aggregated value of all the events within start_time
(inclusive) and end_time
(inclusive). The aggregation strategy is defined on meter via default_aggregation
.
- * @property int $end_time End timestamp for this event summary (inclusive).
+ * @property int $end_time End timestamp for this event summary (exclusive). Must be aligned with minute boundaries.
* @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 $meter The meter associated with this event summary.
- * @property int $start_time Start timestamp for this event summary (inclusive).
+ * @property int $start_time Start timestamp for this event summary (inclusive). Must be aligned with minute boundaries.
*/
class MeterEventSummary extends \Stripe\ApiResource
{
diff --git a/lib/Customer.php b/lib/Customer.php
index 00ef44342..ef337f701 100644
--- a/lib/Customer.php
+++ b/lib/Customer.php
@@ -27,7 +27,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|\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 $name The customer's full name or business name.
- * @property null|int $next_invoice_sequence The suffix of the customer's next invoice number (for example, 0001).
+ * @property null|int $next_invoice_sequence The suffix of the customer's next invoice number (for example, 0001). When the account uses account level sequencing, this parameter is ignored in API requests and the field omitted in API responses.
* @property null|string $phone The customer's phone number.
* @property null|string[] $preferred_locales The customer's preferred locales (languages), ordered by preference.
* @property null|\Stripe\StripeObject $shipping Mailing and shipping address for the customer. Appears on invoices emailed to this customer.
diff --git a/lib/CustomerSession.php b/lib/CustomerSession.php
index 6c4db5d72..52ffe1814 100644
--- a/lib/CustomerSession.php
+++ b/lib/CustomerSession.php
@@ -5,15 +5,15 @@
namespace Stripe;
/**
- * A customer session allows you to grant client access to Stripe's frontend SDKs (like StripeJs)
- * control over a customer.
+ * A Customer Session allows you to grant Stripe's frontend SDKs (like Stripe.js) client-side access
+ * control over a Customer.
*
* @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property string $client_secret
The client secret of this customer session. Used on the client to set up secure access to the given customer
.
The client secret can be used to provide access to customer
from your frontend. It should not be stored, logged, or exposed to anyone other than the relevant customer. Make sure that you have TLS enabled on any page that includes the client secret.
The client secret of this Customer Session. Used on the client to set up secure access to the given customer
.
The client secret can be used to provide access to customer
from your frontend. It should not be stored, logged, or exposed to anyone other than the relevant customer. Make sure that you have TLS enabled on any page that includes the client secret.
true
if the object exists in live mode or the value false
if the object exists in test mode.
*/
class CustomerSession extends ApiResource
@@ -21,7 +21,7 @@ class CustomerSession extends ApiResource
const OBJECT_NAME = 'customer_session';
/**
- * Creates a customer session object that includes a single-use client secret that
+ * Creates a Customer Session object that includes a single-use client secret that
* you can use on your front-end to grant client-side API access for certain
* customer resources.
*
diff --git a/lib/ErrorObject.php b/lib/ErrorObject.php
index 461130e87..47ffa0cbe 100644
--- a/lib/ErrorObject.php
+++ b/lib/ErrorObject.php
@@ -143,6 +143,7 @@ class ErrorObject extends StripeObject
const CODE_PARAMETERS_EXCLUSIVE = 'parameters_exclusive';
const CODE_PAYMENT_INTENT_ACTION_REQUIRED = 'payment_intent_action_required';
const CODE_PAYMENT_INTENT_AUTHENTICATION_FAILURE = 'payment_intent_authentication_failure';
+ const CODE_PAYMENT_INTENT_FX_QUOTE_INVALID = 'payment_intent_fx_quote_invalid';
const CODE_PAYMENT_INTENT_INCOMPATIBLE_PAYMENT_METHOD = 'payment_intent_incompatible_payment_method';
const CODE_PAYMENT_INTENT_INVALID_PARAMETER = 'payment_intent_invalid_parameter';
const CODE_PAYMENT_INTENT_KONBINI_REJECTED_CONFIRMATION_NUMBER = 'payment_intent_konbini_rejected_confirmation_number';
diff --git a/lib/Invoice.php b/lib/Invoice.php
index d054acf38..499848796 100644
--- a/lib/Invoice.php
+++ b/lib/Invoice.php
@@ -271,6 +271,23 @@ public static function update($id, $params = null, $opts = null)
const BILLING_CHARGE_AUTOMATICALLY = 'charge_automatically';
const BILLING_SEND_INVOICE = 'send_invoice';
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Invoice the added invoice
+ */
+ public function addLines($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/add_lines';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
/**
* @param null|array $params
* @param null|array|string $opts
@@ -340,6 +357,23 @@ public function pay($params = null, $opts = null)
return $this;
}
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Invoice the removed invoice
+ */
+ public function removeLines($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/remove_lines';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
/**
* @param null|array $params
* @param null|array|string $opts
@@ -393,6 +427,23 @@ public static function upcomingLines($params = null, $opts = null)
return $obj;
}
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Invoice the updated invoice
+ */
+ public function updateLines($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/update_lines';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
/**
* @param null|array $params
* @param null|array|string $opts
diff --git a/lib/Service/CustomerSessionService.php b/lib/Service/CustomerSessionService.php
index 7b2d76f20..d3b0d685d 100644
--- a/lib/Service/CustomerSessionService.php
+++ b/lib/Service/CustomerSessionService.php
@@ -11,7 +11,7 @@
class CustomerSessionService extends \Stripe\Service\AbstractService
{
/**
- * Creates a customer session object that includes a single-use client secret that
+ * Creates a Customer Session object that includes a single-use client secret that
* you can use on your front-end to grant client-side API access for certain
* customer resources.
*
diff --git a/lib/Service/InvoiceService.php b/lib/Service/InvoiceService.php
index 1053b5a8f..a5cbd2228 100644
--- a/lib/Service/InvoiceService.php
+++ b/lib/Service/InvoiceService.php
@@ -10,6 +10,23 @@
*/
class InvoiceService extends \Stripe\Service\AbstractService
{
+ /**
+ * Adds multiple line items to an invoice. This is only possible when an invoice is
+ * still a draft.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Invoice
+ */
+ public function addLines($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/invoices/%s/add_lines', $id), $params, $opts);
+ }
+
/**
* You can list all invoices, or list the invoices for a specific customer. The
* invoices are returned sorted by creation date, with the most recently created
@@ -177,6 +194,23 @@ public function pay($id, $params = null, $opts = null)
return $this->request('post', $this->buildPath('/v1/invoices/%s/pay', $id), $params, $opts);
}
+ /**
+ * Removes multiple line items from an invoice. This is only possible when an
+ * invoice is still a draft.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Invoice
+ */
+ public function removeLines($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/invoices/%s/remove_lines', $id), $params, $opts);
+ }
+
/**
* Retrieves the invoice with the given ID.
*
@@ -338,6 +372,23 @@ public function updateLine($parentId, $id, $params = null, $opts = null)
return $this->request('post', $this->buildPath('/v1/invoices/%s/lines/%s', $parentId, $id), $params, $opts);
}
+ /**
+ * Updates multiple line items on an invoice. This is only possible when an invoice
+ * is still a draft.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Invoice
+ */
+ public function updateLines($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/invoices/%s/update_lines', $id), $params, $opts);
+ }
+
/**
* Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is
* similar to deletion, however it only applies to
diff --git a/lib/Tax/Transaction.php b/lib/Tax/Transaction.php
index 7a6343a2b..13304b8ec 100644
--- a/lib/Tax/Transaction.php
+++ b/lib/Tax/Transaction.php
@@ -18,6 +18,7 @@
* @property null|\Stripe\Collection<\Stripe\Tax\TransactionLineItem> $line_items The tax collected or refunded, by line item.
* @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 $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 int $posted_at The Unix timestamp representing when the tax liability is assumed or reduced.
* @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.
diff --git a/lib/Terminal/Configuration.php b/lib/Terminal/Configuration.php
index 7a0e411b1..66a6e6673 100644
--- a/lib/Terminal/Configuration.php
+++ b/lib/Terminal/Configuration.php
@@ -14,6 +14,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 String indicating the name of the Configuration object, set by the user
* @property null|\Stripe\StripeObject $offline
+ * @property null|\Stripe\StripeObject $reboot_window
* @property null|\Stripe\StripeObject $stripe_s700
* @property null|\Stripe\StripeObject $tipping
* @property null|\Stripe\StripeObject $verifone_p400
From ce69d019941cf528c036ae0d1a3a9580c7389460 Mon Sep 17 00:00:00 2001
From: Prathmesh Ranaut true
if the object exists in live mode or the value false
if the object exists in test mode.
* @property string $name The name of this institution.
- * @property string[] $routing_numbers A list of routing numbers which are known to correspond to this institution.
+ * @property string[] $routing_numbers A list of routing numbers which are known to correspond to this institution. Due to the many to many relationship between institutions and routing numbers, this list may not be comprehensive and routing numbers may also be shared between institutions.
* @property string $status The status of this institution in the Financial Connections authentication flow.
- * @property null|string $url The URL for this institution's website.
+ * @property null|string $url A URL corresponding to this institution. This URL is also displayed in the authentication flow to help end users confirm that they are authenticating with the right institution.
*/
class Institution extends \Stripe\ApiResource
{
diff --git a/lib/Service/SubscriptionService.php b/lib/Service/SubscriptionService.php
index ba7dcc729..fae6df831 100644
--- a/lib/Service/SubscriptionService.php
+++ b/lib/Service/SubscriptionService.php
@@ -162,8 +162,8 @@ public function search($params = null, $opts = null)
* Updates an existing subscription to match the specified parameters. When
* changing prices or quantities, we optionally prorate the price we charge next
* month to make up for any price changes. To preview how the proration is
- * calculated, use the upcoming invoice
- * endpoint.
+ * calculated, use the create
+ * preview endpoint.
*
* By default, we prorate subscription changes. For example, if a customer signs up
* on May 1 for a proration_behavior
as always_invoice
to create
diff --git a/lib/Subscription.php b/lib/Subscription.php
index 2fa86ae33..75230305c 100644
--- a/lib/Subscription.php
+++ b/lib/Subscription.php
@@ -150,8 +150,8 @@ public static function retrieve($id, $opts = null)
* Updates an existing subscription to match the specified parameters. When
* changing prices or quantities, we optionally prorate the price we charge next
* month to make up for any price changes. To preview how the proration is
- * calculated, use the upcoming invoice
- * endpoint.
+ * calculated, use the create
+ * preview endpoint.
*
* By default, we prorate subscription changes. For example, if a customer signs up
* on May 1 for a proration_behavior
as always_invoice
to create