mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
Bump stripe-php from 16.4.0 to 17.2.1
This commit is contained in:
@@ -11,49 +11,45 @@ namespace Stripe;
|
||||
*
|
||||
* @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\Application $application ID of the Connect Application that created the subscription.
|
||||
* @property null|Application|string $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 total that will be transferred to the application owner's Stripe account.
|
||||
* @property \Stripe\StripeObject $automatic_tax
|
||||
* @property (object{disabled_reason: null|string, enabled: bool, liability: null|(object{account?: Account|string, type: string}&StripeObject)}&StripeObject) $automatic_tax
|
||||
* @property int $billing_cycle_anchor The reference point that aligns future <a href="https://stripe.com/docs/subscriptions/billing-cycle">billing cycle</a> dates. It sets the day of week for <code>week</code> intervals, the day of month for <code>month</code> and <code>year</code> intervals, and the month of year for <code>year</code> intervals. The timestamp is in UTC format.
|
||||
* @property null|\Stripe\StripeObject $billing_cycle_anchor_config The fixed values used to calculate the <code>billing_cycle_anchor</code>.
|
||||
* @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|(object{day_of_month: int, hour: null|int, minute: null|int, month: null|int, second: null|int}&StripeObject) $billing_cycle_anchor_config The fixed values used to calculate the <code>billing_cycle_anchor</code>.
|
||||
* @property null|int $cancel_at A date in the future at which the subscription will automatically get canceled
|
||||
* @property bool $cancel_at_period_end Whether this subscription will (if <code>status=active</code>) or did (if <code>status=canceled</code>) cancel at the end of the current billing period.
|
||||
* @property null|int $canceled_at If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with <code>cancel_at_period_end</code>, <code>canceled_at</code> will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state.
|
||||
* @property null|\Stripe\StripeObject $cancellation_details Details about why this subscription was cancelled
|
||||
* @property null|(object{comment: null|string, feedback: null|string, reason: null|string}&StripeObject) $cancellation_details Details about why this subscription was cancelled
|
||||
* @property string $collection_method Either <code>charge_automatically</code>, or <code>send_invoice</code>. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as <code>active</code>.
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property int $current_period_end End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created.
|
||||
* @property int $current_period_start Start of the current period that the subscription has been invoiced for.
|
||||
* @property string|\Stripe\Customer $customer ID of the customer who owns the subscription.
|
||||
* @property Customer|string $customer ID of the customer who owns the subscription.
|
||||
* @property null|int $days_until_due Number of days a customer has to pay invoices generated by this subscription. This value will be <code>null</code> for subscriptions where <code>collection_method=charge_automatically</code>.
|
||||
* @property null|string|\Stripe\PaymentMethod $default_payment_method ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over <code>default_source</code>. If neither are set, invoices will use the customer's <a href="https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method">invoice_settings.default_payment_method</a> or <a href="https://stripe.com/docs/api/customers/object#customer_object-default_source">default_source</a>.
|
||||
* @property null|string|\Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source $default_source ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If <code>default_payment_method</code> is also set, <code>default_payment_method</code> will take precedence. If neither are set, invoices will use the customer's <a href="https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method">invoice_settings.default_payment_method</a> or <a href="https://stripe.com/docs/api/customers/object#customer_object-default_source">default_source</a>.
|
||||
* @property null|\Stripe\TaxRate[] $default_tax_rates The tax rates that will apply to any subscription item that does not have <code>tax_rates</code> set. Invoices created will have their <code>default_tax_rates</code> populated from the subscription.
|
||||
* @property null|PaymentMethod|string $default_payment_method ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over <code>default_source</code>. If neither are set, invoices will use the customer's <a href="https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method">invoice_settings.default_payment_method</a> or <a href="https://stripe.com/docs/api/customers/object#customer_object-default_source">default_source</a>.
|
||||
* @property null|Account|BankAccount|Card|Source|string $default_source ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If <code>default_payment_method</code> is also set, <code>default_payment_method</code> will take precedence. If neither are set, invoices will use the customer's <a href="https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method">invoice_settings.default_payment_method</a> or <a href="https://stripe.com/docs/api/customers/object#customer_object-default_source">default_source</a>.
|
||||
* @property null|TaxRate[] $default_tax_rates The tax rates that will apply to any subscription item that does not have <code>tax_rates</code> set. Invoices created will have their <code>default_tax_rates</code> populated from the subscription.
|
||||
* @property null|string $description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
|
||||
* @property null|\Stripe\Discount $discount Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis. This field has been deprecated and will be removed in a future API version. Use <code>discounts</code> instead.
|
||||
* @property (string|\Stripe\Discount)[] $discounts The discounts applied to the subscription. Subscription item discounts are applied before subscription discounts. Use <code>expand[]=discounts</code> to expand each discount.
|
||||
* @property (Discount|string)[] $discounts The discounts applied to the subscription. Subscription item discounts are applied before subscription discounts. Use <code>expand[]=discounts</code> to expand each discount.
|
||||
* @property null|int $ended_at If the subscription has ended, the date the subscription ended.
|
||||
* @property \Stripe\StripeObject $invoice_settings
|
||||
* @property \Stripe\Collection<\Stripe\SubscriptionItem> $items List of subscription items, each with an attached price.
|
||||
* @property null|string|\Stripe\Invoice $latest_invoice The most recent invoice this subscription has generated.
|
||||
* @property (object{account_tax_ids: null|(string|TaxId)[], issuer: (object{account?: Account|string, type: string}&StripeObject)}&StripeObject) $invoice_settings
|
||||
* @property Collection<SubscriptionItem> $items List of subscription items, each with an attached price.
|
||||
* @property null|Invoice|string $latest_invoice The most recent invoice this subscription has generated.
|
||||
* @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 \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property null|int $next_pending_invoice_item_invoice Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at <code>pending_invoice_item_interval</code>.
|
||||
* @property null|string|\Stripe\Account $on_behalf_of The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details.
|
||||
* @property null|\Stripe\StripeObject $pause_collection If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to <code>paused</code>. Learn more about <a href="https://stripe.com/docs/billing/subscriptions/pause-payment">pausing collection</a>.
|
||||
* @property null|\Stripe\StripeObject $payment_settings Payment settings passed on to invoices created by the subscription.
|
||||
* @property null|\Stripe\StripeObject $pending_invoice_item_interval Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling <a href="https://stripe.com/docs/api#create_invoice">Create an invoice</a> for the given subscription at the specified interval.
|
||||
* @property null|string|\Stripe\SetupIntent $pending_setup_intent You can use this <a href="https://stripe.com/docs/api/setup_intents">SetupIntent</a> to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the <a href="https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2">SCA Migration Guide</a>.
|
||||
* @property null|\Stripe\StripeObject $pending_update If specified, <a href="https://stripe.com/docs/billing/subscriptions/pending-updates">pending updates</a> that will be applied to the subscription once the <code>latest_invoice</code> has been paid.
|
||||
* @property null|string|\Stripe\SubscriptionSchedule $schedule The schedule attached to the subscription
|
||||
* @property null|Account|string $on_behalf_of The account (if any) the charge was made on behalf of for charges associated with this subscription. See the <a href="https://stripe.com/docs/connect/subscriptions#on-behalf-of">Connect documentation</a> for details.
|
||||
* @property null|(object{behavior: string, resumes_at: null|int}&StripeObject) $pause_collection If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to <code>paused</code>. Learn more about <a href="https://stripe.com/docs/billing/subscriptions/pause-payment">pausing collection</a>.
|
||||
* @property null|(object{payment_method_options: null|(object{acss_debit: null|(object{mandate_options?: (object{transaction_type: null|string}&StripeObject), verification_method?: string}&StripeObject), bancontact: null|(object{preferred_language: string}&StripeObject), card: null|(object{mandate_options?: (object{amount: null|int, amount_type: null|string, description: null|string}&StripeObject), network: null|string, request_three_d_secure: null|string}&StripeObject), customer_balance: null|(object{bank_transfer?: (object{eu_bank_transfer?: (object{country: string}&StripeObject), type: null|string}&StripeObject), funding_type: null|string}&StripeObject), konbini: null|(object{}&StripeObject), sepa_debit: null|(object{}&StripeObject), us_bank_account: null|(object{financial_connections?: (object{filters?: (object{account_subcategories?: string[]}&StripeObject), permissions?: string[], prefetch: null|string[]}&StripeObject), verification_method?: string}&StripeObject)}&StripeObject), payment_method_types: null|string[], save_default_payment_method: null|string}&StripeObject) $payment_settings Payment settings passed on to invoices created by the subscription.
|
||||
* @property null|(object{interval: string, interval_count: int}&StripeObject) $pending_invoice_item_interval Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling <a href="https://stripe.com/docs/api#create_invoice">Create an invoice</a> for the given subscription at the specified interval.
|
||||
* @property null|SetupIntent|string $pending_setup_intent You can use this <a href="https://stripe.com/docs/api/setup_intents">SetupIntent</a> to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the <a href="https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2">SCA Migration Guide</a>.
|
||||
* @property null|(object{billing_cycle_anchor: null|int, expires_at: int, subscription_items: null|SubscriptionItem[], trial_end: null|int, trial_from_plan: null|bool}&StripeObject) $pending_update If specified, <a href="https://stripe.com/docs/billing/subscriptions/pending-updates">pending updates</a> that will be applied to the subscription once the <code>latest_invoice</code> has been paid.
|
||||
* @property null|string|SubscriptionSchedule $schedule The schedule attached to the subscription
|
||||
* @property int $start_date Date when the subscription was first created. The date might differ from the <code>created</code> date due to backdating.
|
||||
* @property string $status <p>Possible values are <code>incomplete</code>, <code>incomplete_expired</code>, <code>trialing</code>, <code>active</code>, <code>past_due</code>, <code>canceled</code>, <code>unpaid</code>, or <code>paused</code>.</p><p>For <code>collection_method=charge_automatically</code> a subscription moves into <code>incomplete</code> if the initial payment attempt fails. A subscription in this status can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an <code>active</code> status. If the first invoice is not paid within 23 hours, the subscription transitions to <code>incomplete_expired</code>. This is a terminal status, the open invoice will be voided and no further invoices will be generated.</p><p>A subscription that is currently in a trial period is <code>trialing</code> and moves to <code>active</code> when the trial period is over.</p><p>A subscription can only enter a <code>paused</code> status <a href="https://stripe.com/docs/billing/subscriptions/trials#create-free-trials-without-payment">when a trial ends without a payment method</a>. A <code>paused</code> subscription doesn't generate invoices and can be resumed after your customer adds their payment method. The <code>paused</code> status is different from <a href="https://stripe.com/docs/billing/subscriptions/pause-payment">pausing collection</a>, which still generates invoices and leaves the subscription's status unchanged.</p><p>If subscription <code>collection_method=charge_automatically</code>, it becomes <code>past_due</code> when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has exhausted all payment retry attempts, the subscription will become <code>canceled</code> or <code>unpaid</code> (depending on your subscriptions settings).</p><p>If subscription <code>collection_method=send_invoice</code> it becomes <code>past_due</code> when its invoice is not paid by the due date, and <code>canceled</code> or <code>unpaid</code> if it is still not paid by an additional deadline after that. Note that when a subscription has a status of <code>unpaid</code>, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices.</p>
|
||||
* @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this subscription belongs to.
|
||||
* @property null|\Stripe\StripeObject $transfer_data The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
|
||||
* @property null|string|TestHelpers\TestClock $test_clock ID of the test clock this subscription belongs to.
|
||||
* @property null|(object{amount_percent: null|float, destination: Account|string}&StripeObject) $transfer_data The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
|
||||
* @property null|int $trial_end If the subscription has a trial, the end of that trial.
|
||||
* @property null|\Stripe\StripeObject $trial_settings Settings related to subscription trials.
|
||||
* @property null|(object{end_behavior: (object{missing_payment_method: string}&StripeObject)}&StripeObject) $trial_settings Settings related to subscription trials.
|
||||
* @property null|int $trial_start If the subscription has a trial, the beginning of that trial.
|
||||
*/
|
||||
class Subscription extends ApiResource
|
||||
@@ -89,12 +85,12 @@ class Subscription extends ApiResource
|
||||
* schedules</a> instead. Schedules provide the flexibility to model more complex
|
||||
* billing configurations that change over time.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array{add_invoice_items?: (array{discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: null|float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, backdate_start_date?: int, billing_cycle_anchor?: int, billing_cycle_anchor_config?: array{day_of_month: int, hour?: int, minute?: int, month?: int, second?: int}, cancel_at?: int, cancel_at_period_end?: bool, collection_method?: string, currency?: string, customer: string, days_until_due?: int, default_payment_method?: string, default_source?: string, default_tax_rates?: null|string[], description?: string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], invoice_settings?: array{account_tax_ids?: null|string[], issuer?: array{account?: string, type: string}}, items?: (array{discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: null|array<string, string>, off_session?: bool, on_behalf_of?: null|string, payment_behavior?: string, payment_settings?: array{payment_method_options?: array{acss_debit?: null|array{mandate_options?: array{transaction_type?: string}, verification_method?: string}, bancontact?: null|array{preferred_language?: string}, card?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string}, network?: string, request_three_d_secure?: string}, customer_balance?: null|array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, type?: string}, funding_type?: string}, konbini?: null|array{}, sepa_debit?: null|array{}, us_bank_account?: null|array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[]}, verification_method?: string}}, payment_method_types?: null|string[], save_default_payment_method?: string}, pending_invoice_item_interval?: null|array{interval: string, interval_count?: int}, proration_behavior?: string, transfer_data?: array{amount_percent?: float, destination: string}, trial_end?: array|int|string, trial_from_plan?: bool, trial_period_days?: int, trial_settings?: array{end_behavior: array{missing_payment_method: string}}} $params
|
||||
* @param null|array|string $options
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
* @return Subscription the created resource
|
||||
*
|
||||
* @return \Stripe\Subscription the created resource
|
||||
* @throws Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public static function create($params = null, $options = null)
|
||||
{
|
||||
@@ -102,7 +98,7 @@ class Subscription extends ApiResource
|
||||
$url = static::classUrl();
|
||||
|
||||
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj = Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj->setLastResponse($response);
|
||||
|
||||
return $obj;
|
||||
@@ -112,18 +108,18 @@ class Subscription extends ApiResource
|
||||
* By default, returns a list of subscriptions that have not been canceled. In
|
||||
* order to list canceled subscriptions, specify <code>status=canceled</code>.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array{automatic_tax?: array{enabled: bool}, collection_method?: string, created?: array|int, current_period_end?: array|int, current_period_start?: array|int, customer?: string, ending_before?: string, expand?: string[], limit?: int, plan?: string, price?: string, starting_after?: string, status?: string, test_clock?: string} $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
* @return Collection<Subscription> of ApiResources
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\Subscription> of ApiResources
|
||||
* @throws Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public static function all($params = null, $opts = null)
|
||||
{
|
||||
$url = static::classUrl();
|
||||
|
||||
return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
|
||||
return static::_requestPage($url, Collection::class, $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -132,13 +128,13 @@ class Subscription extends ApiResource
|
||||
* @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 Subscription
|
||||
*
|
||||
* @return \Stripe\Subscription
|
||||
* @throws Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public static function retrieve($id, $opts = null)
|
||||
{
|
||||
$opts = \Stripe\Util\RequestOptions::parse($opts);
|
||||
$opts = Util\RequestOptions::parse($opts);
|
||||
$instance = new static($id, $opts);
|
||||
$instance->refresh();
|
||||
|
||||
@@ -197,12 +193,12 @@ class Subscription extends ApiResource
|
||||
* href="/docs/billing/subscriptions/usage-based">usage-based billing</a> instead.
|
||||
*
|
||||
* @param string $id the ID of the resource to update
|
||||
* @param null|array $params
|
||||
* @param null|array{add_invoice_items?: (array{discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: null|float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, cancel_at?: null|int, cancel_at_period_end?: bool, cancellation_details?: array{comment?: null|string, feedback?: null|string}, collection_method?: string, days_until_due?: int, default_payment_method?: string, default_source?: null|string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], invoice_settings?: array{account_tax_ids?: null|string[], issuer?: array{account?: string, type: string}}, items?: (array{clear_usage?: bool, deleted?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], id?: string, metadata?: null|array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: null|array<string, string>, off_session?: bool, on_behalf_of?: null|string, pause_collection?: null|array{behavior: string, resumes_at?: int}, payment_behavior?: string, payment_settings?: array{payment_method_options?: array{acss_debit?: null|array{mandate_options?: array{transaction_type?: string}, verification_method?: string}, bancontact?: null|array{preferred_language?: string}, card?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string}, network?: string, request_three_d_secure?: string}, customer_balance?: null|array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, type?: string}, funding_type?: string}, konbini?: null|array{}, sepa_debit?: null|array{}, us_bank_account?: null|array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[]}, verification_method?: string}}, payment_method_types?: null|string[], save_default_payment_method?: string}, pending_invoice_item_interval?: null|array{interval: string, interval_count?: int}, proration_behavior?: string, proration_date?: int, transfer_data?: null|array{amount_percent?: float, destination: string}, trial_end?: array|int|string, trial_from_plan?: bool, trial_settings?: array{end_behavior: array{missing_payment_method: string}}} $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
* @return Subscription the updated resource
|
||||
*
|
||||
* @return \Stripe\Subscription the updated resource
|
||||
* @throws Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public static function update($id, $params = null, $opts = null)
|
||||
{
|
||||
@@ -210,7 +206,7 @@ class Subscription extends ApiResource
|
||||
$url = static::resourceUrl($id);
|
||||
|
||||
list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj = Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj->setLastResponse($response);
|
||||
|
||||
return $obj;
|
||||
@@ -218,7 +214,7 @@ class Subscription extends ApiResource
|
||||
|
||||
use ApiOperations\Delete {
|
||||
delete as protected _delete;
|
||||
}
|
||||
}
|
||||
|
||||
public static function getSavedNestedResources()
|
||||
{
|
||||
@@ -236,9 +232,9 @@ class Subscription extends ApiResource
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
* @return Subscription the updated subscription
|
||||
*
|
||||
* @return \Stripe\Subscription the updated subscription
|
||||
* @throws Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function deleteDiscount($params = null, $opts = null)
|
||||
{
|
||||
@@ -262,9 +258,9 @@ class Subscription extends ApiResource
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
* @return Subscription the canceled subscription
|
||||
*
|
||||
* @return \Stripe\Subscription the canceled subscription
|
||||
* @throws Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function cancel($params = null, $opts = null)
|
||||
{
|
||||
@@ -279,9 +275,9 @@ class Subscription extends ApiResource
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
* @return Subscription the resumed subscription
|
||||
*
|
||||
* @return \Stripe\Subscription the resumed subscription
|
||||
* @throws Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function resume($params = null, $opts = null)
|
||||
{
|
||||
@@ -296,14 +292,14 @@ class Subscription extends ApiResource
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
* @return SearchResult<Subscription> the subscription search results
|
||||
*
|
||||
* @return \Stripe\SearchResult<\Stripe\Subscription> the subscription search results
|
||||
* @throws Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public static function search($params = null, $opts = null)
|
||||
{
|
||||
$url = '/v1/subscriptions/search';
|
||||
|
||||
return static::_requestPage($url, \Stripe\SearchResult::class, $params, $opts);
|
||||
return static::_requestPage($url, SearchResult::class, $params, $opts);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user