stripe 15.2.0.pre.beta.1 → 15.3.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 (196) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +92 -0
  3. data/CONTRIBUTING.md +25 -0
  4. data/OPENAPI_VERSION +1 -1
  5. data/README.md +10 -7
  6. data/VERSION +1 -1
  7. data/lib/stripe/api_version.rb +1 -1
  8. data/lib/stripe/event_types.rb +9 -0
  9. data/lib/stripe/events/v2_core_account_link_completed_event.rb +1 -1
  10. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +1 -1
  11. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +1 -1
  12. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +1 -1
  13. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +1 -1
  14. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +1 -1
  15. data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +1 -1
  16. data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +1 -1
  17. data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +1 -1
  18. data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +1 -1
  19. data/lib/stripe/events/v2_money_management_outbound_payment_updated_event.rb +1 -1
  20. data/lib/stripe/events/v2_off_session_payment_requires_capture_event.rb +21 -0
  21. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_failed_event.rb +21 -0
  22. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb +21 -0
  23. data/lib/stripe/events/v2_payments_off_session_payment_canceled_event.rb +21 -0
  24. data/lib/stripe/events/v2_payments_off_session_payment_created_event.rb +21 -0
  25. data/lib/stripe/events/v2_payments_off_session_payment_failed_event.rb +21 -0
  26. data/lib/stripe/events/v2_payments_off_session_payment_succeeded_event.rb +21 -0
  27. data/lib/stripe/object_types.rb +1 -3
  28. data/lib/stripe/resources/account.rb +47 -20
  29. data/lib/stripe/resources/account_session.rb +85 -24
  30. data/lib/stripe/resources/apple_pay_domain.rb +1 -2
  31. data/lib/stripe/resources/balance.rb +42 -0
  32. data/lib/stripe/resources/balance_transaction.rb +2 -0
  33. data/lib/stripe/resources/bank_account.rb +2 -2
  34. data/lib/stripe/resources/billing_portal/session.rb +1 -1
  35. data/lib/stripe/resources/capability.rb +1 -1
  36. data/lib/stripe/resources/charge.rb +85 -9
  37. data/lib/stripe/resources/checkout/session.rb +22 -6
  38. data/lib/stripe/resources/confirmation_token.rb +37 -97
  39. data/lib/stripe/resources/country_spec.rb +1 -1
  40. data/lib/stripe/resources/coupon.rb +1 -2
  41. data/lib/stripe/resources/credit_note.rb +10 -11
  42. data/lib/stripe/resources/customer.rb +2 -4
  43. data/lib/stripe/resources/customer_session.rb +3 -3
  44. data/lib/stripe/resources/dispute.rb +2 -2
  45. data/lib/stripe/resources/event.rb +1 -1
  46. data/lib/stripe/resources/file.rb +1 -1
  47. data/lib/stripe/resources/financial_connections/account.rb +2 -0
  48. data/lib/stripe/resources/financial_connections/institution.rb +2 -0
  49. data/lib/stripe/resources/identity/verification_report.rb +6 -0
  50. data/lib/stripe/resources/identity/verification_session.rb +17 -11
  51. data/lib/stripe/resources/invoice.rb +70 -43
  52. data/lib/stripe/resources/invoice_item.rb +2 -3
  53. data/lib/stripe/resources/invoice_line_item.rb +1 -1
  54. data/lib/stripe/resources/invoice_payment.rb +9 -2
  55. data/lib/stripe/resources/issuing/authorization.rb +8 -8
  56. data/lib/stripe/resources/issuing/card.rb +1 -1
  57. data/lib/stripe/resources/issuing/dispute.rb +3 -3
  58. data/lib/stripe/resources/order.rb +2 -55
  59. data/lib/stripe/resources/payment_attempt_record.rb +8 -0
  60. data/lib/stripe/resources/payment_intent.rb +439 -411
  61. data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +7 -0
  62. data/lib/stripe/resources/payment_method.rb +50 -113
  63. data/lib/stripe/resources/payment_method_configuration.rb +297 -2
  64. data/lib/stripe/resources/payment_method_domain.rb +2 -2
  65. data/lib/stripe/resources/payment_record.rb +8 -0
  66. data/lib/stripe/resources/payout.rb +4 -4
  67. data/lib/stripe/resources/person.rb +2 -2
  68. data/lib/stripe/resources/plan.rb +2 -3
  69. data/lib/stripe/resources/price.rb +1 -1
  70. data/lib/stripe/resources/privacy/redaction_job.rb +52 -29
  71. data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +12 -4
  72. data/lib/stripe/resources/product.rb +1 -61
  73. data/lib/stripe/resources/quote.rb +1 -1
  74. data/lib/stripe/resources/quote_preview_invoice.rb +2 -2
  75. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +26 -1
  76. data/lib/stripe/resources/radar/value_list.rb +1 -2
  77. data/lib/stripe/resources/radar/value_list_item.rb +1 -2
  78. data/lib/stripe/resources/refund.rb +6 -1
  79. data/lib/stripe/resources/reversal.rb +1 -1
  80. data/lib/stripe/resources/review.rb +1 -1
  81. data/lib/stripe/resources/setup_intent.rb +123 -311
  82. data/lib/stripe/resources/source.rb +1 -1
  83. data/lib/stripe/resources/subscription.rb +132 -37
  84. data/lib/stripe/resources/subscription_item.rb +33 -0
  85. data/lib/stripe/resources/subscription_schedule.rb +120 -5
  86. data/lib/stripe/resources/tax/association.rb +8 -31
  87. data/lib/stripe/resources/tax/calculation.rb +4 -0
  88. data/lib/stripe/resources/tax/calculation_line_item.rb +2 -0
  89. data/lib/stripe/resources/tax/registration.rb +1 -1
  90. data/lib/stripe/resources/tax_id.rb +1 -2
  91. data/lib/stripe/resources/tax_rate.rb +2 -2
  92. data/lib/stripe/resources/terminal/configuration.rb +1 -2
  93. data/lib/stripe/resources/terminal/location.rb +2 -3
  94. data/lib/stripe/resources/terminal/reader.rb +26 -4
  95. data/lib/stripe/resources/test_helpers/test_clock.rb +1 -2
  96. data/lib/stripe/resources/token.rb +2 -2
  97. data/lib/stripe/resources/transfer.rb +1 -1
  98. data/lib/stripe/resources/v2/core/account.rb +5 -5
  99. data/lib/stripe/resources/v2/money_management/received_credit.rb +0 -20
  100. data/lib/stripe/resources/v2/money_management/received_debit.rb +0 -24
  101. data/lib/stripe/resources/v2/payments/off_session_payment.rb +74 -0
  102. data/lib/stripe/resources/webhook_endpoint.rb +1 -2
  103. data/lib/stripe/resources.rb +8 -3
  104. data/lib/stripe/services/account_external_account_service.rb +2 -3
  105. data/lib/stripe/services/account_login_link_service.rb +1 -1
  106. data/lib/stripe/services/account_person_service.rb +1 -2
  107. data/lib/stripe/services/account_service.rb +38 -13
  108. data/lib/stripe/services/account_session_service.rb +49 -24
  109. data/lib/stripe/services/apple_pay_domain_service.rb +1 -2
  110. data/lib/stripe/services/balance_service.rb +1 -1
  111. data/lib/stripe/services/balance_settings_service.rb +2 -2
  112. data/lib/stripe/services/charge_service.rb +76 -8
  113. data/lib/stripe/services/checkout/session_service.rb +14 -6
  114. data/lib/stripe/services/coupon_service.rb +1 -2
  115. data/lib/stripe/services/credit_note_service.rb +7 -8
  116. data/lib/stripe/services/customer_balance_transaction_service.rb +3 -3
  117. data/lib/stripe/services/customer_cash_balance_transaction_service.rb +2 -2
  118. data/lib/stripe/services/customer_payment_source_service.rb +1 -1
  119. data/lib/stripe/services/customer_service.rb +3 -5
  120. data/lib/stripe/services/customer_tax_id_service.rb +1 -2
  121. data/lib/stripe/services/dispute_service.rb +1 -1
  122. data/lib/stripe/services/external_account_service.rb +2 -3
  123. data/lib/stripe/services/file_service.rb +1 -1
  124. data/lib/stripe/services/identity/verification_session_service.rb +5 -5
  125. data/lib/stripe/services/invoice_item_service.rb +1 -2
  126. data/lib/stripe/services/invoice_service.rb +65 -35
  127. data/lib/stripe/services/issuing/authorization_service.rb +4 -4
  128. data/lib/stripe/services/issuing/card_service.rb +1 -1
  129. data/lib/stripe/services/issuing/dispute_service.rb +2 -2
  130. data/lib/stripe/services/order_service.rb +1 -33
  131. data/lib/stripe/services/payment_intent_service.rb +385 -386
  132. data/lib/stripe/services/payment_method_configuration_service.rb +212 -2
  133. data/lib/stripe/services/payment_method_domain_service.rb +1 -1
  134. data/lib/stripe/services/payment_method_service.rb +47 -110
  135. data/lib/stripe/services/payout_service.rb +2 -2
  136. data/lib/stripe/services/plan_service.rb +2 -3
  137. data/lib/stripe/services/price_service.rb +2 -2
  138. data/lib/stripe/services/privacy/redaction_job_service.rb +22 -13
  139. data/lib/stripe/services/privacy/redaction_job_validation_error_service.rb +1 -1
  140. data/lib/stripe/services/product_feature_service.rb +1 -2
  141. data/lib/stripe/services/product_service.rb +2 -41
  142. data/lib/stripe/services/promotion_code_service.rb +1 -1
  143. data/lib/stripe/services/quote_service.rb +1 -1
  144. data/lib/stripe/services/radar/early_fraud_warning_service.rb +1 -1
  145. data/lib/stripe/services/radar/value_list_item_service.rb +1 -2
  146. data/lib/stripe/services/radar/value_list_service.rb +1 -2
  147. data/lib/stripe/services/setup_intent_service.rb +122 -310
  148. data/lib/stripe/services/source_service.rb +1 -1
  149. data/lib/stripe/services/subscription_item_service.rb +26 -0
  150. data/lib/stripe/services/subscription_schedule_service.rb +94 -4
  151. data/lib/stripe/services/subscription_service.rb +103 -33
  152. data/lib/stripe/services/tax/calculation_service.rb +4 -0
  153. data/lib/stripe/services/tax/registration_service.rb +1 -1
  154. data/lib/stripe/services/tax_id_service.rb +1 -2
  155. data/lib/stripe/services/terminal/configuration_service.rb +1 -2
  156. data/lib/stripe/services/terminal/location_service.rb +2 -3
  157. data/lib/stripe/services/terminal/reader_service.rb +17 -3
  158. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +37 -97
  159. data/lib/stripe/services/test_helpers/test_clock_service.rb +1 -2
  160. data/lib/stripe/services/token_service.rb +1 -1
  161. data/lib/stripe/services/transfer_service.rb +1 -1
  162. data/lib/stripe/services/v1_services.rb +1 -2
  163. data/lib/stripe/services/v2/billing/meter_event_session_service.rb +1 -2
  164. data/lib/stripe/services/v2/core/accounts/person_service.rb +2 -4
  165. data/lib/stripe/services/v2/core/event_destination_service.rb +4 -10
  166. data/lib/stripe/services/v2/core/event_service.rb +1 -2
  167. data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +3 -7
  168. data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +2 -4
  169. data/lib/stripe/services/v2/money_management/adjustment_service.rb +1 -2
  170. data/lib/stripe/services/v2/money_management/financial_account_service.rb +1 -2
  171. data/lib/stripe/services/v2/money_management/financial_address_service.rb +1 -1
  172. data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +1 -2
  173. data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +1 -2
  174. data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +2 -4
  175. data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +2 -4
  176. data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +2 -4
  177. data/lib/stripe/services/v2/money_management/payout_method_service.rb +3 -7
  178. data/lib/stripe/services/v2/money_management/received_credit_service.rb +1 -2
  179. data/lib/stripe/services/v2/money_management/received_debit_service.rb +1 -2
  180. data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +1 -2
  181. data/lib/stripe/services/v2/money_management/transaction_service.rb +1 -2
  182. data/lib/stripe/services/v2/payment_service.rb +15 -0
  183. data/lib/stripe/services/v2/payments/off_session_payment_service.rb +138 -0
  184. data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +1 -2
  185. data/lib/stripe/services/v2_services.rb +2 -1
  186. data/lib/stripe/services/webhook_endpoint_service.rb +1 -2
  187. data/lib/stripe/services.rb +2 -3
  188. data/lib/stripe/version.rb +1 -1
  189. data/rbi/stripe.rbi +3903 -4131
  190. metadata +13 -8
  191. data/lib/stripe/resources/billing/meter_error_report.rb +0 -59
  192. data/lib/stripe/resources/gift_cards/card.rb +0 -208
  193. data/lib/stripe/resources/gift_cards/transaction.rb +0 -272
  194. data/lib/stripe/services/gift_cards/card_service.rb +0 -170
  195. data/lib/stripe/services/gift_cards/transaction_service.rb +0 -209
  196. data/lib/stripe/services/gift_cards_service.rb +0 -14
