stripe 15.4.0.pre.beta.2 → 15.5.0.pre.beta.1

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.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/API_VERSION +1 -1
  3. data/CHANGELOG.md +61 -5
  4. data/OPENAPI_VERSION +1 -1
  5. data/README.md +1 -1
  6. data/VERSION +1 -1
  7. data/lib/stripe/api_version.rb +1 -1
  8. data/lib/stripe/event_types.rb +2 -2
  9. data/lib/stripe/events/{v2_core_account_link_completed_event.rb → v2_core_account_link_returned_event.rb} +2 -2
  10. data/lib/stripe/events/{v2_off_session_payment_requires_capture_event.rb → v2_money_management_payout_method_updated_event.rb} +3 -3
  11. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_failed_event.rb +1 -1
  12. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb +2 -1
  13. data/lib/stripe/events/v2_payments_off_session_payment_canceled_event.rb +1 -1
  14. data/lib/stripe/events/v2_payments_off_session_payment_created_event.rb +1 -1
  15. data/lib/stripe/events/v2_payments_off_session_payment_failed_event.rb +1 -1
  16. data/lib/stripe/events/v2_payments_off_session_payment_succeeded_event.rb +1 -1
  17. data/lib/stripe/object_types.rb +3 -0
  18. data/lib/stripe/resources/account.rb +5 -5
  19. data/lib/stripe/resources/account_link.rb +3 -1
  20. data/lib/stripe/resources/account_session.rb +51 -0
  21. data/lib/stripe/resources/balance_settings.rb +13 -13
  22. data/lib/stripe/resources/billing/credit_grant.rb +1 -1
  23. data/lib/stripe/resources/billing/meter_usage.rb +23 -0
  24. data/lib/stripe/resources/billing/meter_usage_row.rb +28 -0
  25. data/lib/stripe/resources/billing_portal/configuration.rb +46 -2
  26. data/lib/stripe/resources/charge.rb +7 -5
  27. data/lib/stripe/resources/checkout/session.rb +106 -6
  28. data/lib/stripe/resources/confirmation_token.rb +3 -3
  29. data/lib/stripe/resources/customer.rb +1 -1
  30. data/lib/stripe/resources/dispute.rb +10 -1
  31. data/lib/stripe/resources/event.rb +14 -26
  32. data/lib/stripe/resources/fx_quote.rb +6 -4
  33. data/lib/stripe/resources/invoice.rb +101 -8
  34. data/lib/stripe/resources/invoice_item.rb +1 -1
  35. data/lib/stripe/resources/payment_attempt_record.rb +6 -4
  36. data/lib/stripe/resources/payment_intent.rb +815 -4
  37. data/lib/stripe/resources/payment_link.rb +83 -5
  38. data/lib/stripe/resources/payment_method.rb +4 -4
  39. data/lib/stripe/resources/payment_record.rb +6 -4
  40. data/lib/stripe/resources/quote.rb +1 -1
  41. data/lib/stripe/resources/quote_preview_invoice.rb +17 -0
  42. data/lib/stripe/resources/radar/value_list.rb +2 -2
  43. data/lib/stripe/resources/refund.rb +1 -1
  44. data/lib/stripe/resources/review.rb +2 -2
  45. data/lib/stripe/resources/setup_attempt.rb +1 -1
  46. data/lib/stripe/resources/subscription.rb +79 -2
  47. data/lib/stripe/resources/subscription_item.rb +2 -2
  48. data/lib/stripe/resources/subscription_schedule.rb +35 -3
  49. data/lib/stripe/resources/tax/registration.rb +408 -30
  50. data/lib/stripe/resources/terminal/configuration.rb +196 -0
  51. data/lib/stripe/resources/terminal/onboarding_link.rb +84 -0
  52. data/lib/stripe/resources/v2/core/account.rb +11 -0
  53. data/lib/stripe/resources/v2/core/account_link.rb +18 -2
  54. data/lib/stripe/resources/v2/money_management/payout_method.rb +2 -0
  55. data/lib/stripe/resources/v2/payments/off_session_payment.rb +40 -23
  56. data/lib/stripe/resources.rb +5 -2
  57. data/lib/stripe/services/account_link_service.rb +3 -1
  58. data/lib/stripe/services/account_service.rb +3 -3
  59. data/lib/stripe/services/account_session_service.rb +34 -0
  60. data/lib/stripe/services/balance_settings_service.rb +10 -10
  61. data/lib/stripe/services/billing/credit_grant_service.rb +1 -1
  62. data/lib/stripe/services/billing/meter_usage_service.rb +76 -0
  63. data/lib/stripe/services/billing_portal/configuration_service.rb +36 -2
  64. data/lib/stripe/services/billing_service.rb +2 -1
  65. data/lib/stripe/services/checkout/session_service.rb +93 -5
  66. data/lib/stripe/services/invoice_item_service.rb +1 -1
  67. data/lib/stripe/services/invoice_service.rb +84 -8
  68. data/lib/stripe/services/payment_intent_service.rb +809 -3
  69. data/lib/stripe/services/payment_link_service.rb +81 -5
  70. data/lib/stripe/services/payment_method_service.rb +1 -1
  71. data/lib/stripe/services/quote_service.rb +1 -1
  72. data/lib/stripe/services/radar/value_list_service.rb +1 -1
  73. data/lib/stripe/services/subscription_item_service.rb +2 -2
  74. data/lib/stripe/services/subscription_schedule_service.rb +35 -3
  75. data/lib/stripe/services/subscription_service.rb +62 -2
  76. data/lib/stripe/services/tax/registration_service.rb +360 -30
  77. data/lib/stripe/services/terminal/configuration_service.rb +152 -0
  78. data/lib/stripe/services/terminal/onboarding_link_service.rb +56 -0
  79. data/lib/stripe/services/terminal_service.rb +2 -1
  80. data/lib/stripe/services/v2/core/account_link_service.rb +41 -3
  81. data/lib/stripe/services/v2/core/account_service.rb +38 -2
  82. data/lib/stripe/services/v2/payments/off_session_payment_service.rb +34 -19
  83. data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +4 -0
  84. data/lib/stripe/services.rb +2 -0
  85. data/lib/stripe/version.rb +1 -1
  86. data/rbi/stripe.rbi +4893 -390
  87. metadata +9 -4
