stripe 17.3.0.pre.alpha.2 → 18.1.0.pre.alpha.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 (83) hide show
  1. checksums.yaml +4 -4
  2. data/lib/stripe/api_version.rb +1 -1
  3. data/lib/stripe/object_types.rb +2 -0
  4. data/lib/stripe/params/account_create_params.rb +27 -10
  5. data/lib/stripe/params/account_person_create_params.rb +9 -9
  6. data/lib/stripe/params/account_person_update_params.rb +9 -9
  7. data/lib/stripe/params/account_update_params.rb +27 -10
  8. data/lib/stripe/params/balance_transfer_create_params.rb +66 -0
  9. data/lib/stripe/params/billing/analytics/meter_usage_retrieve_params.rb +2 -2
  10. data/lib/stripe/params/charge_capture_params.rb +941 -2
  11. data/lib/stripe/params/charge_update_params.rb +941 -2
  12. data/lib/stripe/params/checkout/session_create_params.rb +3 -3
  13. data/lib/stripe/params/customer_balance_transaction_list_params.rb +21 -1
  14. data/lib/stripe/params/customer_session_create_params.rb +1 -1
  15. data/lib/stripe/params/invoice_create_preview_params.rb +28 -1
  16. data/lib/stripe/params/invoice_payment_list_params.rb +22 -0
  17. data/lib/stripe/params/issuing/authorization_create_params.rb +16 -1
  18. data/lib/stripe/params/order_create_params.rb +938 -1
  19. data/lib/stripe/params/order_update_params.rb +938 -1
  20. data/lib/stripe/params/payment_intent_capture_params.rb +962 -13
  21. data/lib/stripe/params/payment_intent_confirm_params.rb +2017 -123
  22. data/lib/stripe/params/payment_intent_create_params.rb +2017 -123
  23. data/lib/stripe/params/payment_intent_increment_authorization_params.rb +29 -13
  24. data/lib/stripe/params/payment_intent_update_params.rb +2017 -123
  25. data/lib/stripe/params/payment_method_list_params.rb +8 -0
  26. data/lib/stripe/params/quote_create_params.rb +18 -18
  27. data/lib/stripe/params/quote_update_params.rb +18 -18
  28. data/lib/stripe/params/radar/account_evaluation_create_params.rb +81 -0
  29. data/lib/stripe/params/radar/account_evaluation_retrieve_params.rb +15 -0
  30. data/lib/stripe/params/radar/account_evaluation_update_params.rb +18 -0
  31. data/lib/stripe/params/setup_intent_confirm_params.rb +3 -3
  32. data/lib/stripe/params/setup_intent_create_params.rb +3 -3
  33. data/lib/stripe/params/setup_intent_update_params.rb +3 -3
  34. data/lib/stripe/params/subscription_schedule_amend_params.rb +28 -1
  35. data/lib/stripe/params/tax/registration_create_params.rb +1 -1
  36. data/lib/stripe/params/terminal/configuration_create_params.rb +9 -9
  37. data/lib/stripe/params/terminal/configuration_update_params.rb +9 -9
  38. data/lib/stripe/params/test_helpers/issuing/authorization_create_params.rb +16 -1
  39. data/lib/stripe/params/token_create_params.rb +18 -18
  40. data/lib/stripe/params/transfer_create_params.rb +5 -5
  41. data/lib/stripe/params.rb +4 -0
  42. data/lib/stripe/resources/account.rb +19 -1
  43. data/lib/stripe/resources/application_fee.rb +2 -2
  44. data/lib/stripe/resources/balance_transfer.rb +139 -0
  45. data/lib/stripe/resources/bank_account.rb +2 -2
  46. data/lib/stripe/resources/billing/analytics/meter_usage_row.rb +2 -2
  47. data/lib/stripe/resources/billing_portal/configuration.rb +2 -0
  48. data/lib/stripe/resources/capital/financing_offer.rb +6 -6
  49. data/lib/stripe/resources/capital/financing_summary.rb +7 -7
  50. data/lib/stripe/resources/charge.rb +5 -3
  51. data/lib/stripe/resources/checkout/session.rb +3 -3
  52. data/lib/stripe/resources/confirmation_token.rb +1 -1
  53. data/lib/stripe/resources/delegated_checkout/requested_session.rb +50 -50
  54. data/lib/stripe/resources/financial_connections/account.rb +22 -0
  55. data/lib/stripe/resources/invoice.rb +1 -1
  56. data/lib/stripe/resources/issuing/card.rb +18 -0
  57. data/lib/stripe/resources/mandate.rb +3 -3
  58. data/lib/stripe/resources/payment_attempt_record.rb +8 -6
  59. data/lib/stripe/resources/payment_intent.rb +38 -26
  60. data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +13 -7
  61. data/lib/stripe/resources/payment_method.rb +1 -1
  62. data/lib/stripe/resources/payment_record.rb +8 -6
  63. data/lib/stripe/resources/person.rb +36 -36
  64. data/lib/stripe/resources/quote.rb +27 -27
  65. data/lib/stripe/resources/quote_preview_invoice.rb +1 -1
  66. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +9 -9
  67. data/lib/stripe/resources/radar/account_evaluation.rb +116 -0
  68. data/lib/stripe/resources/refund.rb +31 -0
  69. data/lib/stripe/resources/setup_attempt.rb +1 -1
  70. data/lib/stripe/resources/setup_intent.rb +3 -3
  71. data/lib/stripe/resources/subscription.rb +9 -9
  72. data/lib/stripe/resources/subscription_schedule.rb +9 -9
  73. data/lib/stripe/resources/transfer.rb +4 -4
  74. data/lib/stripe/resources.rb +2 -0
  75. data/lib/stripe/services/balance_transfer_service.rb +17 -0
  76. data/lib/stripe/services/radar/account_evaluation_service.rb +41 -0
  77. data/lib/stripe/services/radar_service.rb +2 -1
  78. data/lib/stripe/services/v1_services.rb +2 -1
  79. data/lib/stripe/services.rb +2 -0
  80. data/lib/stripe/util.rb +2 -5
  81. data/lib/stripe/version.rb +1 -1
  82. data/rbi/stripe.rbi +17737 -652
  83. metadata +10 -2
