Skip to content

Commit

Permalink
Codegen for openapi v152 (#1300)
Browse files Browse the repository at this point in the history
  • Loading branch information
pakrym-stripe authored Jun 8, 2022
1 parent a926644 commit 86c2c6a
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 4 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v150
v152
2 changes: 1 addition & 1 deletion lib/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <code>amount_due</code> may be 0. If there is a positive <code>starting_balance</code> for the invoice (the customer owes money), the <code>amount_due</code> will also take that into account. The charge that gets generated for the invoice will be for the amount specified in <code>amount_due</code>.
* @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.
Expand Down
2 changes: 2 additions & 0 deletions lib/SetupAttempt.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application">application</a> on the SetupIntent at the time of this confirmation.
* @property bool $attach_to_self <p>If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.</p><p>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.</p>
* @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 <a href="https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer">customer</a> on the SetupIntent at the time of this confirmation.
* @property null|string[] $flow_directions <p>Indicates the directions of money movement for which this payment method is intended to be used.</p><p>Include <code>inbound</code> if you intend to use the payment method as the origin to pull funds from. Include <code>outbound</code> 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.</p>
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property null|string|\Stripe\Account $on_behalf_of The value of <a href="https://stripe.com/docs/api/setup_intents/object#setup_intent_object-on_behalf_of">on_behalf_of</a> on the SetupIntent at the time of this confirmation.
* @property string|\Stripe\PaymentMethod $payment_method ID of the payment method used with this SetupAttempt.
Expand Down
3 changes: 2 additions & 1 deletion lib/ShippingRate.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
* Shipping rates describe the price of shipping presented to your customers and
* can be applied to <a
* href="https://stripe.com/docs/payments/checkout/shipping">Checkout Sessions</a>
* to collect shipping costs.
* and <a href="https://stripe.com/docs/orders/shipping">Orders</a> 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.
Expand Down
2 changes: 1 addition & 1 deletion lib/Subscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <code>month</code> or <code>year</code> 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 <code>month</code> or <code>year</code> 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 <code>at_period_end</code> flag set to <code>true</code>, <code>cancel_at_period_end</code> 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.
Expand Down
17 changes: 17 additions & 0 deletions tests/Stripe/GeneratedExamplesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 86c2c6a

Please sign in to comment.