@@ -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 999.
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 999.
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
@@ -140,7 +140,7 @@ module Stripe
140
140
  end
141
141
  # The authorized amount
142
142
  attr_reader :amount_authorized
143
- # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
143
+ # Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
144
144
  attr_reader :brand
145
145
  # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.
146
146
  attr_reader :brand_product
@@ -322,7 +322,7 @@ module Stripe
322
322
  # Attribute for field visa_checkout
323
323
  attr_reader :visa_checkout
324
324
  end
325
- # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
325
+ # Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
326
326
  attr_reader :brand
327
327
  # Checks on Card address and CVC if provided.
328
328
  attr_reader :checks
@@ -379,7 +379,7 @@ module Stripe
379
379
  # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`.
380
380
  attr_reader :type
381
381
  end
382
- # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
382
+ # Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
383
383
  attr_reader :brand
384
384
  # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.
385
385
  attr_reader :brand_product
@@ -1785,7 +1785,7 @@ module Stripe
1785
1785
  request_stripe_object(method: :get, path: "/v1/payment_methods", params: params, opts: opts)
1786
1786
  end
1787
1787
 
1788
- # Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.
1788
+ # Updates a PaymentMethod object. A PaymentMethod must be attached to a customer to be updated.
1789
1789
  def self.update(payment_method, params = {}, opts = {})
