Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated code #1589

Merged
merged 5 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v581
v596
2 changes: 1 addition & 1 deletion lib/BalanceTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* @property int $fee Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed.
* @property \Stripe\StripeObject[] $fee_details Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction.
* @property int $net Net impact to a Stripe balance (in cents (or local equivalent)). A positive value represents incrementing a Stripe balance, and a negative value decrementing a Stripe balance. You can calculate the net impact of a transaction on a balance by <code>amount</code> - <code>fee</code>
* @property string $reporting_category Learn more about how [reporting categories] (https://stripe.com/docs/reports/reporting-categories) can help you understand balance transactions from an accounting perspective.
* @property string $reporting_category Learn more about how <a href="https://stripe.com/docs/reports/reporting-categories">reporting categories</a> can help you understand balance transactions from an accounting perspective.
* @property null|string|\Stripe\StripeObject $source This transaction relates to the Stripe object.
* @property string $status The transaction's net funds status in the Stripe balance, which are either <code>available</code> or <code>pending</code>.
* @property string $type Transaction type: <code>adjustment</code>, <code>advance</code>, <code>advance_funding</code>, <code>anticipation_repayment</code>, <code>application_fee</code>, <code>application_fee_refund</code>, <code>charge</code>, <code>connect_collection_transfer</code>, <code>contribution</code>, <code>issuing_authorization_hold</code>, <code>issuing_authorization_release</code>, <code>issuing_dispute</code>, <code>issuing_transaction</code>, <code>obligation_inbound</code>, <code>obligation_outbound</code>, <code>obligation_reversal_inbound</code>, <code>obligation_reversal_outbound</code>, <code>obligation_payout</code>, <code>obligation_payout_failure</code>, <code>payment</code>, <code>payment_failure_refund</code>, <code>payment_refund</code>, <code>payment_reversal</code>, <code>payout</code>, <code>payout_cancel</code>, <code>payout_failure</code>, <code>refund</code>, <code>refund_failure</code>, <code>reserve_transaction</code>, <code>reserved_funds</code>, <code>stripe_fee</code>, <code>stripe_fx_fee</code>, <code>tax_fee</code>, <code>topup</code>, <code>topup_reversal</code>, <code>transfer</code>, <code>transfer_cancel</code>, <code>transfer_failure</code>, or <code>transfer_refund</code>. Learn more about <a href="https://stripe.com/docs/reports/balance-transaction-types">balance transaction types and what they represent</a>. To classify transactions for accounting purposes, consider <code>reporting_category</code> instead.
Expand Down
11 changes: 11 additions & 0 deletions lib/Checkout/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
* @property null|string $billing_address_collection Describes whether Checkout should collect the customer's billing address.
* @property null|string $cancel_url If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.
* @property null|string $client_reference_id A unique string to reference the Checkout Session. This can be a customer ID, a cart ID, or similar, and can be used to reconcile the Session with your internal systems.
* @property null|string $client_secret Client secret to be used when initializing Stripe.js embedded checkout.
* @property null|\Stripe\StripeObject $consent Results of <code>consent_collection</code> for this session.
* @property null|\Stripe\StripeObject $consent_collection When set, provides configuration for the Checkout Session to gather active consent from customers.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
Expand Down Expand Up @@ -58,6 +59,8 @@
* @property string $payment_status The payment status of the Checkout Session, one of <code>paid</code>, <code>unpaid</code>, or <code>no_payment_required</code>. 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 Applies to Checkout Sessions with <code>ui_mode: embedded</code>. By default, Stripe will always redirect to your return_url after a successful confirmation. If you set <code>redirect_on_completion: 'if_required'</code>, then we will only redirect if your user chooses a redirect-based payment method.
* @property null|string $return_url Applies to Checkout Sessions with <code>ui_mode: embedded</code>. 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|string|\Stripe\SetupIntent $setup_intent The ID of the SetupIntent for Checkout Sessions in <code>setup</code> mode.
* @property null|\Stripe\StripeObject $shipping_address_collection When set, provides configuration for Checkout to collect a shipping address from a customer.
* @property null|\Stripe\StripeObject $shipping_cost The details of the customer cost of shipping, including the customer chosen ShippingRate.
Expand All @@ -69,6 +72,7 @@
* @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
* @property null|\Stripe\StripeObject $total_details Tax and discount details for the computed total amount.
* @property null|string $ui_mode The UI mode of the Session. Can be <code>hosted</code> (default) or <code>embedded</code>.
* @property null|string $url The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using <a href="https://stripe.com/docs/payments/checkout/custom-domains">Custom Domains</a>, the URL will use your subdomain. Otherwise, it’ll use <code>checkout.stripe.com.</code> This value is only present when the session is active.
*/
class Session extends \Stripe\ApiResource
Expand Down Expand Up @@ -96,6 +100,10 @@ class Session extends \Stripe\ApiResource
const PAYMENT_STATUS_PAID = 'paid';
const PAYMENT_STATUS_UNPAID = 'unpaid';

const REDIRECT_ON_COMPLETION_ALWAYS = 'always';
const REDIRECT_ON_COMPLETION_IF_REQUIRED = 'if_required';
const REDIRECT_ON_COMPLETION_NEVER = 'never';

const STATUS_COMPLETE = 'complete';
const STATUS_EXPIRED = 'expired';
const STATUS_OPEN = 'open';
Expand All @@ -105,6 +113,9 @@ class Session extends \Stripe\ApiResource
const SUBMIT_TYPE_DONATE = 'donate';
const SUBMIT_TYPE_PAY = 'pay';

const UI_MODE_EMBEDDED = 'embedded';
const UI_MODE_HOSTED = 'hosted';

/**
* @param null|array $params
* @param null|array|string $opts
Expand Down
4 changes: 2 additions & 2 deletions lib/Service/SetupIntentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ public function all($params = null, $opts = null)
}

/**
* A SetupIntent object can be canceled when it is in one of these statuses:
* You can cancel a SetupIntent object when it’s in one of these statuses:
* <code>requires_payment_method</code>, <code>requires_confirmation</code>, or
* <code>requires_action</code>.
*
* Once canceled, setup is abandoned and any operations on the SetupIntent will
* After you cancel it, setup is abandoned and any operations on the SetupIntent
* fail with an error.
*
* @param string $id
Expand Down
51 changes: 46 additions & 5 deletions lib/Service/SubscriptionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,52 @@ public function search($params = null, $opts = null)
}

/**
* Updates an existing subscription on a customer to match the specified
* parameters. When changing plans or quantities, we will optionally prorate the
* price we charge next month to make up for any price changes. To preview how the
* proration will be calculated, use the <a href="#upcoming_invoice">upcoming
* invoice</a> endpoint.
* 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 <a href="/docs/api/invoices/upcoming">upcoming invoice</a>
* endpoint.
*
* By default, we prorate subscription changes. For example, if a customer signs up
* on May 1 for a <currency>100</currency> price, they’ll be billed
* <currency>100</currency> immediately. If on May 15 they switch to a
* <currency>200</currency> price, then on June 1 they’ll be billed
* <currency>250</currency> (<currency>200</currency> for a renewal of her
* subscription, plus a <currency>50</currency> prorating adjustment for half of
* the previous month’s <currency>100</currency> difference). Similarly, a
* downgrade generates a credit that is applied to the next invoice. We also
* prorate when you make quantity changes.
*
* Switching prices does not normally change the billing date or generate an
* immediate charge unless:
*
* <ul> <li>The billing interval is changed (for example, from monthly to
* yearly).</li> <li>The subscription moves from free to paid, or paid to
* free.</li> <li>A trial starts or ends.</li> </ul>
*
* In these cases, we apply a credit for the unused time on the previous price,
* immediately charge the customer using the new price, and reset the billing date.
*
* If you want to charge for an upgrade immediately, pass
* <code>proration_behavior</code> as <code>always_invoice</code> to create
* prorations, automatically invoice the customer for those proration adjustments,
* and attempt to collect payment. If you pass <code>create_prorations</code>, the
* prorations are created but not automatically invoiced. If you want to bill the
* customer for the prorations before the subscription’s renewal date, you need to
* manually <a href="/docs/api/invoices/create">invoice the customer</a>.
*
* If you don’t want to prorate, set the <code>proration_behavior</code> option to
* <code>none</code>. With this option, the customer is billed
* <currency>100</currency> on May 1 and <currency>200</currency> on June 1.
* Similarly, if you set <code>proration_behavior</code> to <code>none</code> when
* switching between different billing intervals (for example, from monthly to
* yearly), we don’t generate any credits for the old subscription’s unused time.
* We still reset the billing date and bill immediately for the new subscription.
*
* Updating the quantity on a subscription many times in an hour may result in <a
* href="/docs/rate-limits">rate limiting</a>. If you need to bill for a frequently
* changing quantity, consider integrating <a
* href="/docs/billing/subscriptions/usage-based">usage-based billing</a> instead.
*
* @param string $id
* @param null|array $params
Expand Down
1 change: 1 addition & 0 deletions lib/Terminal/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* @property null|\Stripe\StripeObject $bbpos_wisepos_e
* @property null|bool $is_account_default Whether this Configuration is the default for your account
* @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|\Stripe\StripeObject $offline
* @property null|\Stripe\StripeObject $tipping
* @property null|\Stripe\StripeObject $verifone_p400
*/
Expand Down