@@ -79,26 +79,32 @@ module Stripe
79
79
  end
80
80
 
81
81
  class Tax < ::Stripe::RequestParams
82
- # The total tax on an item. Non-negative integer.
82
+ # The total amount of tax on a single line item represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Required for L3 rates. An integer greater than or equal to 0.
83
+ #
84
+ # This field is mutually exclusive with the `amount_details[tax][total_tax_amount]` field.
83
85
  attr_accessor :total_tax_amount
84
86
 
85
87
  def initialize(total_tax_amount: nil)
86
88
  @total_tax_amount = total_tax_amount
87
89
  end
88
90
  end
89
- # The amount an item was discounted for. Positive integer.
91
+ # The discount applied on this line item represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). An integer greater than 0.
92
+ #
93
+ # This field is mutually exclusive with the `amount_details[discount_amount]` field.
90
94
  attr_accessor :discount_amount
91
95
  # Payment method-specific information for line items.
92
96
  attr_accessor :payment_method_options
93
- # Unique identifier of the product. At most 12 characters long.
97
+ # The product code of the line item, such as an SKU. Required for L3 rates. At most 12 characters long.
94
98
  attr_accessor :product_code
95
- # Name of the product. At most 100 characters long.
99
+ # The product name of the line item. Required for L3 rates. At most 1024 characters long.
100
+ #
101
+ # For Cards, this field is truncated to 26 alphanumeric characters before being sent to the card networks. For Paypal, this field is truncated to 127 characters.
96
102
  attr_accessor :product_name
97
- # Number of items of the product. Positive integer.
103
+ # The quantity of items. Required for L3 rates. An integer greater than 0.
98
104
  attr_accessor :quantity
99
105
  # Contains information about the tax on the item.
100
106
  attr_accessor :tax
101
- # Cost of the product. Non-negative integer.
107
+ # The unit cost of the line item represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Required for L3 rates. An integer greater than or equal to 0.
102
108
  attr_accessor :unit_cost
103
109
  # A unit of measure for the line item, such as gallons, feet, meters, etc.
104
110
  attr_accessor :unit_of_measure
@@ -125,11 +131,11 @@ module Stripe
125
131
  end
126
132
 
127
133
  class Shipping < ::Stripe::RequestParams
128
- # Portion of the amount that is for shipping.
134
+ # If a physical good is being shipped, the cost of shipping represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). An integer greater than or equal to 0.
129
135
  attr_accessor :amount
130
- # The postal code that represents the shipping source.
136
+ # If a physical good is being shipped, the postal code of where it is being shipped from. At most 10 alphanumeric characters long, hyphens are allowed.
131
137
  attr_accessor :from_postal_code
132
- # The postal code that represents the shipping destination.
138
+ # If a physical good is being shipped, the postal code of where it is being shipped to. At most 10 alphanumeric characters long, hyphens are allowed.
133
139
  attr_accessor :to_postal_code
134
140
 
135
141
  def initialize(amount: nil, from_postal_code: nil, to_postal_code: nil)
@@ -140,14 +146,18 @@ module Stripe
140
146
  end
141
147
 
142
148
  class Tax < ::Stripe::RequestParams
143
- # Total portion of the amount that is for tax.
149
+ # The total amount of tax on the transaction represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Required for L2 rates. An integer greater than or equal to 0.
150
+ #
151
+ # This field is mutually exclusive with the `amount_details[line_items][#][tax][total_tax_amount]` field.
144
152
  attr_accessor :total_tax_amount
145
153
 
146
154
  def initialize(total_tax_amount: nil)
147
155
  @total_tax_amount = total_tax_amount
148
156
  end
149
157
  end
150
- # The total discount applied on the transaction.
158
+ # The total discount applied on the transaction represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). An integer greater than 0.
159
+ #
160
+ # This field is mutually exclusive with the `amount_details[line_items][#][discount_amount]` field.
151
161
  attr_accessor :discount_amount
152
162
  # A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items.
153
163
  attr_accessor :line_items
@@ -190,9 +200,15 @@ module Stripe
190
200
  end
191
201
 
192
202
  class PaymentDetails < ::Stripe::RequestParams
193
- # Some customers might be required by their company or organization to provide this information. If so, provide this value. Otherwise you can ignore this field.
203
+ # A unique value to identify the customer. This field is available only for card payments.
204
+ #
205
+ # This field is truncated to 25 alphanumeric characters, excluding spaces, before being sent to card networks.
194
206
  attr_accessor :customer_reference
195
- # A unique value assigned by the business to identify the transaction.
207
+ # A unique value assigned by the business to identify the transaction. Required for L2 and L3 rates.
208
+ #
209
+ # Required when the Payment Method Types array contains `card`, including when [automatic_payment_methods.enabled](/api/payment_intents/create#create_payment_intent-automatic_payment_methods-enabled) is set to `true`.
210
+ #
211
+ # For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, before being sent to card networks. For Klarna, this field is truncated to 255 characters and is visible to customers when they view the order in the Klarna app.
196
212
  attr_accessor :order_reference
197
213
 
198
214
  def initialize(customer_reference: nil, order_reference: nil)