@@ -70,7 +70,7 @@ module Stripe
70
70
  end
71
71
 
72
72
  # Retrieves balance settings for a given connected account.
73
- # Related guide: [Making API calls for connected accounts](https://stripe.com/connect/authentication)
73
+ # Related guide: [Making API calls for connected accounts](https://docs.stripe.com/connect/authentication)
74
74
  def retrieve(params = {}, opts = {})
75
75
  request(
76
76
  method: :get,
@@ -82,7 +82,7 @@ module Stripe
82
82
  end
83
83
 
84
84
  # Updates balance settings for a given connected account.
85
- # Related guide: [Making API calls for connected accounts](https://stripe.com/connect/authentication)
85
+ # Related guide: [Making API calls for connected accounts](https://docs.stripe.com/connect/authentication)
86
86
  def update(params = {}, opts = {})
87
87
  request(
88
88
  method: :post,
@@ -283,11 +283,29 @@ module Stripe
283
283
  end
284
284
  end
285
285
 
286
+ class Distance < Stripe::RequestParams
287
+ # Distance traveled.
288
+ attr_accessor :amount
289
+ # Unit of measurement for the distance traveled. One of `miles` or `kilometers`.
290
+ attr_accessor :unit
291
+
292
+ def initialize(amount: nil, unit: nil)
293
+ @amount = amount
294
+ @unit = unit
295
+ end
296
+ end
297
+
286
298
  class Driver < Stripe::RequestParams
299
+ # Driver's identification number.
300
+ attr_accessor :driver_identification_number
301
+ # Driver's tax number.
302
+ attr_accessor :driver_tax_number
287
303
  # Full name of the person or entity on the car reservation.
288
304
  attr_accessor :name
289
305
 
290
- def initialize(name: nil)
306
+ def initialize(driver_identification_number: nil, driver_tax_number: nil, name: nil)
307
+ @driver_identification_number = driver_identification_number
308
+ @driver_tax_number = driver_tax_number
291
309
  @name = name
292
310
  end
293
311
  end
@@ -371,6 +389,8 @@ module Stripe
371
389
  attr_accessor :days_rented
372
390
  # Delivery details for this purchase.
373
391
  attr_accessor :delivery
392
+ # The details of the distance traveled during the rental period.
393
+ attr_accessor :distance
374
394
  # The details of the passengers in the travel reservation
375
395
  attr_accessor :drivers
376
396
  # List of additional charges being billed.
@@ -381,6 +401,8 @@ module Stripe
381
401
  attr_accessor :pickup_address
382
402
  # Car pick-up time. Measured in seconds since the Unix epoch.
383
403
  attr_accessor :pickup_at
404
+ # Name of the pickup location.
405
+ attr_accessor :pickup_location_name
384
406
  # Rental rate.
385
407
  attr_accessor :rate_amount
386
408
  # The frequency at which the rate amount is applied. One of `day`, `week` or `month`
@@ -391,8 +413,12 @@ module Stripe
391
413
  attr_accessor :return_address
392
414
  # Car return time. Measured in seconds since the Unix epoch.
393
415
  attr_accessor :return_at
416
+ # Name of the return location.
417
+ attr_accessor :return_location_name
394
418
  # Indicates whether the goods or services are tax-exempt or tax is not collected.
395
419
  attr_accessor :tax_exempt
420
+ # The vehicle identification number.
421
+ attr_accessor :vehicle_identification_number
396
422
 
397
423
  def initialize(
398
424
  affiliate: nil,
@@ -404,17 +430,21 @@ module Stripe
404
430
  customer_service_phone_number: nil,
405
431
  days_rented: nil,
406
432
  delivery: nil,
433
+ distance: nil,
407
434
  drivers: nil,
408
435
  extra_charges: nil,
409
436
  no_show: nil,
410
437
  pickup_address: nil,
411
438
  pickup_at: nil,
439
+ pickup_location_name: nil,
412
440
  rate_amount: nil,
413
441
  rate_interval: nil,
414
442
  renter_name: nil,
415
443
  return_address: nil,
416
444
  return_at: nil,
417
- tax_exempt: nil
445
+ return_location_name: nil,
446
+ tax_exempt: nil,
447
+ vehicle_identification_number: nil
418
448
  )
419
449
  @affiliate = affiliate
420
450
  @booking_number = booking_number
@@ -425,17 +455,21 @@ module Stripe
425
455
  @customer_service_phone_number = customer_service_phone_number
426
456
  @days_rented = days_rented
427
457
  @delivery = delivery
458
+ @distance = distance
428
459
  @drivers = drivers
429
460
  @extra_charges = extra_charges
430
461
  @no_show = no_show
431
462
  @pickup_address = pickup_address
432
463
  @pickup_at = pickup_at
464
+ @pickup_location_name = pickup_location_name
433
465
  @rate_amount = rate_amount
434
466
  @rate_interval = rate_interval
435
467
  @renter_name = renter_name
436
468
  @return_address = return_address
437
469
  @return_at = return_at
470
+ @return_location_name = return_location_name
438
471
  @tax_exempt = tax_exempt
472
+ @vehicle_identification_number = vehicle_identification_number
439
473
  end
440
474
  end
441
475
 
@@ -1065,11 +1099,29 @@ module Stripe
1065
1099
  end
1066
1100
  end
1067
1101
 
1102
+ class Distance < Stripe::RequestParams
1103
+ # Distance traveled.
1104
+ attr_accessor :amount
1105
+ # Unit of measurement for the distance traveled. One of `miles` or `kilometers`.
1106
+ attr_accessor :unit
1107
+
1108
+ def initialize(amount: nil, unit: nil)
1109
+ @amount = amount
1110
+ @unit = unit
1111
+ end
1112
+ end
1113
+
1068
1114
  class Driver < Stripe::RequestParams
1115
+ # Driver's identification number.
1116
+ attr_accessor :driver_identification_number
1117
+ # Driver's tax number.
1118
+ attr_accessor :driver_tax_number
1069
1119
  # Full name of the person or entity on the car reservation.
1070
1120
  attr_accessor :name
1071
1121
 
1072
- def initialize(name: nil)
1122
+ def initialize(driver_identification_number: nil, driver_tax_number: nil, name: nil)
1123
+ @driver_identification_number = driver_identification_number
1124
+ @driver_tax_number = driver_tax_number
1073
1125
  @name = name
1074
1126
  end
1075
1127
  end
@@ -1153,6 +1205,8 @@ module Stripe
1153
1205
  attr_accessor :days_rented
1154
1206
  # Delivery details for this purchase.
1155
1207
  attr_accessor :delivery
1208
+ # The details of the distance traveled during the rental period.
1209
+ attr_accessor :distance
1156
1210
  # The details of the passengers in the travel reservation
1157
1211
  attr_accessor :drivers
1158
1212
  # List of additional charges being billed.
@@ -1163,6 +1217,8 @@ module Stripe
1163
1217
  attr_accessor :pickup_address
1164
1218
  # Car pick-up time. Measured in seconds since the Unix epoch.
1165
1219
  attr_accessor :pickup_at
1220
+ # Name of the pickup location.
1221
+ attr_accessor :pickup_location_name
1166
1222
  # Rental rate.
1167
1223
  attr_accessor :rate_amount
1168
1224
  # The frequency at which the rate amount is applied. One of `day`, `week` or `month`
@@ -1173,8 +1229,12 @@ module Stripe
1173
1229
  attr_accessor :return_address
1174
1230
  # Car return time. Measured in seconds since the Unix epoch.
1175
1231
  attr_accessor :return_at
1232
+ # Name of the return location.
1233
+ attr_accessor :return_location_name
1176
1234
  # Indicates whether the goods or services are tax-exempt or tax is not collected.
1177
1235
  attr_accessor :tax_exempt
1236
+ # The vehicle identification number.
1237
+ attr_accessor :vehicle_identification_number
1178
1238
 
1179
1239
  def initialize(
1180
1240
  affiliate: nil,
@@ -1186,17 +1246,21 @@ module Stripe
1186
1246
  customer_service_phone_number: nil,
1187
1247
  days_rented: nil,
1188
1248
  delivery: nil,
1249
+ distance: nil,
1189
1250
  drivers: nil,
1190
1251
  extra_charges: nil,
1191
1252
  no_show: nil,
1192
1253
  pickup_address: nil,
1193
1254
  pickup_at: nil,
1255
+ pickup_location_name: nil,
1194
1256
  rate_amount: nil,
1195
1257
  rate_interval: nil,
1196
1258
  renter_name: nil,
1197
1259
  return_address: nil,
1198
1260
  return_at: nil,
1199
- tax_exempt: nil
1261
+ return_location_name: nil,
1262
+ tax_exempt: nil,
1263
+ vehicle_identification_number: nil
1200
1264
  )
1201
1265
  @affiliate = affiliate
1202
1266
  @booking_number = booking_number
@@ -1207,17 +1271,21 @@ module Stripe
1207
1271
  @customer_service_phone_number = customer_service_phone_number
1208
1272
  @days_rented = days_rented
1209
1273
  @delivery = delivery
1274
+ @distance = distance
1210
1275
  @drivers = drivers
1211
1276
  @extra_charges = extra_charges
1212
1277
  @no_show = no_show
1213
1278
  @pickup_address = pickup_address
1214
1279
  @pickup_at = pickup_at
1280
+ @pickup_location_name = pickup_location_name
1215
1281
  @rate_amount = rate_amount
1216
1282
  @rate_interval = rate_interval
1217
1283
  @renter_name = renter_name
1218
1284
  @return_address = return_address
1219
1285
  @return_at = return_at
1286
+ @return_location_name = return_location_name
1220
1287
  @tax_exempt = tax_exempt
1288
+ @vehicle_identification_number = vehicle_identification_number
1221
1289
  end
1222
1290
  end
1223
1291
 
@@ -1757,9 +1825,9 @@ module Stripe
1757
1825
 
1758
1826
  # Capture the payment of an existing, uncaptured charge that was created with the capture option set to false.
1759
1827
  #
1760
- # Uncaptured payments expire a set number of days after they are created ([7 by default](https://stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail.
1828
+ # Uncaptured payments expire a set number of days after they are created ([7 by default](https://docs.stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail.
1761
1829
  #
1762
- # Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://stripe.com/docs/api/payment_intents/capture).
1830
+ # Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://docs.stripe.com/docs/api/payment_intents/capture).
1763
1831
  def capture(charge, params = {}, opts = {})
1764
1832
  request(
1765
1833
  method: :post,
@@ -1770,7 +1838,7 @@ module Stripe
1770
1838
  )
1771
1839
  end
1772
1840
 
1773
- # This method is no longer recommended—use the [Payment Intents API](https://stripe.com/docs/api/payment_intents)
1841
+ # This method is no longer recommended—use the [Payment Intents API](https://docs.stripe.com/docs/api/payment_intents)
1774
1842
  # to initiate a new payment instead. Confirmation of the PaymentIntent creates the Charge
1775
1843
  # object used to request payment.
1776
1844
  def create(params = {}, opts = {})
@@ -1793,7 +1861,7 @@ module Stripe
1793
1861
  )
1794
1862
  end
1795
1863
 
1796
- # Search for charges you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language).
1864
+ # Search for charges you've previously created using Stripe's [Search Query Language](https://docs.stripe.com/docs/search#search-query-language).
1797
1865
  # Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating
1798
1866
  # conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up
1799
1867
  # to an hour behind during outages. Search functionality is not available to merchants in India.
@@ -1322,8 +1322,7 @@ module Stripe
1322
1322
  end
1323
1323
  end
1324
1324
 
1325
- class PayByBank < Stripe::RequestParams
1326
- end
1325
+ class PayByBank < Stripe::RequestParams; end
1327
1326
 
1328
1327
  class Payco < Stripe::RequestParams
1329
1328
  # Controls when the funds will be captured from the customer's account.
@@ -1812,11 +1811,18 @@ module Stripe
1812
1811
  class SavedPaymentMethodOptions < Stripe::RequestParams
1813
1812
  # Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with ’allow_redisplay: ‘always’ are shown in Checkout.
1814
1813
  attr_accessor :allow_redisplay_filters
1814
+ # Enable customers to choose if they wish to remove their saved payment methods. Disabled by default.
1815
+ attr_accessor :payment_method_remove
1815
1816
  # Enable customers to choose if they wish to save their payment method for future use. Disabled by default.
1816
1817
  attr_accessor :payment_method_save
1817
1818
 
1818
- def initialize(allow_redisplay_filters: nil, payment_method_save: nil)
1819
+ def initialize(
1820
+ allow_redisplay_filters: nil,
1821
+ payment_method_remove: nil,
1822
+ payment_method_save: nil
1823
+ )
1819
1824
  @allow_redisplay_filters = allow_redisplay_filters
1825
+ @payment_method_remove = payment_method_remove
1820
1826
  @payment_method_save = payment_method_save
1821
1827
  end
1822
1828
  end
@@ -2005,7 +2011,7 @@ module Stripe
2005
2011
  attr_accessor :application_fee_percent
2006
2012
  # A future timestamp to anchor the subscription's billing cycle for new subscriptions.
2007
2013
  attr_accessor :billing_cycle_anchor
2008
- # Configure billing_mode in each subscription to opt in improved credit proration behavior.
2014
+ # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
2009
2015
  attr_accessor :billing_mode
2010
2016
  # The tax rates that will apply to any subscription item that does not have
2011
2017
  # `tax_rates` set. Invoices created will have their `default_tax_rates` populated
@@ -2495,7 +2501,7 @@ module Stripe
2495
2501
  attr_accessor :price
2496
2502
  # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required when creating a new line item.
2497
2503
  attr_accessor :price_data
2498
- # The quantity of the line item being purchased.
2504
+ # The quantity of the line item being purchased. Quantity should not be defined when `recurring.usage_type=metered`.
2499
2505
  attr_accessor :quantity
2500
2506
  # The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item.
2501
2507
  attr_accessor :tax_rates
@@ -2636,7 +2642,7 @@ module Stripe
2636
2642
  #
2637
2643
  # To update an existing line item, specify its `id` along with the new values of the fields to update.
2638
2644
  #
2639
- # To add a new line item, specify a `price` and `quantity`.
2645
+ # To add a new line item, specify one of `price` or `price_data` and `quantity`.
2640
2646
  #
2641
2647
  # To remove an existing line item, omit the line item's ID from the retransmitted array.
2642
2648
  #
@@ -2718,6 +2724,8 @@ module Stripe
2718
2724
  end
2719
2725
 
2720
2726
  # Updates a Checkout Session object.
2727
+ #
2728
+ # Related guide: [Dynamically update Checkout](https://docs.stripe.com/payments/checkout/dynamic-updates)
2721
2729
  def update(session, params = {}, opts = {})
2722
2730
  request(
2723
2731
  method: :post,
@@ -3,8 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  class CouponService < StripeService
6
- class DeleteParams < Stripe::RequestParams
7
- end
6
+ class DeleteParams < Stripe::RequestParams; end
8
7
 
9
8
  class RetrieveParams < Stripe::RequestParams
10
9
  # Specifies which fields in the response should be expanded.
@@ -380,20 +380,19 @@ module Stripe
380
380
  end
381
381
  end
382
382
 
383
- # Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces
384
- # its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result
385
- # in any combination of the following:
383
+ # Issue a credit note to adjust the amount of a finalized invoice. A credit note will first reduce the invoice's amount_remaining (and amount_due), but not below zero.
384
+ # This amount is indicated by the credit note's pre_payment_amount. The excess amount is indicated by post_payment_amount, and it can result in any combination of the following:
386
385
  #
387
386
  #
388
- # Refund: create a new refund (using refund_amount) or link an existing refund (using refund).
387
+ # Refunds: create a new refund (using refund_amount) or link existing refunds (using refunds).
389
388
  # Customer balance credit: credit the customer's balance (using credit_amount) which will be automatically applied to their next invoice when it's finalized.
390
389
  # Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using out_of_band_amount).
391
390
  #
392
391
  #
393
- # For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total.
392
+ # The sum of refunds, customer balance credits, and outside of Stripe credits must equal the post_payment_amount.
394
393
  #
395
- # You may issue multiple credit notes for an invoice. Each credit note will increment the invoice's pre_payment_credit_notes_amount
396
- # or post_payment_credit_notes_amount depending on its status at the time of credit note creation.
394
+ # You may issue multiple credit notes for an invoice. Each credit note may increment the invoice's pre_payment_credit_notes_amount,
395
+ # post_payment_credit_notes_amount, or both, depending on the invoice's amount_remaining at the time of credit note creation.
397
396
  def create(params = {}, opts = {})
398
397
  request(
399
398
  method: :post,
@@ -448,7 +447,7 @@ module Stripe
448
447
  )
449
448
  end
450
449
 
451
- # Marks a credit note as void. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding).
450
+ # Marks a credit note as void. Learn more about [voiding credit notes](https://docs.stripe.com/docs/billing/invoices/credit-notes#voiding).
452
451
  def void_credit_note(id, params = {}, opts = {})
453
452
  request(
454
453
  method: :post,
@@ -66,7 +66,7 @@ module Stripe
66
66
  end
67
67
  end
68
68
 
69
- # Creates an immutable transaction that updates the customer's credit [balance](https://stripe.com/docs/billing/customer/balance).
69
+ # Creates an immutable transaction that updates the customer's credit [balance](https://docs.stripe.com/docs/billing/customer/balance).
70
70
  def create(customer, params = {}, opts = {})
71
71
  request(
72
72
  method: :post,
@@ -77,7 +77,7 @@ module Stripe
77
77
  )
78
78
  end
79
79
 
80
- # Returns a list of transactions that updated the customer's [balances](https://stripe.com/docs/billing/customer/balance).
80
+ # Returns a list of transactions that updated the customer's [balances](https://docs.stripe.com/docs/billing/customer/balance).
81
81
  def list(customer, params = {}, opts = {})
82
82
  request(
83
83
  method: :get,
@@ -88,7 +88,7 @@ module Stripe
88
88
  )
89
89
  end
90
90
 
91
- # Retrieves a specific customer balance transaction that updated the customer's [balances](https://stripe.com/docs/billing/customer/balance).
91
+ # Retrieves a specific customer balance transaction that updated the customer's [balances](https://docs.stripe.com/docs/billing/customer/balance).
92
92
  def retrieve(customer, transaction, params = {}, opts = {})
93
93
  request(
94
94
  method: :get,
@@ -30,7 +30,7 @@ module Stripe
30
30
  end
31
31
  end
32
32
 
33
- # Returns a list of transactions that modified the customer's [cash balance](https://stripe.com/docs/payments/customer-balance).
33
+ # Returns a list of transactions that modified the customer's [cash balance](https://docs.stripe.com/docs/payments/customer-balance).
34
34
  def list(customer, params = {}, opts = {})
35
35
  request(
36
36
  method: :get,
@@ -41,7 +41,7 @@ module Stripe
41
41
  )
42
42
  end
43
43
 
44
- # Retrieves a specific cash balance transaction, which updated the customer's [cash balance](https://stripe.com/docs/payments/customer-balance).
44
+ # Retrieves a specific cash balance transaction, which updated the customer's [cash balance](https://docs.stripe.com/docs/payments/customer-balance).
45
45
  def retrieve(customer, transaction, params = {}, opts = {})
46
46
  request(
47
47
  method: :get,
@@ -186,7 +186,7 @@ module Stripe
186
186
  #
187
187
  # If the card's owner has no default card, then the new card will become the default.
188
188
  # However, if the owner already has a default, then it will not change.
189
- # To change the default, you should [update the customer](https://stripe.com/docs/api#update_customer) to have a new default_source.
189
+ # To change the default, you should [update the customer](https://docs.stripe.com/docs/api#update_customer) to have a new default_source.
190
190
  def create(customer, params = {}, opts = {})
191
191
  request(
192
192
  method: :post,
@@ -16,8 +16,7 @@ module Stripe
16
16
  @funding_instructions = Stripe::CustomerFundingInstructionsService.new(@requestor)
17
17
  end
18
18
 
19
- class DeleteParams < Stripe::RequestParams
20
- end
19
+ class DeleteParams < Stripe::RequestParams; end
21
20
 
22
21
  class RetrieveParams < Stripe::RequestParams
23
22
  # Specifies which fields in the response should be expanded.
@@ -266,8 +265,7 @@ module Stripe
266
265
  end
267
266
  end
268
267
 
269
- class DeleteDiscountParams < Stripe::RequestParams
270
- end
268
+ class DeleteDiscountParams < Stripe::RequestParams; end
271
269
 
272
270
  class ListParams < Stripe::RequestParams
273
271
  class Created < Stripe::RequestParams
@@ -636,7 +634,7 @@ module Stripe
636
634
  )
637
635
  end
638
636
 
639
- # Search for customers you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language).
637
+ # Search for customers you've previously created using Stripe's [Search Query Language](https://docs.stripe.com/docs/search#search-query-language).
640
638
  # Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating
641
639
  # conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up
642
640
  # to an hour behind during outages. Search functionality is not available to merchants in India.
@@ -3,8 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  class CustomerTaxIdService < StripeService
6
- class DeleteParams < Stripe::RequestParams
7
- end
6
+ class DeleteParams < Stripe::RequestParams; end
8
7
 
9
8
  class RetrieveParams < Stripe::RequestParams
10
9
  # Specifies which fields in the response should be expanded.
@@ -408,7 +408,7 @@ module Stripe
408
408
 
409
409
  # When you get a dispute, contacting your customer is always the best first step. If that doesn't work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your [dashboard](https://dashboard.stripe.com/disputes), but if you prefer, you can use the API to submit evidence programmatically.
410
410
  #
411
- # Depending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our [guide to dispute types](https://stripe.com/docs/disputes/categories).
411
+ # Depending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our [guide to dispute types](https://docs.stripe.com/docs/disputes/categories).
412
412
  def update(dispute, params = {}, opts = {})
413
413
  request(
414
414
  method: :post,
@@ -3,8 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  class ExternalAccountService < StripeService
6
- class DeleteParams < Stripe::RequestParams
7
- end
6
+ class DeleteParams < Stripe::RequestParams; end
8
7
 
9
8
  class RetrieveParams < Stripe::RequestParams
10
9
  # Specifies which fields in the response should be expanded.
@@ -301,7 +300,7 @@ module Stripe
301
300
  # a connected account and optionally sets it as the default for its currency. Other bank account
302
301
  # details are not editable by design.
303
302
  #
304
- # You can only update bank accounts when [account.controller.requirement_collection is application, which includes <a href="/connect/custom-accounts">Custom accounts](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection).
303
+ # You can only update bank accounts when [account.controller.requirement_collection is application, which includes <a href="/connect/custom-accounts">Custom accounts](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection).
305
304
  #
306
305
  # You can re-enable a disabled bank account by performing an update call without providing any
307
306
  # arguments or changes.
@@ -110,7 +110,7 @@ module Stripe
110
110
  request(method: :get, path: "/v1/files", params: params, opts: opts, base_address: :api)
111
111
  end
112
112
 
113
- # Retrieves the details of an existing file object. After you supply a unique file ID, Stripe returns the corresponding file object. Learn how to [access file contents](https://stripe.com/docs/file-upload#download-file-contents).
113
+ # Retrieves the details of an existing file object. After you supply a unique file ID, Stripe returns the corresponding file object. Learn how to [access file contents](https://docs.stripe.com/docs/file-upload#download-file-contents).
114
114
  def retrieve(file, params = {}, opts = {})
115
115
  request(
116
116
  method: :get,
@@ -243,9 +243,9 @@ module Stripe
243
243
  end
244
244
  end
245
245
 
246
- # A VerificationSession object can be canceled when it is in requires_input [status](https://stripe.com/docs/identity/how-sessions-work).
246
+ # A VerificationSession object can be canceled when it is in requires_input [status](https://docs.stripe.com/docs/identity/how-sessions-work).
247
247
  #
248
- # Once canceled, future submission attempts are disabled. This cannot be undone. [Learn more](https://stripe.com/docs/identity/verification-sessions#cancel).
248
+ # Once canceled, future submission attempts are disabled. This cannot be undone. [Learn more](https://docs.stripe.com/docs/identity/verification-sessions#cancel).
249
249
  def cancel(session, params = {}, opts = {})
250
250
  request(
251
251
  method: :post,
@@ -262,7 +262,7 @@ module Stripe
262
262
  #
263
263
  # If your API key is in test mode, verification checks won't actually process, though everything else will occur as if in live mode.
264
264
  #
265
- # Related guide: [Verify your users' identity documents](https://stripe.com/docs/identity/verify-identity-documents)
265
+ # Related guide: [Verify your users' identity documents](https://docs.stripe.com/docs/identity/verify-identity-documents)
266
266
  def create(params = {}, opts = {})
267
267
  request(
268
268
  method: :post,
@@ -289,7 +289,7 @@ module Stripe
289
289
  # request logs, etc.
290
290
  #
291
291
  # A VerificationSession object can be redacted when it is in requires_input or verified
292
- # [status](https://stripe.com/docs/identity/how-sessions-work). Redacting a VerificationSession in requires_action
292
+ # [status](https://docs.stripe.com/docs/identity/how-sessions-work). Redacting a VerificationSession in requires_action
293
293
  # state will automatically cancel it.
294
294
  #
295
295
  # The redaction process may take up to four days. When the redaction process is in progress, the
@@ -302,7 +302,7 @@ module Stripe
302
302
  # placeholder. The metadata field will also be erased. Redacted objects cannot be updated or
303
303
  # used for any purpose.
304
304
  #
305
- # [Learn more](https://stripe.com/docs/identity/verification-sessions#redact).
305
+ # [Learn more](https://docs.stripe.com/docs/identity/verification-sessions#redact).
306
306
  def redact(session, params = {}, opts = {})
307
307
  request(
308
308
  method: :post,
@@ -3,8 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  class InvoiceItemService < StripeService
6
- class DeleteParams < Stripe::RequestParams
7
- end
6
+ class DeleteParams < Stripe::RequestParams; end
8
7
 
9
8
  class RetrieveParams < Stripe::RequestParams
10
9
  # Specifies which fields in the response should be expanded.