stripe 15.3.0 → 15.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/API_VERSION +1 -1
- data/CHANGELOG.md +21 -1
- data/OPENAPI_VERSION +1 -1
- data/VERSION +1 -1
- data/lib/stripe/api_version.rb +1 -1
- data/lib/stripe/resources/account.rb +5 -5
- data/lib/stripe/resources/account_link.rb +3 -1
- data/lib/stripe/resources/account_session.rb +51 -0
- data/lib/stripe/resources/billing/credit_grant.rb +1 -1
- data/lib/stripe/resources/billing_portal/configuration.rb +46 -2
- data/lib/stripe/resources/charge.rb +7 -5
- data/lib/stripe/resources/checkout/session.rb +32 -4
- data/lib/stripe/resources/confirmation_token.rb +3 -3
- data/lib/stripe/resources/customer.rb +1 -1
- data/lib/stripe/resources/dispute.rb +1 -1
- data/lib/stripe/resources/event.rb +14 -26
- data/lib/stripe/resources/invoice.rb +24 -8
- data/lib/stripe/resources/invoice_item.rb +1 -1
- data/lib/stripe/resources/payment_intent.rb +14 -4
- data/lib/stripe/resources/payment_link.rb +83 -5
- data/lib/stripe/resources/payment_method.rb +4 -4
- data/lib/stripe/resources/quote.rb +1 -1
- data/lib/stripe/resources/radar/value_list.rb +2 -2
- data/lib/stripe/resources/refund.rb +1 -1
- data/lib/stripe/resources/review.rb +2 -2
- data/lib/stripe/resources/setup_attempt.rb +1 -1
- data/lib/stripe/resources/subscription.rb +2 -2
- data/lib/stripe/resources/subscription_item.rb +2 -2
- data/lib/stripe/resources/subscription_schedule.rb +35 -3
- data/lib/stripe/resources/tax/registration.rb +408 -30
- data/lib/stripe/resources/terminal/configuration.rb +196 -0
- data/lib/stripe/services/account_link_service.rb +3 -1
- data/lib/stripe/services/account_service.rb +3 -3
- data/lib/stripe/services/account_session_service.rb +34 -0
- data/lib/stripe/services/billing/credit_grant_service.rb +1 -1
- data/lib/stripe/services/billing_portal/configuration_service.rb +36 -2
- data/lib/stripe/services/checkout/session_service.rb +19 -3
- data/lib/stripe/services/invoice_item_service.rb +1 -1
- data/lib/stripe/services/invoice_service.rb +24 -8
- data/lib/stripe/services/payment_intent_service.rb +8 -3
- data/lib/stripe/services/payment_link_service.rb +81 -5
- data/lib/stripe/services/payment_method_service.rb +1 -1
- data/lib/stripe/services/quote_service.rb +1 -1
- data/lib/stripe/services/radar/value_list_service.rb +1 -1
- data/lib/stripe/services/subscription_item_service.rb +2 -2
- data/lib/stripe/services/subscription_schedule_service.rb +35 -3
- data/lib/stripe/services/subscription_service.rb +2 -2
- data/lib/stripe/services/tax/registration_service.rb +360 -30
- data/lib/stripe/services/terminal/configuration_service.rb +152 -0
- data/lib/stripe/version.rb +1 -1
- data/rbi/stripe/resources/account.rbi +5 -5
- data/rbi/stripe/resources/account_link.rbi +3 -1
- data/rbi/stripe/resources/account_session.rbi +62 -1
- data/rbi/stripe/resources/billing/credit_grant.rbi +1 -1
- data/rbi/stripe/resources/billing_portal/configuration.rbi +62 -4
- data/rbi/stripe/resources/charge.rbi +8 -5
- data/rbi/stripe/resources/checkout/session.rbi +42 -7
- data/rbi/stripe/resources/confirmation_token.rbi +3 -3
- data/rbi/stripe/resources/customer.rbi +1 -1
- data/rbi/stripe/resources/dispute.rbi +1 -1
- data/rbi/stripe/resources/event.rbi +14 -26
- data/rbi/stripe/resources/invoice.rbi +27 -11
- data/rbi/stripe/resources/invoice_item.rbi +1 -1
- data/rbi/stripe/resources/payment_intent.rbi +14 -4
- data/rbi/stripe/resources/payment_link.rbi +101 -9
- data/rbi/stripe/resources/payment_method.rbi +4 -4
- data/rbi/stripe/resources/quote.rbi +1 -1
- data/rbi/stripe/resources/radar/value_list.rbi +2 -2
- data/rbi/stripe/resources/refund.rbi +1 -1
- data/rbi/stripe/resources/review.rbi +2 -2
- data/rbi/stripe/resources/setup_attempt.rbi +1 -1
- data/rbi/stripe/resources/subscription.rbi +6 -6
- data/rbi/stripe/resources/subscription_item.rbi +2 -2
- data/rbi/stripe/resources/subscription_schedule.rbi +33 -5
- data/rbi/stripe/resources/tax/registration.rbi +544 -60
- data/rbi/stripe/resources/terminal/configuration.rbi +210 -2
- data/rbi/stripe/services/account_link_service.rbi +3 -1
- data/rbi/stripe/services/account_service.rbi +3 -3
- data/rbi/stripe/services/account_session_service.rbi +40 -1
- data/rbi/stripe/services/billing/credit_grant_service.rbi +1 -1
- data/rbi/stripe/services/billing_portal/configuration_service.rbi +48 -4
- data/rbi/stripe/services/checkout/session_service.rbi +26 -6
- data/rbi/stripe/services/invoice_item_service.rbi +1 -1
- data/rbi/stripe/services/invoice_service.rbi +27 -11
- data/rbi/stripe/services/payment_intent_service.rbi +8 -3
- data/rbi/stripe/services/payment_link_service.rbi +98 -9
- data/rbi/stripe/services/payment_method_service.rbi +1 -1
- data/rbi/stripe/services/quote_service.rbi +1 -1
- data/rbi/stripe/services/radar/value_list_service.rbi +1 -1
- data/rbi/stripe/services/subscription_item_service.rbi +2 -2
- data/rbi/stripe/services/subscription_schedule_service.rbi +37 -5
- data/rbi/stripe/services/subscription_service.rbi +6 -6
- data/rbi/stripe/services/tax/registration_service.rbi +480 -60
- data/rbi/stripe/services/terminal/configuration_service.rbi +170 -2
- metadata +2 -2
@@ -579,7 +579,7 @@ module Stripe
|
|
579
579
|
@plan = plan
|
580
580
|
end
|
581
581
|
end
|
582
|
-
# Installment configuration for payments attempted on this invoice
|
582
|
+
# Installment configuration for payments attempted on this invoice.
|
583
583
|
#
|
584
584
|
# For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
|
585
585
|
attr_accessor :installments
|
@@ -904,7 +904,7 @@ module Stripe
|
|
904
904
|
attr_accessor :auto_advance
|
905
905
|
# Settings for automatic tax lookup for this invoice.
|
906
906
|
attr_accessor :automatic_tax
|
907
|
-
# The time when this invoice should be scheduled to finalize. The invoice
|
907
|
+
# The time when this invoice should be scheduled to finalize (up to 5 years in the future). The invoice is finalized at this time if it's still in draft state. To turn off automatic finalization, set `auto_advance` to false.
|
908
908
|
attr_accessor :automatically_finalizes_at
|
909
909
|
# Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices.
|
910
910
|
attr_accessor :collection_method
|
@@ -1226,7 +1226,7 @@ module Stripe
|
|
1226
1226
|
@plan = plan
|
1227
1227
|
end
|
1228
1228
|
end
|
1229
|
-
# Installment configuration for payments attempted on this invoice
|
1229
|
+
# Installment configuration for payments attempted on this invoice.
|
1230
1230
|
#
|
1231
1231
|
# For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
|
1232
1232
|
attr_accessor :installments
|
@@ -1547,11 +1547,11 @@ module Stripe
|
|
1547
1547
|
attr_accessor :account_tax_ids
|
1548
1548
|
# A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
|
1549
1549
|
attr_accessor :application_fee_amount
|
1550
|
-
# Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action.
|
1550
|
+
# Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. Defaults to false.
|
1551
1551
|
attr_accessor :auto_advance
|
1552
1552
|
# Settings for automatic tax lookup for this invoice.
|
1553
1553
|
attr_accessor :automatic_tax
|
1554
|
-
# The time when this invoice should be scheduled to finalize. The invoice
|
1554
|
+
# The time when this invoice should be scheduled to finalize (up to 5 years in the future). The invoice is finalized at this time if it's still in draft state.
|
1555
1555
|
attr_accessor :automatically_finalizes_at
|
1556
1556
|
# Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. Defaults to `charge_automatically`.
|
1557
1557
|
attr_accessor :collection_method
|
@@ -2547,7 +2547,7 @@ module Stripe
|
|
2547
2547
|
|
2548
2548
|
class ScheduleDetails < Stripe::RequestParams
|
2549
2549
|
class BillingMode < Stripe::RequestParams
|
2550
|
-
#
|
2550
|
+
# Controls the calculation and orchestration of prorations and invoices for subscriptions.
|
2551
2551
|
attr_accessor :type
|
2552
2552
|
|
2553
2553
|
def initialize(type: nil)
|
@@ -2674,6 +2674,18 @@ module Stripe
|
|
2674
2674
|
end
|
2675
2675
|
end
|
2676
2676
|
|
2677
|
+
class Duration < Stripe::RequestParams
|
2678
|
+
# Specifies phase duration. Either `day`, `week`, `month` or `year`.
|
2679
|
+
attr_accessor :interval
|
2680
|
+
# The multiplier applied to the interval.
|
2681
|
+
attr_accessor :interval_count
|
2682
|
+
|
2683
|
+
def initialize(interval: nil, interval_count: nil)
|
2684
|
+
@interval = interval
|
2685
|
+
@interval_count = interval_count
|
2686
|
+
end
|
2687
|
+
end
|
2688
|
+
|
2677
2689
|
class InvoiceSettings < Stripe::RequestParams
|
2678
2690
|
class Issuer < Stripe::RequestParams
|
2679
2691
|
# The connected account being referenced when `type` is `account`.
|
@@ -2837,13 +2849,15 @@ module Stripe
|
|
2837
2849
|
attr_accessor :description
|
2838
2850
|
# The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
|
2839
2851
|
attr_accessor :discounts
|
2852
|
+
# The number of intervals the phase should last. If set, `end_date` must not be set.
|
2853
|
+
attr_accessor :duration
|
2840
2854
|
# The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
|
2841
2855
|
attr_accessor :end_date
|
2842
2856
|
# All invoices will be billed using the specified settings.
|
2843
2857
|
attr_accessor :invoice_settings
|
2844
2858
|
# List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
|
2845
2859
|
attr_accessor :items
|
2846
|
-
# Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set.
|
2860
|
+
# Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. This parameter is deprecated and will be removed in a future version. Use `duration` instead.
|
2847
2861
|
attr_accessor :iterations
|
2848
2862
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
|
2849
2863
|
attr_accessor :metadata
|
@@ -2872,6 +2886,7 @@ module Stripe
|
|
2872
2886
|
default_tax_rates: nil,
|
2873
2887
|
description: nil,
|
2874
2888
|
discounts: nil,
|
2889
|
+
duration: nil,
|
2875
2890
|
end_date: nil,
|
2876
2891
|
invoice_settings: nil,
|
2877
2892
|
items: nil,
|
@@ -2895,6 +2910,7 @@ module Stripe
|
|
2895
2910
|
@default_tax_rates = default_tax_rates
|
2896
2911
|
@description = description
|
2897
2912
|
@discounts = discounts
|
2913
|
+
@duration = duration
|
2898
2914
|
@end_date = end_date
|
2899
2915
|
@invoice_settings = invoice_settings
|
2900
2916
|
@items = items
|
@@ -2927,7 +2943,7 @@ module Stripe
|
|
2927
2943
|
|
2928
2944
|
class SubscriptionDetails < Stripe::RequestParams
|
2929
2945
|
class BillingMode < Stripe::RequestParams
|
2930
|
-
#
|
2946
|
+
# Controls the calculation and orchestration of prorations and invoices for subscriptions.
|
2931
2947
|
attr_accessor :type
|
2932
2948
|
|
2933
2949
|
def initialize(type: nil)
|
@@ -316,7 +316,7 @@ module Stripe
|
|
316
316
|
attr_accessor :discounts
|
317
317
|
# Specifies which fields in the response should be expanded.
|
318
318
|
attr_accessor :expand
|
319
|
-
# The ID of an existing invoice to add this invoice item to.
|
319
|
+
# The ID of an existing invoice to add this invoice item to. For subscription invoices, when left blank, the invoice item will be added to the next upcoming scheduled invoice. For standalone invoices, the invoice item won't be automatically added unless you pass `pending_invoice_item_behavior: 'include'` when creating the invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice.
|
320
320
|
attr_accessor :invoice
|
321
321
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
322
322
|
attr_accessor :metadata
|
@@ -1504,7 +1504,7 @@ module Stripe
|
|
1504
1504
|
end
|
1505
1505
|
|
1506
1506
|
class PresentmentDetails < Stripe::StripeObject
|
1507
|
-
# Amount intended to be collected by this payment, denominated in presentment_currency
|
1507
|
+
# Amount intended to be collected by this payment, denominated in `presentment_currency`.
|
1508
1508
|
attr_reader :presentment_amount
|
1509
1509
|
# Currency presented to the customer during payment.
|
1510
1510
|
attr_reader :presentment_currency
|
@@ -2627,7 +2627,7 @@ module Stripe
|
|
2627
2627
|
attr_accessor :capture_method
|
2628
2628
|
# A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation.
|
2629
2629
|
attr_accessor :cvc_token
|
2630
|
-
# Installment configuration for payments attempted on this PaymentIntent
|
2630
|
+
# Installment configuration for payments attempted on this PaymentIntent.
|
2631
2631
|
#
|
2632
2632
|
# For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
|
2633
2633
|
attr_accessor :installments
|
@@ -5012,7 +5012,7 @@ module Stripe
|
|
5012
5012
|
attr_accessor :capture_method
|
5013
5013
|
# A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation.
|
5014
5014
|
attr_accessor :cvc_token
|
5015
|
-
# Installment configuration for payments attempted on this PaymentIntent
|
5015
|
+
# Installment configuration for payments attempted on this PaymentIntent.
|
5016
5016
|
#
|
5017
5017
|
# For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
|
5018
5018
|
attr_accessor :installments
|
@@ -7461,7 +7461,7 @@ module Stripe
|
|
7461
7461
|
attr_accessor :capture_method
|
7462
7462
|
# A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation.
|
7463
7463
|
attr_accessor :cvc_token
|
7464
|
-
# Installment configuration for payments attempted on this PaymentIntent
|
7464
|
+
# Installment configuration for payments attempted on this PaymentIntent.
|
7465
7465
|
#
|
7466
7466
|
# For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
|
7467
7467
|
attr_accessor :installments
|
@@ -9030,6 +9030,7 @@ module Stripe
|
|
9030
9030
|
# Confirm that your customer intends to pay with current or provided
|
9031
9031
|
# payment method. Upon confirmation, the PaymentIntent will attempt to initiate
|
9032
9032
|
# a payment.
|
9033
|
+
#
|
9033
9034
|
# If the selected payment method requires additional authentication steps, the
|
9034
9035
|
# PaymentIntent will transition to the requires_action status and
|
9035
9036
|
# suggest additional actions via next_action. If payment fails,
|
@@ -9037,18 +9038,22 @@ module Stripe
|
|
9037
9038
|
# canceled status if the confirmation limit is reached. If
|
9038
9039
|
# payment succeeds, the PaymentIntent will transition to the succeeded
|
9039
9040
|
# status (or requires_capture, if capture_method is set to manual).
|
9041
|
+
#
|
9040
9042
|
# If the confirmation_method is automatic, payment may be attempted
|
9041
9043
|
# using our [client SDKs](https://docs.stripe.com/docs/stripe-js/reference#stripe-handle-card-payment)
|
9042
9044
|
# and the PaymentIntent's [client_secret](https://docs.stripe.com/api#payment_intent_object-client_secret).
|
9043
9045
|
# After next_actions are handled by the client, no additional
|
9044
9046
|
# confirmation is required to complete the payment.
|
9047
|
+
#
|
9045
9048
|
# If the confirmation_method is manual, all payment attempts must be
|
9046
9049
|
# initiated using a secret key.
|
9050
|
+
#
|
9047
9051
|
# If any actions are required for the payment, the PaymentIntent will
|
9048
9052
|
# return to the requires_confirmation state
|
9049
9053
|
# after those actions are completed. Your server needs to then
|
9050
9054
|
# explicitly re-confirm the PaymentIntent to initiate the next payment
|
9051
9055
|
# attempt.
|
9056
|
+
#
|
9052
9057
|
# There is a variable upper limit on how many times a PaymentIntent can be confirmed.
|
9053
9058
|
# After this limit is reached, any further calls to this endpoint will
|
9054
9059
|
# transition the PaymentIntent to the canceled state.
|
@@ -9064,6 +9069,7 @@ module Stripe
|
|
9064
9069
|
# Confirm that your customer intends to pay with current or provided
|
9065
9070
|
# payment method. Upon confirmation, the PaymentIntent will attempt to initiate
|
9066
9071
|
# a payment.
|
9072
|
+
#
|
9067
9073
|
# If the selected payment method requires additional authentication steps, the
|
9068
9074
|
# PaymentIntent will transition to the requires_action status and
|
9069
9075
|
# suggest additional actions via next_action. If payment fails,
|
@@ -9071,18 +9077,22 @@ module Stripe
|
|
9071
9077
|
# canceled status if the confirmation limit is reached. If
|
9072
9078
|
# payment succeeds, the PaymentIntent will transition to the succeeded
|
9073
9079
|
# status (or requires_capture, if capture_method is set to manual).
|
9080
|
+
#
|
9074
9081
|
# If the confirmation_method is automatic, payment may be attempted
|
9075
9082
|
# using our [client SDKs](https://docs.stripe.com/docs/stripe-js/reference#stripe-handle-card-payment)
|
9076
9083
|
# and the PaymentIntent's [client_secret](https://docs.stripe.com/api#payment_intent_object-client_secret).
|
9077
9084
|
# After next_actions are handled by the client, no additional
|
9078
9085
|
# confirmation is required to complete the payment.
|
9086
|
+
#
|
9079
9087
|
# If the confirmation_method is manual, all payment attempts must be
|
9080
9088
|
# initiated using a secret key.
|
9089
|
+
#
|
9081
9090
|
# If any actions are required for the payment, the PaymentIntent will
|
9082
9091
|
# return to the requires_confirmation state
|
9083
9092
|
# after those actions are completed. Your server needs to then
|
9084
9093
|
# explicitly re-confirm the PaymentIntent to initiate the next payment
|
9085
9094
|
# attempt.
|
9095
|
+
#
|
9086
9096
|
# There is a variable upper limit on how many times a PaymentIntent can be confirmed.
|
9087
9097
|
# After this limit is reached, any further calls to this endpoint will
|
9088
9098
|
# transition the PaymentIntent to the canceled state.
|
@@ -166,6 +166,8 @@ module Stripe
|
|
166
166
|
class RenderingOptions < Stripe::StripeObject
|
167
167
|
# How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
|
168
168
|
attr_reader :amount_tax_display
|
169
|
+
# ID of the invoice rendering template to be used for the generated invoice.
|
170
|
+
attr_reader :template
|
169
171
|
end
|
170
172
|
# The account tax IDs associated with the invoice.
|
171
173
|
attr_reader :account_tax_ids
|
@@ -588,9 +590,12 @@ module Stripe
|
|
588
590
|
class RenderingOptions < Stripe::RequestParams
|
589
591
|
# How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
|
590
592
|
attr_accessor :amount_tax_display
|
593
|
+
# ID of the invoice rendering template to use for this invoice.
|
594
|
+
attr_accessor :template
|
591
595
|
|
592
|
-
def initialize(amount_tax_display: nil)
|
596
|
+
def initialize(amount_tax_display: nil, template: nil)
|
593
597
|
@amount_tax_display = amount_tax_display
|
598
|
+
@template = template
|
594
599
|
end
|
595
600
|
end
|
596
601
|
# The account tax IDs associated with the invoice.
|
@@ -641,7 +646,7 @@ module Stripe
|
|
641
646
|
class AdjustableQuantity < Stripe::RequestParams
|
642
647
|
# Set to true if the quantity can be adjusted to any non-negative Integer.
|
643
648
|
attr_accessor :enabled
|
644
|
-
# The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to
|
649
|
+
# The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999999.
|
645
650
|
attr_accessor :maximum
|
646
651
|
# The minimum quantity the customer can purchase. By default this value is 0. If there is only one item in the cart then that item's quantity cannot go down to 0.
|
647
652
|
attr_accessor :minimum
|
@@ -652,16 +657,86 @@ module Stripe
|
|
652
657
|
@minimum = minimum
|
653
658
|
end
|
654
659
|
end
|
660
|
+
|
661
|
+
class PriceData < Stripe::RequestParams
|
662
|
+
class ProductData < Stripe::RequestParams
|
663
|
+
# The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
|
664
|
+
attr_accessor :description
|
665
|
+
# A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
|
666
|
+
attr_accessor :images
|
667
|
+
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
668
|
+
attr_accessor :metadata
|
669
|
+
# The product's name, meant to be displayable to the customer.
|
670
|
+
attr_accessor :name
|
671
|
+
# A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
|
672
|
+
attr_accessor :tax_code
|
673
|
+
|
674
|
+
def initialize(description: nil, images: nil, metadata: nil, name: nil, tax_code: nil)
|
675
|
+
@description = description
|
676
|
+
@images = images
|
677
|
+
@metadata = metadata
|
678
|
+
@name = name
|
679
|
+
@tax_code = tax_code
|
680
|
+
end
|
681
|
+
end
|
682
|
+
|
683
|
+
class Recurring < Stripe::RequestParams
|
684
|
+
# Specifies billing frequency. Either `day`, `week`, `month` or `year`.
|
685
|
+
attr_accessor :interval
|
686
|
+
# The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
|
687
|
+
attr_accessor :interval_count
|
688
|
+
|
689
|
+
def initialize(interval: nil, interval_count: nil)
|
690
|
+
@interval = interval
|
691
|
+
@interval_count = interval_count
|
692
|
+
end
|
693
|
+
end
|
694
|
+
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
695
|
+
attr_accessor :currency
|
696
|
+
# The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required.
|
697
|
+
attr_accessor :product
|
698
|
+
# Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
|
699
|
+
attr_accessor :product_data
|
700
|
+
# The recurring components of a price such as `interval` and `interval_count`.
|
701
|
+
attr_accessor :recurring
|
702
|
+
# Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
703
|
+
attr_accessor :tax_behavior
|
704
|
+
# A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
|
705
|
+
attr_accessor :unit_amount
|
706
|
+
# Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
707
|
+
attr_accessor :unit_amount_decimal
|
708
|
+
|
709
|
+
def initialize(
|
710
|
+
currency: nil,
|
711
|
+
product: nil,
|
712
|
+
product_data: nil,
|
713
|
+
recurring: nil,
|
714
|
+
tax_behavior: nil,
|
715
|
+
unit_amount: nil,
|
716
|
+
unit_amount_decimal: nil
|
717
|
+
)
|
718
|
+
@currency = currency
|
719
|
+
@product = product
|
720
|
+
@product_data = product_data
|
721
|
+
@recurring = recurring
|
722
|
+
@tax_behavior = tax_behavior
|
723
|
+
@unit_amount = unit_amount
|
724
|
+
@unit_amount_decimal = unit_amount_decimal
|
725
|
+
end
|
726
|
+
end
|
655
727
|
# When set, provides configuration for this item’s quantity to be adjusted by the customer during checkout.
|
656
728
|
attr_accessor :adjustable_quantity
|
657
729
|
# The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object.
|
658
730
|
attr_accessor :price
|
731
|
+
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
732
|
+
attr_accessor :price_data
|
659
733
|
# The quantity of the line item being purchased.
|
660
734
|
attr_accessor :quantity
|
661
735
|
|
662
|
-
def initialize(adjustable_quantity: nil, price: nil, quantity: nil)
|
736
|
+
def initialize(adjustable_quantity: nil, price: nil, price_data: nil, quantity: nil)
|
663
737
|
@adjustable_quantity = adjustable_quantity
|
664
738
|
@price = price
|
739
|
+
@price_data = price_data
|
665
740
|
@quantity = quantity
|
666
741
|
end
|
667
742
|
end
|
@@ -1250,9 +1325,12 @@ module Stripe
|
|
1250
1325
|
class RenderingOptions < Stripe::RequestParams
|
1251
1326
|
# How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
|
1252
1327
|
attr_accessor :amount_tax_display
|
1328
|
+
# ID of the invoice rendering template to use for this invoice.
|
1329
|
+
attr_accessor :template
|
1253
1330
|
|
1254
|
-
def initialize(amount_tax_display: nil)
|
1331
|
+
def initialize(amount_tax_display: nil, template: nil)
|
1255
1332
|
@amount_tax_display = amount_tax_display
|
1333
|
+
@template = template
|
1256
1334
|
end
|
1257
1335
|
end
|
1258
1336
|
# The account tax IDs associated with the invoice.
|
@@ -1303,7 +1381,7 @@ module Stripe
|
|
1303
1381
|
class AdjustableQuantity < Stripe::RequestParams
|
1304
1382
|
# Set to true if the quantity can be adjusted to any non-negative Integer.
|
1305
1383
|
attr_accessor :enabled
|
1306
|
-
# The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to
|
1384
|
+
# The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999999.
|
1307
1385
|
attr_accessor :maximum
|
1308
1386
|
# The minimum quantity the customer can purchase. By default this value is 0. If there is only one item in the cart then that item's quantity cannot go down to 0.
|
1309
1387
|
attr_accessor :minimum
|
@@ -138,7 +138,7 @@ module Stripe
|
|
138
138
|
end
|
139
139
|
# The authorized amount
|
140
140
|
attr_reader :amount_authorized
|
141
|
-
# Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa
|
141
|
+
# Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
|
142
142
|
attr_reader :brand
|
143
143
|
# The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.
|
144
144
|
attr_reader :brand_product
|
@@ -320,7 +320,7 @@ module Stripe
|
|
320
320
|
# Attribute for field visa_checkout
|
321
321
|
attr_reader :visa_checkout
|
322
322
|
end
|
323
|
-
# Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa
|
323
|
+
# Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
|
324
324
|
attr_reader :brand
|
325
325
|
# Checks on Card address and CVC if provided.
|
326
326
|
attr_reader :checks
|
@@ -377,7 +377,7 @@ module Stripe
|
|
377
377
|
# The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`.
|
378
378
|
attr_reader :type
|
379
379
|
end
|
380
|
-
# Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa
|
380
|
+
# Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
|
381
381
|
attr_reader :brand
|
382
382
|
# The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.
|
383
383
|
attr_reader :brand_product
|
@@ -1594,7 +1594,7 @@ module Stripe
|
|
1594
1594
|
request_stripe_object(method: :get, path: "/v1/payment_methods", params: params, opts: opts)
|
1595
1595
|
end
|
1596
1596
|
|
1597
|
-
# Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.
|
1597
|
+
# Updates a PaymentMethod object. A PaymentMethod must be attached to a customer to be updated.
|
1598
1598
|
def self.update(payment_method, params = {}, opts = {})
|
1599
1599
|
request_stripe_object(
|
1600
1600
|
method: :post,
|
@@ -419,7 +419,7 @@ module Stripe
|
|
419
419
|
|
420
420
|
class SubscriptionData < Stripe::RequestParams
|
421
421
|
class BillingMode < Stripe::RequestParams
|
422
|
-
#
|
422
|
+
# Controls the calculation and orchestration of prorations and invoices for subscriptions.
|
423
423
|
attr_accessor :type
|
424
424
|
|
425
425
|
def initialize(type: nil)
|
@@ -94,7 +94,7 @@ module Stripe
|
|
94
94
|
attr_accessor :alias
|
95
95
|
# Specifies which fields in the response should be expanded.
|
96
96
|
attr_accessor :expand
|
97
|
-
# Type of the items in the value list. One of `card_fingerprint`, `
|
97
|
+
# Type of the items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, `customer_id`, `sepa_debit_fingerprint`, or `us_bank_account_fingerprint`. Use `string` if the item type is unknown or mixed.
|
98
98
|
attr_accessor :item_type
|
99
99
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
100
100
|
attr_accessor :metadata
|
@@ -117,7 +117,7 @@ module Stripe
|
|
117
117
|
attr_reader :created_by
|
118
118
|
# Unique identifier for the object.
|
119
119
|
attr_reader :id
|
120
|
-
# The type of items in the value list. One of `card_fingerprint`, `
|
120
|
+
# The type of items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, `customer_id`, `sepa_debit_fingerprint`, or `us_bank_account_fingerprint`.
|
121
121
|
attr_reader :item_type
|
122
122
|
# List of items contained within this value list.
|
123
123
|
attr_reader :list_items
|
@@ -229,7 +229,7 @@ module Stripe
|
|
229
229
|
end
|
230
230
|
|
231
231
|
class PresentmentDetails < Stripe::StripeObject
|
232
|
-
# Amount intended to be collected by this payment, denominated in presentment_currency
|
232
|
+
# Amount intended to be collected by this payment, denominated in `presentment_currency`.
|
233
233
|
attr_reader :presentment_amount
|
234
234
|
# Currency presented to the customer during payment.
|
235
235
|
attr_reader :presentment_currency
|
@@ -88,7 +88,7 @@ module Stripe
|
|
88
88
|
attr_reader :billing_zip
|
89
89
|
# The charge associated with this review.
|
90
90
|
attr_reader :charge
|
91
|
-
# The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, `redacted`, or `
|
91
|
+
# The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, `redacted`, `canceled`, `payment_never_settled`, or `acknowledged`.
|
92
92
|
attr_reader :closed_reason
|
93
93
|
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
94
94
|
attr_reader :created
|
@@ -108,7 +108,7 @@ module Stripe
|
|
108
108
|
attr_reader :opened_reason
|
109
109
|
# The PaymentIntent ID associated with this review, if one exists.
|
110
110
|
attr_reader :payment_intent
|
111
|
-
# The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, `redacted`, or `
|
111
|
+
# The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, `redacted`, `canceled`, `payment_never_settled`, or `acknowledged`.
|
112
112
|
attr_reader :reason
|
113
113
|
# Information related to the browsing session of the user who initiated the payment.
|
114
114
|
attr_reader :session
|
@@ -82,7 +82,7 @@ module Stripe
|
|
82
82
|
# The type of the card wallet, one of `apple_pay`, `google_pay`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type.
|
83
83
|
attr_reader :type
|
84
84
|
end
|
85
|
-
# Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa
|
85
|
+
# Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
|
86
86
|
attr_reader :brand
|
87
87
|
# Check results by Card networks on Card address and CVC at the time of authorization
|
88
88
|
attr_reader :checks
|
@@ -792,7 +792,7 @@ module Stripe
|
|
792
792
|
#
|
793
793
|
# Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).
|
794
794
|
#
|
795
|
-
# Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/
|
795
|
+
# Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://docs.stripe.com/changelog/2019-03-14) to learn more.
|
796
796
|
attr_accessor :payment_behavior
|
797
797
|
# Payment settings to pass to invoices created by the subscription.
|
798
798
|
attr_accessor :payment_settings
|
@@ -1113,7 +1113,7 @@ module Stripe
|
|
1113
1113
|
end
|
1114
1114
|
|
1115
1115
|
class BillingMode < Stripe::RequestParams
|
1116
|
-
#
|
1116
|
+
# Controls the calculation and orchestration of prorations and invoices for subscriptions.
|
1117
1117
|
attr_accessor :type
|
1118
1118
|
|
1119
1119
|
def initialize(type: nil)
|
@@ -117,7 +117,7 @@ module Stripe
|
|
117
117
|
#
|
118
118
|
# Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).
|
119
119
|
#
|
120
|
-
# Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/
|
120
|
+
# Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://docs.stripe.com/changelog/2019-03-14) to learn more.
|
121
121
|
attr_accessor :payment_behavior
|
122
122
|
# The identifier of the new plan for this subscription item.
|
123
123
|
attr_accessor :plan
|
@@ -272,7 +272,7 @@ module Stripe
|
|
272
272
|
#
|
273
273
|
# Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).
|
274
274
|
#
|
275
|
-
# Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/
|
275
|
+
# Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://docs.stripe.com/changelog/2019-03-14) to learn more.
|
276
276
|
attr_accessor :payment_behavior
|
277
277
|
# The identifier of the plan to add to the subscription.
|
278
278
|
attr_accessor :plan
|
@@ -359,7 +359,7 @@ module Stripe
|
|
359
359
|
|
360
360
|
class CreateParams < Stripe::RequestParams
|
361
361
|
class BillingMode < Stripe::RequestParams
|
362
|
-
#
|
362
|
+
# Controls the calculation and orchestration of prorations and invoices for subscriptions.
|
363
363
|
attr_accessor :type
|
364
364
|
|
365
365
|
def initialize(type: nil)
|
@@ -599,6 +599,18 @@ module Stripe
|
|
599
599
|
end
|
600
600
|
end
|
601
601
|
|
602
|
+
class Duration < Stripe::RequestParams
|
603
|
+
# Specifies phase duration. Either `day`, `week`, `month` or `year`.
|
604
|
+
attr_accessor :interval
|
605
|
+
# The multiplier applied to the interval.
|
606
|
+
attr_accessor :interval_count
|
607
|
+
|
608
|
+
def initialize(interval: nil, interval_count: nil)
|
609
|
+
@interval = interval
|
610
|
+
@interval_count = interval_count
|
611
|
+
end
|
612
|
+
end
|
613
|
+
|
602
614
|
class InvoiceSettings < Stripe::RequestParams
|
603
615
|
class Issuer < Stripe::RequestParams
|
604
616
|
# The connected account being referenced when `type` is `account`.
|
@@ -762,13 +774,15 @@ module Stripe
|
|
762
774
|
attr_accessor :description
|
763
775
|
# The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
|
764
776
|
attr_accessor :discounts
|
777
|
+
# The number of intervals the phase should last. If set, `end_date` must not be set.
|
778
|
+
attr_accessor :duration
|
765
779
|
# The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
|
766
780
|
attr_accessor :end_date
|
767
781
|
# All invoices will be billed using the specified settings.
|
768
782
|
attr_accessor :invoice_settings
|
769
783
|
# List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
|
770
784
|
attr_accessor :items
|
771
|
-
# Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set.
|
785
|
+
# Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. This parameter is deprecated and will be removed in a future version. Use `duration` instead.
|
772
786
|
attr_accessor :iterations
|
773
787
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
|
774
788
|
attr_accessor :metadata
|
@@ -795,6 +809,7 @@ module Stripe
|
|
795
809
|
default_tax_rates: nil,
|
796
810
|
description: nil,
|
797
811
|
discounts: nil,
|
812
|
+
duration: nil,
|
798
813
|
end_date: nil,
|
799
814
|
invoice_settings: nil,
|
800
815
|
items: nil,
|
@@ -817,6 +832,7 @@ module Stripe
|
|
817
832
|
@default_tax_rates = default_tax_rates
|
818
833
|
@description = description
|
819
834
|
@discounts = discounts
|
835
|
+
@duration = duration
|
820
836
|
@end_date = end_date
|
821
837
|
@invoice_settings = invoice_settings
|
822
838
|
@items = items
|
@@ -1104,6 +1120,18 @@ module Stripe
|
|
1104
1120
|
end
|
1105
1121
|
end
|
1106
1122
|
|
1123
|
+
class Duration < Stripe::RequestParams
|
1124
|
+
# Specifies phase duration. Either `day`, `week`, `month` or `year`.
|
1125
|
+
attr_accessor :interval
|
1126
|
+
# The multiplier applied to the interval.
|
1127
|
+
attr_accessor :interval_count
|
1128
|
+
|
1129
|
+
def initialize(interval: nil, interval_count: nil)
|
1130
|
+
@interval = interval
|
1131
|
+
@interval_count = interval_count
|
1132
|
+
end
|
1133
|
+
end
|
1134
|
+
|
1107
1135
|
class InvoiceSettings < Stripe::RequestParams
|
1108
1136
|
class Issuer < Stripe::RequestParams
|
1109
1137
|
# The connected account being referenced when `type` is `account`.
|
@@ -1267,13 +1295,15 @@ module Stripe
|
|
1267
1295
|
attr_accessor :description
|
1268
1296
|
# The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
|
1269
1297
|
attr_accessor :discounts
|
1298
|
+
# The number of intervals the phase should last. If set, `end_date` must not be set.
|
1299
|
+
attr_accessor :duration
|
1270
1300
|
# The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
|
1271
1301
|
attr_accessor :end_date
|
1272
1302
|
# All invoices will be billed using the specified settings.
|
1273
1303
|
attr_accessor :invoice_settings
|
1274
1304
|
# List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
|
1275
1305
|
attr_accessor :items
|
1276
|
-
# Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set.
|
1306
|
+
# Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. This parameter is deprecated and will be removed in a future version. Use `duration` instead.
|
1277
1307
|
attr_accessor :iterations
|
1278
1308
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
|
1279
1309
|
attr_accessor :metadata
|
@@ -1302,6 +1332,7 @@ module Stripe
|
|
1302
1332
|
default_tax_rates: nil,
|
1303
1333
|
description: nil,
|
1304
1334
|
discounts: nil,
|
1335
|
+
duration: nil,
|
1305
1336
|
end_date: nil,
|
1306
1337
|
invoice_settings: nil,
|
1307
1338
|
items: nil,
|
@@ -1325,6 +1356,7 @@ module Stripe
|
|
1325
1356
|
@default_tax_rates = default_tax_rates
|
1326
1357
|
@description = description
|
1327
1358
|
@discounts = discounts
|
1359
|
+
@duration = duration
|
1328
1360
|
@end_date = end_date
|
1329
1361
|
@invoice_settings = invoice_settings
|
1330
1362
|
@items = items
|