1790
1790
  request_stripe_object(
1791
1791
  method: :post,
@@ -123,7 +123,7 @@ module Stripe
123
123
  class AmazonPay < Stripe::StripeObject
124
124
  class Funding < Stripe::StripeObject
125
125
  class Card < Stripe::StripeObject
126
- # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
126
+ # Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
127
127
  attr_reader :brand
128
128
  # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. (For internal use only and not typically available in standard API requests.)
129
129
  attr_reader :brand_product
@@ -252,7 +252,7 @@ module Stripe
252
252
  # Attribute for field version
253
253
  attr_reader :version
254
254
  end
255
- # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
255
+ # Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
256
256
  attr_reader :brand
257
257
  # When using manual capture, a future timestamp at which the charge will be automatically refunded if uncaptured.
258
258
  attr_reader :capture_before
@@ -319,7 +319,7 @@ module Stripe
319
319
  end
320
320
  # The authorized amount
321
321
  attr_reader :amount_authorized
322
- # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
322
+ # Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
323
323
  attr_reader :brand
324
324
  # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.
325
325
  attr_reader :brand_product
@@ -376,6 +376,8 @@ module Stripe
376
376
  attr_reader :buyer_id
377
377
  # A public identifier for buyers using Cash App.
378
378
  attr_reader :cashtag
379
+ # A unique and immutable identifier of payments assigned by Cash App
380
+ attr_reader :transaction_id
379
381
  end
380
382
 
381
383
  class Crypto < Stripe::StripeObject
@@ -742,7 +744,7 @@ module Stripe
742
744
  class RevolutPay < Stripe::StripeObject
743
745
  class Funding < Stripe::StripeObject
744
746
  class Card < Stripe::StripeObject
745
- # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
747
+ # Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
746
748
  attr_reader :brand
747
749
  # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. (For internal use only and not typically available in standard API requests.)
748
750
  attr_reader :brand_product
@@ -1271,7 +1271,7 @@ module Stripe
1271
1271
  end
1272
1272
 
1273
1273
  class BillingMode < Stripe::RequestParams
1274
- # Attribute for param field type
1274
+ # Controls the calculation and orchestration of prorations and invoices for subscriptions.
1275
1275
  attr_accessor :type
1276
1276
 
1277
1277
  def initialize(type: nil)
@@ -314,6 +314,21 @@ module Stripe
314
314
  class Konbini < Stripe::StripeObject; end
315
315
  class SepaDebit < Stripe::StripeObject; end
316
316
 
317
+ class Upi < Stripe::StripeObject
318
+ class MandateOptions < Stripe::StripeObject
319
+ # Amount to be charged for future payments.
320
+ attr_reader :amount
321
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
322
+ attr_reader :amount_type
323
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
324
+ attr_reader :description
325
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
326
+ attr_reader :end_date
327
+ end
328
+ # Attribute for field mandate_options
329
+ attr_reader :mandate_options
330
+ end
331
+
317
332
  class UsBankAccount < Stripe::StripeObject
318
333
  class FinancialConnections < Stripe::StripeObject
319
334
  class Filters < Stripe::StripeObject
@@ -348,6 +363,8 @@ module Stripe
348
363
  attr_reader :konbini
349
364
  # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
350
365
  attr_reader :sepa_debit
366
+ # If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice’s PaymentIntent.
367
+ attr_reader :upi
351
368
  # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
352
369
  attr_reader :us_bank_account
353
370
  end
@@ -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`, `us_bank_account_fingerprint`, `sepa_debit_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. Use `string` if the item type is unknown or mixed.
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`, `us_bank_account_fingerprint`, `sepa_debit_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`.
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
@@ -238,7 +238,7 @@ module Stripe
238
238
  end
239
239
 
240
240
  class PresentmentDetails < Stripe::StripeObject
241
- # Amount intended to be collected by this payment, denominated in presentment_currency.
241
+ # Amount intended to be collected by this payment, denominated in `presentment_currency`.
242
242
  attr_reader :presentment_amount
243
243
  # Currency presented to the customer during payment.
244
244
  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 `canceled`.
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 `canceled`.
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`, or `unknown`.
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
@@ -158,6 +158,21 @@ module Stripe
158
158
  class Konbini < Stripe::StripeObject; end
159
159
  class SepaDebit < Stripe::StripeObject; end
160
160
 
161
+ class Upi < Stripe::StripeObject
162
+ class MandateOptions < Stripe::StripeObject
163
+ # Amount to be charged for future payments.
164
+ attr_reader :amount
165
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
166
+ attr_reader :amount_type
167
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
168
+ attr_reader :description
169
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
170
+ attr_reader :end_date
171
+ end
172
+ # Attribute for field mandate_options
173
+ attr_reader :mandate_options
174
+ end
175
+
161
176
  class UsBankAccount < Stripe::StripeObject
162
177
  class FinancialConnections < Stripe::StripeObject
163
178
  class Filters < Stripe::StripeObject
@@ -192,6 +207,8 @@ module Stripe
192
207
  attr_reader :konbini
193
208
  # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to invoices created by the subscription.
194
209
  attr_reader :sepa_debit
210
+ # This sub-hash contains details about the UPI payment method options to pass to invoices created by the subscription.
211
+ attr_reader :upi
195
212
  # This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription.
196
213
  attr_reader :us_bank_account
197
214
  end
@@ -736,6 +753,32 @@ module Stripe
736
753
  class Konbini < Stripe::RequestParams; end
737
754
  class SepaDebit < Stripe::RequestParams; end
738
755
 
756
+ class Upi < Stripe::RequestParams
757
+ class MandateOptions < Stripe::RequestParams
758
+ # Amount to be charged for future payments.
759
+ attr_accessor :amount
760
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
761
+ attr_accessor :amount_type
762
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
763
+ attr_accessor :description
764
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
765
+ attr_accessor :end_date
766
+
767
+ def initialize(amount: nil, amount_type: nil, description: nil, end_date: nil)
768
+ @amount = amount
769
+ @amount_type = amount_type
770
+ @description = description
771
+ @end_date = end_date
772
+ end
773
+ end
774
+ # Configuration options for setting up an eMandate
775
+ attr_accessor :mandate_options
776
+
777
+ def initialize(mandate_options: nil)
778
+ @mandate_options = mandate_options
779
+ end
780
+ end
781
+
739
782
  class UsBankAccount < Stripe::RequestParams
740
783
  class FinancialConnections < Stripe::RequestParams
741
784
  class Filters < Stripe::RequestParams
@@ -786,6 +829,8 @@ module Stripe
786
829
  attr_accessor :konbini
787
830
  # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
788
831
  attr_accessor :sepa_debit
832
+ # This sub-hash contains details about the UPI payment method options to pass to the invoice’s PaymentIntent.
833
+ attr_accessor :upi
789
834
  # This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
790
835
  attr_accessor :us_bank_account
791
836
 
@@ -797,6 +842,7 @@ module Stripe
797
842
  id_bank_transfer: nil,
798
843
  konbini: nil,
799
844
  sepa_debit: nil,
845
+ upi: nil,
800
846
  us_bank_account: nil
801
847
  )
