diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index fff14d8c4..0b9a2a89f 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v150
\ No newline at end of file
+v152
\ No newline at end of file
diff --git a/lib/Invoice.php b/lib/Invoice.php
index a67323623..309cc4563 100644
--- a/lib/Invoice.php
+++ b/lib/Invoice.php
@@ -48,7 +48,7 @@
* @property null|(string|\Stripe\TaxId)[] $account_tax_ids The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
* @property int $amount_due Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the amount_due
may be 0. If there is a positive starting_balance
for the invoice (the customer owes money), the amount_due
will also take that into account. The charge that gets generated for the invoice will be for the amount specified in amount_due
.
* @property int $amount_paid The amount, in %s, that was paid.
- * @property int $amount_remaining The amount remaining, in %s, that is due.
+ * @property int $amount_remaining The difference between amount_due and amount_paid, in %s.
* @property null|string|\Stripe\StripeObject $application ID of the Connect Application that created the invoice.
* @property null|int $application_fee_amount The fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid.
* @property int $attempt_count Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule.
diff --git a/lib/SetupAttempt.php b/lib/SetupAttempt.php
index 6c83b686c..b3938ca79 100644
--- a/lib/SetupAttempt.php
+++ b/lib/SetupAttempt.php
@@ -13,8 +13,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 null|string|\Stripe\StripeObject $application The value of application on the SetupIntent at the time of this confirmation.
+ * @property bool $attach_to_self
If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property null|string|\Stripe\Customer $customer The value of customer on the SetupIntent at the time of this confirmation. + * @property null|string[] $flow_directionsIndicates the directions of money movement for which this payment method is intended to be used.
Include inbound
if you intend to use the payment method as the origin to pull funds from. Include outbound
if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.
true
if the object exists in live mode or the value false
if the object exists in test mode.
* @property null|string|\Stripe\Account $on_behalf_of The value of on_behalf_of on the SetupIntent at the time of this confirmation.
* @property string|\Stripe\PaymentMethod $payment_method ID of the payment method used with this SetupAttempt.
diff --git a/lib/ShippingRate.php b/lib/ShippingRate.php
index e63daf1a7..b68b757cd 100644
--- a/lib/ShippingRate.php
+++ b/lib/ShippingRate.php
@@ -8,7 +8,8 @@
* Shipping rates describe the price of shipping presented to your customers and
* can be applied to Checkout Sessions
- * to collect shipping costs.
+ * and Orders to collect
+ * shipping costs.
*
* @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.
diff --git a/lib/Subscription.php b/lib/Subscription.php
index 1515a5830..648504130 100644
--- a/lib/Subscription.php
+++ b/lib/Subscription.php
@@ -16,7 +16,7 @@
* @property null|string|\Stripe\StripeObject $application ID of the Connect Application that created the subscription.
* @property null|float $application_fee_percent A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account.
* @property \Stripe\StripeObject $automatic_tax
- * @property int $billing_cycle_anchor Determines the date of the first full invoice, and, for plans with month
or year
intervals, the day of the month for subsequent invoices.
+ * @property int $billing_cycle_anchor Determines the date of the first full invoice, and, for plans with month
or year
intervals, the day of the month for subsequent invoices. The timestamp is in UTC format.
* @property null|\Stripe\StripeObject $billing_thresholds Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
* @property null|int $cancel_at A date in the future at which the subscription will automatically get canceled
* @property bool $cancel_at_period_end If the subscription has been canceled with the at_period_end
flag set to true
, cancel_at_period_end
on the subscription will be true. You can use this attribute to determine whether a subscription that has a status of active is scheduled to be canceled at the end of the current period.
diff --git a/tests/Stripe/GeneratedExamplesTest.php b/tests/Stripe/GeneratedExamplesTest.php
index fc1e37ba7..d0d8a68aa 100644
--- a/tests/Stripe/GeneratedExamplesTest.php
+++ b/tests/Stripe/GeneratedExamplesTest.php
@@ -514,6 +514,23 @@ public function testDeleteWhereSecret()
static::assertInstanceOf(\Stripe\Apps\Secret::class, $result);
}
+ public function testRetrieveCashBalance()
+ {
+ $this->expectsRequest('get', '/v1/customers/cus_123/cash_balance');
+ $result = $this->client->customers->retrieveCashBalance('cus_123', []);
+ static::assertInstanceOf(\Stripe\CashBalance::class, $result);
+ }
+
+ public function testUpdateCashBalance()
+ {
+ $this->expectsRequest('post', '/v1/customers/cus_123/cash_balance');
+ $result = $this->client->customers->updateCashBalance(
+ 'cus_123',
+ ['settings' => ['reconciliation_mode' => 'manual']]
+ );
+ static::assertInstanceOf(\Stripe\CashBalance::class, $result);
+ }
+
public function testListCustomer()
{
$this->expectsRequest('get', '/v1/customers');