802
848
  @acss_debit = acss_debit
@@ -806,6 +852,7 @@ module Stripe
806
852
  @id_bank_transfer = id_bank_transfer
807
853
  @konbini = konbini
808
854
  @sepa_debit = sepa_debit
855
+ @upi = upi
809
856
  @us_bank_account = us_bank_account
810
857
  end
811
858
  end
@@ -929,7 +976,7 @@ module Stripe
929
976
  #
930
977
  # 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).
931
978
  #
932
- # 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/docs/upgrades#2019-03-14) to learn more.
979
+ # 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.
933
980
  attr_accessor :payment_behavior
934
981
  # Payment settings to pass to invoices created by the subscription.
935
982
  attr_accessor :payment_settings
@@ -1286,7 +1333,7 @@ module Stripe
1286
1333
  end
1287
1334
 
1288
1335
  class BillingMode < Stripe::RequestParams
1289
- # Attribute for param field type
1336
+ # Controls the calculation and orchestration of prorations and invoices for subscriptions.
1290
1337
  attr_accessor :type
1291
1338
 
1292
1339
  def initialize(type: nil)
@@ -1615,6 +1662,32 @@ module Stripe
1615
1662
  class Konbini < Stripe::RequestParams; end
1616
1663
  class SepaDebit < Stripe::RequestParams; end
1617
1664
 
1665
+ class Upi < Stripe::RequestParams
1666
+ class MandateOptions < Stripe::RequestParams
1667
+ # Amount to be charged for future payments.
1668
+ attr_accessor :amount
1669
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
1670
+ attr_accessor :amount_type
1671
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
1672
+ attr_accessor :description
1673
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
1674
+ attr_accessor :end_date
1675
+
1676
+ def initialize(amount: nil, amount_type: nil, description: nil, end_date: nil)
1677
+ @amount = amount
1678
+ @amount_type = amount_type
1679
+ @description = description
1680
+ @end_date = end_date
1681
+ end
1682
+ end
1683
+ # Configuration options for setting up an eMandate
1684
+ attr_accessor :mandate_options
1685
+
1686
+ def initialize(mandate_options: nil)
1687
+ @mandate_options = mandate_options
1688
+ end
1689
+ end
1690
+
1618
1691
  class UsBankAccount < Stripe::RequestParams
1619
1692
  class FinancialConnections < Stripe::RequestParams
1620
1693
  class Filters < Stripe::RequestParams
@@ -1665,6 +1738,8 @@ module Stripe
1665
1738
  attr_accessor :konbini
1666
1739
  # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
1667
1740
  attr_accessor :sepa_debit
1741
+ # This sub-hash contains details about the UPI payment method options to pass to the invoice’s PaymentIntent.
1742
+ attr_accessor :upi
1668
1743
  # This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
1669
1744
  attr_accessor :us_bank_account
1670
1745
 
@@ -1676,6 +1751,7 @@ module Stripe
1676
1751
  id_bank_transfer: nil,
1677
1752
  konbini: nil,
1678
1753
  sepa_debit: nil,
1754
+ upi: nil,
1679
1755
  us_bank_account: nil
1680
1756
  )
1681
1757
  @acss_debit = acss_debit
@@ -1685,6 +1761,7 @@ module Stripe
1685
1761
  @id_bank_transfer = id_bank_transfer
1686
1762
  @konbini = konbini
1687
1763
  @sepa_debit = sepa_debit
1764
+ @upi = upi
1688
1765
  @us_bank_account = us_bank_account
1689
1766
  end
1690
1767
  end
@@ -152,7 +152,7 @@ module Stripe
152
152
  #
153
153
  # 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).
154
154
  #
155
- # 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/docs/upgrades#2019-03-14) to learn more.
155
+ # 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.
156
156
  attr_accessor :payment_behavior
157
157
  # The identifier of the new plan for this subscription item.
158
158
  attr_accessor :plan
@@ -347,7 +347,7 @@ module Stripe
347
347
  #
348
348
  # 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).
349
349
  #
350
- # 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/docs/upgrades#2019-03-14) to learn more.
350
+ # 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.
351
351
  attr_accessor :payment_behavior
352
352
  # The identifier of the plan to add to the subscription.
353
353
  attr_accessor :plan
@@ -442,7 +442,7 @@ module Stripe
442
442
 
443
443
  class CreateParams < Stripe::RequestParams
444
444
  class BillingMode < Stripe::RequestParams
445
- # Attribute for param field type
445
+ # Controls the calculation and orchestration of prorations and invoices for subscriptions.
446
446
  attr_accessor :type
447
447
 
448
448
  def initialize(type: nil)
@@ -738,6 +738,18 @@ module Stripe
738
738
  end
739
739
  end
740
740
 
741
+ class Duration < Stripe::RequestParams
742
+ # Specifies phase duration. Either `day`, `week`, `month` or `year`.
743
+ attr_accessor :interval
744
+ # The multiplier applied to the interval.
745
+ attr_accessor :interval_count
746
+
747
+ def initialize(interval: nil, interval_count: nil)
748
+ @interval = interval
749
+ @interval_count = interval_count
750
+ end
751
+ end
752
+
741
753
  class InvoiceSettings < Stripe::RequestParams
742
754
  class Issuer < Stripe::RequestParams
743
755
  # The connected account being referenced when `type` is `account`.
@@ -971,13 +983,15 @@ module Stripe
971
983
  attr_accessor :description
972
984
  # 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.
973
985
  attr_accessor :discounts
986
+ # The number of intervals the phase should last. If set, `end_date` must not be set.
987
+ attr_accessor :duration
974
988
  # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
975
989
  attr_accessor :end_date
976
990
  # All invoices will be billed using the specified settings.
977
991
  attr_accessor :invoice_settings
978
992
  # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
979
993
  attr_accessor :items
980
- # 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.
994
+ # 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.
981
995
  attr_accessor :iterations
982
996
  # 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`.
983
997
  attr_accessor :metadata
@@ -1010,6 +1024,7 @@ module Stripe
1010
1024
  default_tax_rates: nil,
1011
1025
  description: nil,
1012
1026
  discounts: nil,
1027
+ duration: nil,
1013
1028
  end_date: nil,
1014
1029
  invoice_settings: nil,
1015
1030
  items: nil,
@@ -1035,6 +1050,7 @@ module Stripe
1035
1050
  @default_tax_rates = default_tax_rates
1036
1051
  @description = description
1037
1052
  @discounts = discounts
1053
+ @duration = duration
1038
1054
  @end_date = end_date
1039
1055
  @invoice_settings = invoice_settings
1040
1056
  @items = items
@@ -1405,6 +1421,18 @@ module Stripe
1405
1421
  end
1406
1422
  end
1407
1423
 
1424
+ class Duration < Stripe::RequestParams
1425
+ # Specifies phase duration. Either `day`, `week`, `month` or `year`.
1426
+ attr_accessor :interval
1427
+ # The multiplier applied to the interval.
1428
+ attr_accessor :interval_count
1429
+
1430
+ def initialize(interval: nil, interval_count: nil)
1431
+ @interval = interval
1432
+ @interval_count = interval_count
1433
+ end
1434
+ end
1435
+
1408
1436
  class InvoiceSettings < Stripe::RequestParams
1409
1437
  class Issuer < Stripe::RequestParams
1410
1438
  # The connected account being referenced when `type` is `account`.
@@ -1638,13 +1666,15 @@ module Stripe
1638
1666
  attr_accessor :description
1639
1667
  # 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.
1640
1668
  attr_accessor :discounts
1669
+ # The number of intervals the phase should last. If set, `end_date` must not be set.
1670
+ attr_accessor :duration
1641
1671
  # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
1642
1672
  attr_accessor :end_date
1643
1673
  # All invoices will be billed using the specified settings.
1644
1674
  attr_accessor :invoice_settings
1645
1675
  # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
1646
1676
  attr_accessor :items
1647
- # 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.
1677
+ # 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.
1648
1678
  attr_accessor :iterations
1649
1679
  # 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`.
1650
1680
  attr_accessor :metadata
@@ -1679,6 +1709,7 @@ module Stripe
1679
1709
  default_tax_rates: nil,
1680
1710
  description: nil,
1681
1711
  discounts: nil,
1712
+ duration: nil,
1682
1713
  end_date: nil,
1683
1714
  invoice_settings: nil,
1684
1715
  items: nil,
@@ -1705,6 +1736,7 @@ module Stripe
1705
1736
  @default_tax_rates = default_tax_rates
1706
1737
  @description = description
1707
1738
  @discounts = discounts
1739
+ @duration = duration
1708
1740
  @end_date = end_date
1709
1741
  @invoice_settings = invoice_settings
1710
1742
  @items = items