stripe 15.1.0 → 15.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +34 -6
  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/resources/account.rb +47 -20
  9. data/lib/stripe/resources/account_session.rb +111 -7
  10. data/lib/stripe/resources/apple_pay_domain.rb +1 -2
  11. data/lib/stripe/resources/balance.rb +42 -0
  12. data/lib/stripe/resources/balance_transaction.rb +2 -0
  13. data/lib/stripe/resources/bank_account.rb +2 -2
  14. data/lib/stripe/resources/billing_portal/session.rb +1 -1
  15. data/lib/stripe/resources/capability.rb +1 -1
  16. data/lib/stripe/resources/charge.rb +13 -5
  17. data/lib/stripe/resources/checkout/session.rb +20 -4
  18. data/lib/stripe/resources/confirmation_token.rb +33 -87
  19. data/lib/stripe/resources/country_spec.rb +1 -1
  20. data/lib/stripe/resources/coupon.rb +1 -2
  21. data/lib/stripe/resources/credit_note.rb +12 -9
  22. data/lib/stripe/resources/customer.rb +2 -4
  23. data/lib/stripe/resources/customer_session.rb +3 -3
  24. data/lib/stripe/resources/dispute.rb +2 -2
  25. data/lib/stripe/resources/event.rb +1 -1
  26. data/lib/stripe/resources/file.rb +1 -1
  27. data/lib/stripe/resources/identity/verification_report.rb +6 -0
  28. data/lib/stripe/resources/identity/verification_session.rb +17 -11
  29. data/lib/stripe/resources/invoice.rb +114 -27
  30. data/lib/stripe/resources/invoice_item.rb +2 -3
  31. data/lib/stripe/resources/invoice_line_item.rb +1 -1
  32. data/lib/stripe/resources/invoice_payment.rb +9 -2
  33. data/lib/stripe/resources/issuing/authorization.rb +8 -8
  34. data/lib/stripe/resources/issuing/card.rb +1 -1
  35. data/lib/stripe/resources/issuing/dispute.rb +3 -3
  36. data/lib/stripe/resources/payment_intent.rb +196 -302
  37. data/lib/stripe/resources/payment_method.rb +46 -103
  38. data/lib/stripe/resources/payment_method_configuration.rb +297 -2
  39. data/lib/stripe/resources/payment_method_domain.rb +2 -2
  40. data/lib/stripe/resources/payout.rb +4 -4
  41. data/lib/stripe/resources/person.rb +2 -2
  42. data/lib/stripe/resources/plan.rb +2 -3
  43. data/lib/stripe/resources/price.rb +1 -1
  44. data/lib/stripe/resources/product.rb +1 -2
  45. data/lib/stripe/resources/radar/value_list.rb +1 -2
  46. data/lib/stripe/resources/radar/value_list_item.rb +1 -2
  47. data/lib/stripe/resources/refund.rb +6 -1
  48. data/lib/stripe/resources/reversal.rb +1 -1
  49. data/lib/stripe/resources/review.rb +1 -1
  50. data/lib/stripe/resources/setup_intent.rb +111 -281
  51. data/lib/stripe/resources/source.rb +1 -1
  52. data/lib/stripe/resources/subscription.rb +89 -29
  53. data/lib/stripe/resources/subscription_item.rb +33 -0
  54. data/lib/stripe/resources/subscription_schedule.rb +119 -4
  55. data/lib/stripe/resources/tax/calculation.rb +4 -0
  56. data/lib/stripe/resources/tax/calculation_line_item.rb +2 -0
  57. data/lib/stripe/resources/tax/registration.rb +1 -1
  58. data/lib/stripe/resources/tax_id.rb +1 -2
  59. data/lib/stripe/resources/tax_rate.rb +2 -2
  60. data/lib/stripe/resources/terminal/configuration.rb +1 -2
  61. data/lib/stripe/resources/terminal/location.rb +2 -3
  62. data/lib/stripe/resources/terminal/reader.rb +275 -3
  63. data/lib/stripe/resources/test_helpers/test_clock.rb +1 -2
  64. data/lib/stripe/resources/token.rb +2 -2
  65. data/lib/stripe/resources/transfer.rb +1 -1
  66. data/lib/stripe/resources/webhook_endpoint.rb +1 -2
  67. data/lib/stripe/services/account_external_account_service.rb +2 -3
  68. data/lib/stripe/services/account_login_link_service.rb +1 -1
  69. data/lib/stripe/services/account_person_service.rb +1 -2
  70. data/lib/stripe/services/account_service.rb +38 -13
  71. data/lib/stripe/services/account_session_service.rb +75 -7
  72. data/lib/stripe/services/apple_pay_domain_service.rb +1 -2
  73. data/lib/stripe/services/balance_service.rb +1 -1
  74. data/lib/stripe/services/charge_service.rb +4 -4
  75. data/lib/stripe/services/checkout/session_service.rb +11 -3
  76. data/lib/stripe/services/coupon_service.rb +1 -2
  77. data/lib/stripe/services/credit_note_service.rb +7 -8
  78. data/lib/stripe/services/customer_balance_transaction_service.rb +3 -3
  79. data/lib/stripe/services/customer_cash_balance_transaction_service.rb +2 -2
  80. data/lib/stripe/services/customer_payment_source_service.rb +1 -1
  81. data/lib/stripe/services/customer_service.rb +3 -5
  82. data/lib/stripe/services/customer_tax_id_service.rb +1 -2
  83. data/lib/stripe/services/dispute_service.rb +1 -1
  84. data/lib/stripe/services/file_service.rb +1 -1
  85. data/lib/stripe/services/identity/verification_session_service.rb +5 -5
  86. data/lib/stripe/services/invoice_item_service.rb +1 -2
  87. data/lib/stripe/services/invoice_service.rb +92 -23
  88. data/lib/stripe/services/issuing/authorization_service.rb +4 -4
  89. data/lib/stripe/services/issuing/card_service.rb +1 -1
  90. data/lib/stripe/services/issuing/dispute_service.rb +2 -2
  91. data/lib/stripe/services/payment_intent_service.rb +176 -292
  92. data/lib/stripe/services/payment_method_configuration_service.rb +212 -2
  93. data/lib/stripe/services/payment_method_domain_service.rb +1 -1
  94. data/lib/stripe/services/payment_method_service.rb +43 -100
  95. data/lib/stripe/services/payout_service.rb +2 -2
  96. data/lib/stripe/services/plan_service.rb +2 -3
  97. data/lib/stripe/services/price_service.rb +2 -2
  98. data/lib/stripe/services/product_feature_service.rb +1 -2
  99. data/lib/stripe/services/product_service.rb +2 -3
  100. data/lib/stripe/services/promotion_code_service.rb +1 -1
  101. data/lib/stripe/services/radar/early_fraud_warning_service.rb +1 -1
  102. data/lib/stripe/services/radar/value_list_item_service.rb +1 -2
  103. data/lib/stripe/services/radar/value_list_service.rb +1 -2
  104. data/lib/stripe/services/setup_intent_service.rb +110 -280
  105. data/lib/stripe/services/source_service.rb +1 -1
  106. data/lib/stripe/services/subscription_item_service.rb +26 -0
  107. data/lib/stripe/services/subscription_schedule_service.rb +93 -3
  108. data/lib/stripe/services/subscription_service.rb +77 -26
  109. data/lib/stripe/services/tax/calculation_service.rb +4 -0
  110. data/lib/stripe/services/tax/registration_service.rb +1 -1
  111. data/lib/stripe/services/tax_id_service.rb +1 -2
  112. data/lib/stripe/services/terminal/configuration_service.rb +1 -2
  113. data/lib/stripe/services/terminal/location_service.rb +2 -3
  114. data/lib/stripe/services/terminal/reader_service.rb +106 -2
  115. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +33 -87
  116. data/lib/stripe/services/test_helpers/terminal/reader_service.rb +43 -0
  117. data/lib/stripe/services/test_helpers/test_clock_service.rb +1 -2
  118. data/lib/stripe/services/token_service.rb +1 -1
  119. data/lib/stripe/services/transfer_service.rb +1 -1
  120. data/lib/stripe/services/v2/billing/meter_event_session_service.rb +1 -2
  121. data/lib/stripe/services/v2/core/event_destination_service.rb +4 -10
  122. data/lib/stripe/services/v2/core/event_service.rb +1 -2
  123. data/lib/stripe/services/webhook_endpoint_service.rb +1 -2
  124. data/lib/stripe/version.rb +1 -1
  125. data/rbi/stripe/resources/account.rbi +46 -23
  126. data/rbi/stripe/resources/account_session.rbi +131 -12
  127. data/rbi/stripe/resources/apple_pay_domain.rbi +1 -3
  128. data/rbi/stripe/resources/balance.rbi +55 -0
  129. data/rbi/stripe/resources/balance_transaction.rbi +3 -0
  130. data/rbi/stripe/resources/bank_account.rbi +2 -2
  131. data/rbi/stripe/resources/billing/alert.rbi +2 -2
  132. data/rbi/stripe/resources/billing_portal/session.rbi +1 -1
  133. data/rbi/stripe/resources/capability.rbi +1 -1
  134. data/rbi/stripe/resources/charge.rbi +17 -5
  135. data/rbi/stripe/resources/checkout/session.rbi +22 -6
  136. data/rbi/stripe/resources/confirmation_token.rbi +33 -99
  137. data/rbi/stripe/resources/country_spec.rbi +1 -1
  138. data/rbi/stripe/resources/coupon.rbi +1 -3
  139. data/rbi/stripe/resources/credit_note.rbi +14 -9
  140. data/rbi/stripe/resources/customer.rbi +2 -6
  141. data/rbi/stripe/resources/customer_session.rbi +3 -3
  142. data/rbi/stripe/resources/dispute.rbi +2 -2
  143. data/rbi/stripe/resources/event.rbi +1 -1
  144. data/rbi/stripe/resources/file.rbi +1 -1
  145. data/rbi/stripe/resources/identity/verification_report.rbi +9 -0
  146. data/rbi/stripe/resources/identity/verification_session.rbi +20 -11
  147. data/rbi/stripe/resources/invoice.rbi +109 -33
  148. data/rbi/stripe/resources/invoice_item.rbi +2 -4
  149. data/rbi/stripe/resources/invoice_line_item.rbi +1 -1
  150. data/rbi/stripe/resources/invoice_payment.rbi +9 -2
  151. data/rbi/stripe/resources/issuing/authorization.rbi +8 -8
  152. data/rbi/stripe/resources/issuing/card.rbi +1 -1
  153. data/rbi/stripe/resources/issuing/dispute.rbi +3 -3
  154. data/rbi/stripe/resources/payment_intent.rbi +201 -349
  155. data/rbi/stripe/resources/payment_method.rbi +46 -116
  156. data/rbi/stripe/resources/payment_method_configuration.rbi +334 -4
  157. data/rbi/stripe/resources/payment_method_domain.rbi +2 -2
  158. data/rbi/stripe/resources/payout.rbi +4 -4
  159. data/rbi/stripe/resources/person.rbi +2 -2
  160. data/rbi/stripe/resources/plan.rbi +2 -4
  161. data/rbi/stripe/resources/price.rbi +1 -1
  162. data/rbi/stripe/resources/product.rbi +1 -3
  163. data/rbi/stripe/resources/radar/value_list.rbi +1 -3
  164. data/rbi/stripe/resources/radar/value_list_item.rbi +1 -3
  165. data/rbi/stripe/resources/refund.rbi +5 -1
  166. data/rbi/stripe/resources/reversal.rbi +1 -1
  167. data/rbi/stripe/resources/review.rbi +1 -1
  168. data/rbi/stripe/resources/setup_intent.rbi +111 -325
  169. data/rbi/stripe/resources/source.rbi +1 -1
  170. data/rbi/stripe/resources/subscription.rbi +99 -36
  171. data/rbi/stripe/resources/subscription_item.rbi +36 -2
  172. data/rbi/stripe/resources/subscription_schedule.rbi +138 -10
  173. data/rbi/stripe/resources/tax/calculation.rbi +5 -1
  174. data/rbi/stripe/resources/tax/calculation_line_item.rbi +3 -0
  175. data/rbi/stripe/resources/tax/registration.rbi +1 -1
  176. data/rbi/stripe/resources/tax_id.rbi +1 -3
  177. data/rbi/stripe/resources/tax_rate.rbi +2 -2
  178. data/rbi/stripe/resources/terminal/configuration.rbi +1 -3
  179. data/rbi/stripe/resources/terminal/location.rbi +2 -4
  180. data/rbi/stripe/resources/terminal/reader.rbi +265 -5
  181. data/rbi/stripe/resources/test_helpers/test_clock.rbi +1 -3
  182. data/rbi/stripe/resources/token.rbi +2 -2
  183. data/rbi/stripe/resources/transfer.rbi +1 -1
  184. data/rbi/stripe/resources/webhook_endpoint.rbi +1 -3
  185. data/rbi/stripe/services/account_external_account_service.rbi +2 -4
  186. data/rbi/stripe/services/account_login_link_service.rbi +1 -1
  187. data/rbi/stripe/services/account_person_service.rbi +1 -3
  188. data/rbi/stripe/services/account_service.rbi +40 -16
  189. data/rbi/stripe/services/account_session_service.rbi +86 -12
  190. data/rbi/stripe/services/apple_pay_domain_service.rbi +1 -3
  191. data/rbi/stripe/services/balance_service.rbi +1 -1
  192. data/rbi/stripe/services/billing/alert_service.rbi +2 -2
  193. data/rbi/stripe/services/charge_service.rbi +4 -4
  194. data/rbi/stripe/services/checkout/session_service.rbi +12 -5
  195. data/rbi/stripe/services/coupon_service.rbi +1 -3
  196. data/rbi/stripe/services/credit_note_service.rbi +7 -8
  197. data/rbi/stripe/services/customer_balance_transaction_service.rbi +3 -3
  198. data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +2 -2
  199. data/rbi/stripe/services/customer_payment_source_service.rbi +1 -1
  200. data/rbi/stripe/services/customer_service.rbi +3 -7
  201. data/rbi/stripe/services/customer_tax_id_service.rbi +1 -3
  202. data/rbi/stripe/services/dispute_service.rbi +1 -1
  203. data/rbi/stripe/services/file_service.rbi +1 -1
  204. data/rbi/stripe/services/identity/verification_session_service.rbi +5 -5
  205. data/rbi/stripe/services/invoice_item_service.rbi +1 -3
  206. data/rbi/stripe/services/invoice_service.rbi +90 -29
  207. data/rbi/stripe/services/issuing/authorization_service.rbi +4 -4
  208. data/rbi/stripe/services/issuing/card_service.rbi +1 -1
  209. data/rbi/stripe/services/issuing/dispute_service.rbi +2 -2
  210. data/rbi/stripe/services/payment_intent_service.rbi +179 -339
  211. data/rbi/stripe/services/payment_method_configuration_service.rbi +236 -4
  212. data/rbi/stripe/services/payment_method_domain_service.rbi +1 -1
  213. data/rbi/stripe/services/payment_method_service.rbi +43 -113
  214. data/rbi/stripe/services/payout_service.rbi +2 -2
  215. data/rbi/stripe/services/plan_service.rbi +2 -4
  216. data/rbi/stripe/services/price_service.rbi +2 -2
  217. data/rbi/stripe/services/product_feature_service.rbi +1 -3
  218. data/rbi/stripe/services/product_service.rbi +2 -4
  219. data/rbi/stripe/services/promotion_code_service.rbi +1 -1
  220. data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +1 -1
  221. data/rbi/stripe/services/radar/value_list_item_service.rbi +1 -3
  222. data/rbi/stripe/services/radar/value_list_service.rbi +1 -3
  223. data/rbi/stripe/services/setup_intent_service.rbi +110 -324
  224. data/rbi/stripe/services/source_service.rbi +1 -1
  225. data/rbi/stripe/services/subscription_item_service.rbi +28 -2
  226. data/rbi/stripe/services/subscription_schedule_service.rbi +107 -9
  227. data/rbi/stripe/services/subscription_service.rbi +85 -33
  228. data/rbi/stripe/services/tax/calculation_service.rbi +5 -1
  229. data/rbi/stripe/services/tax/registration_service.rbi +1 -1
  230. data/rbi/stripe/services/tax_id_service.rbi +1 -3
  231. data/rbi/stripe/services/terminal/configuration_service.rbi +1 -3
  232. data/rbi/stripe/services/terminal/location_service.rbi +2 -4
  233. data/rbi/stripe/services/terminal/reader_service.rbi +115 -4
  234. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +33 -99
  235. data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +31 -0
  236. data/rbi/stripe/services/test_helpers/test_clock_service.rbi +1 -3
  237. data/rbi/stripe/services/token_service.rbi +1 -1
  238. data/rbi/stripe/services/transfer_service.rbi +1 -1
  239. data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +1 -3
  240. data/rbi/stripe/services/v2/core/event_destination_service.rbi +4 -12
  241. data/rbi/stripe/services/v2/core/event_service.rbi +1 -3
  242. data/rbi/stripe/services/webhook_endpoint_service.rbi +1 -3
  243. metadata +3 -2
@@ -26,7 +26,7 @@ module Stripe
26
26
  # Stripe applies any customer credit on the account before determining the
27
27
  # amount due for the invoice (i.e., the amount that will be actually
28
28
  # charged). If the amount due for the invoice is less than Stripe's [minimum allowed charge
29
- # per currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts), the
29
+ # per currency](https://docs.stripe.com/docs/currencies#minimum-and-maximum-charge-amounts), the
30
30
  # invoice is automatically marked paid, and we add the amount due to the
31
31
  # customer's credit balance which is applied to the next invoice.
32
32
  #
@@ -455,8 +455,7 @@ module Stripe
455
455
  attr_reader :type
456
456
  end
457
457
 
458
- class DeleteParams < Stripe::RequestParams
459
- end
458
+ class DeleteParams < Stripe::RequestParams; end
460
459
 
461
460
  class UpdateParams < Stripe::RequestParams
462
461
  class AutomaticTax < Stripe::RequestParams
@@ -624,11 +623,8 @@ module Stripe
624
623
  end
625
624
  end
626
625
 
627
- class Konbini < Stripe::RequestParams
628
- end
629
-
630
- class SepaDebit < Stripe::RequestParams
631
- end
626
+ class Konbini < Stripe::RequestParams; end
627
+ class SepaDebit < Stripe::RequestParams; end
632
628
 
633
629
  class UsBankAccount < Stripe::RequestParams
634
630
  class FinancialConnections < Stripe::RequestParams
@@ -1274,11 +1270,8 @@ module Stripe
1274
1270
  end
1275
1271
  end
1276
1272
 
1277
- class Konbini < Stripe::RequestParams
1278
- end
1279
-
1280
- class SepaDebit < Stripe::RequestParams
1281
- end
1273
+ class Konbini < Stripe::RequestParams; end
1274
+ class SepaDebit < Stripe::RequestParams; end
1282
1275
 
1283
1276
  class UsBankAccount < Stripe::RequestParams
1284
1277
  class FinancialConnections < Stripe::RequestParams
@@ -1924,6 +1917,18 @@ module Stripe
1924
1917
  end
1925
1918
  end
1926
1919
 
1920
+ class AttachPaymentParams < Stripe::RequestParams
1921
+ # Specifies which fields in the response should be expanded.
1922
+ attr_accessor :expand
1923
+ # The ID of the PaymentIntent to attach to the invoice.
1924
+ attr_accessor :payment_intent
1925
+
1926
+ def initialize(expand: nil, payment_intent: nil)
1927
+ @expand = expand
1928
+ @payment_intent = payment_intent
1929
+ end
1930
+ end
1931
+
1927
1932
  class FinalizeInvoiceParams < Stripe::RequestParams
1928
1933
  # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action.
1929
1934
  attr_accessor :auto_advance
@@ -2633,6 +2638,18 @@ module Stripe
2633
2638
  end
2634
2639
  end
2635
2640
 
2641
+ class BillingThresholds < Stripe::RequestParams
2642
+ # Monetary threshold that triggers the subscription to advance to a new billing period
2643
+ attr_accessor :amount_gte
2644
+ # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
2645
+ attr_accessor :reset_billing_cycle_anchor
2646
+
2647
+ def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil)
2648
+ @amount_gte = amount_gte
2649
+ @reset_billing_cycle_anchor = reset_billing_cycle_anchor
2650
+ end
2651
+ end
2652
+
2636
2653
  class Discount < Stripe::RequestParams
2637
2654
  # ID of the coupon to create a new discount for.
2638
2655
  attr_accessor :coupon
@@ -2675,6 +2692,15 @@ module Stripe
2675
2692
  end
2676
2693
 
2677
2694
  class Item < Stripe::RequestParams
2695
+ class BillingThresholds < Stripe::RequestParams
2696
+ # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
2697
+ attr_accessor :usage_gte
2698
+
2699
+ def initialize(usage_gte: nil)
2700
+ @usage_gte = usage_gte
2701
+ end
2702
+ end
2703
+
2678
2704
  class Discount < Stripe::RequestParams
2679
2705
  # ID of the coupon to create a new discount for.
2680
2706
  attr_accessor :coupon
@@ -2731,6 +2757,8 @@ module Stripe
2731
2757
  @unit_amount_decimal = unit_amount_decimal
2732
2758
  end
2733
2759
  end
2760
+ # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
2761
+ attr_accessor :billing_thresholds
2734
2762
  # The coupons to redeem into discounts for the subscription item.
2735
2763
  attr_accessor :discounts
2736
2764
  # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
@@ -2747,6 +2775,7 @@ module Stripe
2747
2775
  attr_accessor :tax_rates
2748
2776
 
2749
2777
  def initialize(
2778
+ billing_thresholds: nil,
2750
2779
  discounts: nil,
2751
2780
  metadata: nil,
2752
2781
  plan: nil,
@@ -2755,6 +2784,7 @@ module Stripe
2755
2784
  quantity: nil,
2756
2785
  tax_rates: nil
2757
2786
  )
2787
+ @billing_thresholds = billing_thresholds
2758
2788
  @discounts = discounts
2759
2789
  @metadata = metadata
2760
2790
  @plan = plan
@@ -2784,6 +2814,8 @@ module Stripe
2784
2814
  attr_accessor :automatic_tax
2785
2815
  # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
2786
2816
  attr_accessor :billing_cycle_anchor
2817
+ # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
2818
+ attr_accessor :billing_thresholds
2787
2819
  # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
2788
2820
  attr_accessor :collection_method
2789
2821
  # 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).
@@ -2808,7 +2840,7 @@ module Stripe
2808
2840
  attr_accessor :metadata
2809
2841
  # The account on behalf of which to charge, for each of the associated subscription's invoices.
2810
2842
  attr_accessor :on_behalf_of
2811
- # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase.
2843
+ # Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
2812
2844
  attr_accessor :proration_behavior
2813
2845
  # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
2814
2846
  attr_accessor :start_date
@@ -2824,6 +2856,7 @@ module Stripe
2824
2856
  application_fee_percent: nil,
2825
2857
  automatic_tax: nil,
2826
2858
  billing_cycle_anchor: nil,
2859
+ billing_thresholds: nil,
2827
2860
  collection_method: nil,
2828
2861
  currency: nil,
2829
2862
  default_payment_method: nil,
@@ -2846,6 +2879,7 @@ module Stripe
2846
2879
  @application_fee_percent = application_fee_percent
2847
2880
  @automatic_tax = automatic_tax
2848
2881
  @billing_cycle_anchor = billing_cycle_anchor
2882
+ @billing_thresholds = billing_thresholds
2849
2883
  @collection_method = collection_method
2850
2884
  @currency = currency
2851
2885
  @default_payment_method = default_payment_method
@@ -2881,6 +2915,15 @@ module Stripe
2881
2915
 
2882
2916
  class SubscriptionDetails < Stripe::RequestParams
2883
2917
  class Item < Stripe::RequestParams
2918
+ class BillingThresholds < Stripe::RequestParams
2919
+ # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
2920
+ attr_accessor :usage_gte
2921
+
2922
+ def initialize(usage_gte: nil)
2923
+ @usage_gte = usage_gte
2924
+ end
2925
+ end
2926
+
2884
2927
  class Discount < Stripe::RequestParams
2885
2928
  # ID of the coupon to create a new discount for.
2886
2929
  attr_accessor :coupon
@@ -2937,6 +2980,8 @@ module Stripe
2937
2980
  @unit_amount_decimal = unit_amount_decimal
2938
2981
  end
2939
2982
  end
2983
+ # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
2984
+ attr_accessor :billing_thresholds
2940
2985
  # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached.
2941
2986
  attr_accessor :clear_usage
2942
2987
  # A flag that, if set to `true`, will delete the specified item.
@@ -2959,6 +3004,7 @@ module Stripe
2959
3004
  attr_accessor :tax_rates
2960
3005
 
2961
3006
  def initialize(
3007
+ billing_thresholds: nil,
2962
3008
  clear_usage: nil,
2963
3009
  deleted: nil,
2964
3010
  discounts: nil,
@@ -2970,6 +3016,7 @@ module Stripe
2970
3016
  quantity: nil,
2971
3017
  tax_rates: nil
2972
3018
  )
3019
+ @billing_thresholds = billing_thresholds
2973
3020
  @clear_usage = clear_usage
2974
3021
  @deleted = deleted
2975
3022
  @discounts = discounts
@@ -2986,7 +3033,7 @@ module Stripe
2986
3033
  attr_accessor :billing_cycle_anchor
2987
3034
  # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
2988
3035
  attr_accessor :cancel_at
2989
- # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
3036
+ # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param will be removed in a future API version. Please use `cancel_at` instead.
2990
3037
  attr_accessor :cancel_at_period_end
2991
3038
  # This simulates the subscription being canceled or expired immediately.
2992
3039
  attr_accessor :cancel_now
@@ -3178,7 +3225,7 @@ module Stripe
3178
3225
  attr_reader :from_invoice
3179
3226
  # The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null.
3180
3227
  attr_reader :hosted_invoice_url
3181
- # Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details.
3228
+ # Unique identifier for the object. For preview invoices created using the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint, this id will be prefixed with `upcoming_in`.
3182
3229
  attr_reader :id
3183
3230
  # The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null.
3184
3231
  attr_reader :invoice_pdf
@@ -3275,16 +3322,56 @@ module Stripe
3275
3322
  )
3276
3323
  end
3277
3324
 
3278
- # This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you [finalize the invoice, which allows you to [pay](#pay_invoice) or <a href="#send_invoice">send](https://stripe.com/docs/api#finalize_invoice) the invoice to your customers.
3325
+ # Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments.
3326
+ #
3327
+ # For the PaymentIntent, when the PaymentIntent's status changes to succeeded, the payment is credited
3328
+ # to the invoice, increasing its amount_paid. When the invoice is fully paid, the
3329
+ # invoice's status becomes paid.
3330
+ #
3331
+ # If the PaymentIntent's status is already succeeded when it's attached, it's
3332
+ # credited to the invoice immediately.
3333
+ #
3334
+ # See: [Partial payments](https://docs.stripe.com/docs/invoicing/partial-payments) to learn more.
3335
+ def attach_payment(params = {}, opts = {})
3336
+ request_stripe_object(
3337
+ method: :post,
3338
+ path: format("/v1/invoices/%<invoice>s/attach_payment", { invoice: CGI.escape(self["id"]) }),
3339
+ params: params,
3340
+ opts: opts
3341
+ )
3342
+ end
3343
+
3344
+ # Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments.
3345
+ #
3346
+ # For the PaymentIntent, when the PaymentIntent's status changes to succeeded, the payment is credited
3347
+ # to the invoice, increasing its amount_paid. When the invoice is fully paid, the
3348
+ # invoice's status becomes paid.
3349
+ #
3350
+ # If the PaymentIntent's status is already succeeded when it's attached, it's
3351
+ # credited to the invoice immediately.
3352
+ #
3353
+ # See: [Partial payments](https://docs.stripe.com/docs/invoicing/partial-payments) to learn more.
3354
+ def self.attach_payment(invoice, params = {}, opts = {})
3355
+ request_stripe_object(
3356
+ method: :post,
3357
+ path: format("/v1/invoices/%<invoice>s/attach_payment", { invoice: CGI.escape(invoice) }),
3358
+ params: params,
3359
+ opts: opts
3360
+ )
3361
+ end
3362
+
3363
+ # This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you [finalize the invoice, which allows you to [pay](#pay_invoice) or <a href="#send_invoice">send](https://docs.stripe.com/api#finalize_invoice) the invoice to your customers.
3279
3364
  def self.create(params = {}, opts = {})
3280
3365
  request_stripe_object(method: :post, path: "/v1/invoices", params: params, opts: opts)
3281
3366
  end
3282
3367
 
3283
3368
  # At any time, you can preview the upcoming invoice for a subscription or subscription schedule. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.
3284
3369
  #
3285
- # Note that when you are viewing an upcoming invoice, you are simply viewing a preview the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer's discount.
3370
+ # You can also preview the effects of creating or updating a subscription or subscription schedule, including a preview of any prorations that will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the subscription_details.proration_date parameter when doing the actual subscription update.
3371
+ #
3372
+ # The recommended way to get only the prorations being previewed on the invoice is to consider line items where parent.subscription_item_details.proration is true.
3286
3373
  #
3287
- # You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the subscription_details.proration_date parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_details.proration_date value passed in the request.
3374
+ # Note that when you are viewing an upcoming invoice, you are simply viewing a preview the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer's discount.
3288
3375
  #
3289
3376
  # Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. [Learn more](https://docs.stripe.com/currencies/conversions)
3290
3377
  def self.create_preview(params = {}, opts = {})
@@ -3296,7 +3383,7 @@ module Stripe
3296
3383
  )
3297
3384
  end
3298
3385
 
3299
- # Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://stripe.com/docs/api#void_invoice).
3386
+ # Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://docs.stripe.com/api#void_invoice).
3300
3387
  def self.delete(invoice, params = {}, opts = {})
3301
3388
  request_stripe_object(
3302
3389
  method: :delete,
@@ -3306,7 +3393,7 @@ module Stripe
3306
3393
  )
3307
3394
  end
3308
3395
 
3309
- # Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://stripe.com/docs/api#void_invoice).
3396
+ # Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://docs.stripe.com/api#void_invoice).
3310
3397
  def delete(params = {}, opts = {})
3311
3398
  request_stripe_object(
3312
3399
  method: :delete,
@@ -3433,11 +3520,11 @@ module Stripe
3433
3520
  )
3434
3521
  end
3435
3522
 
3436
- # Draft invoices are fully editable. Once an invoice is [finalized](https://stripe.com/docs/billing/invoices/workflow#finalized),
3523
+ # Draft invoices are fully editable. Once an invoice is [finalized](https://docs.stripe.com/docs/billing/invoices/workflow#finalized),
3437
3524
  # monetary values, as well as collection_method, become uneditable.
3438
3525
  #
3439
3526
  # If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on,
3440
- # sending reminders for, or [automatically reconciling](https://stripe.com/docs/billing/invoices/reconciliation) invoices, pass
3527
+ # sending reminders for, or [automatically reconciling](https://docs.stripe.com/docs/billing/invoices/reconciliation) invoices, pass
3441
3528
  # auto_advance=false.
3442
3529
  def self.update(invoice, params = {}, opts = {})
3443
3530
  request_stripe_object(
@@ -3468,9 +3555,9 @@ module Stripe
3468
3555
  )
3469
3556
  end
3470
3557
 
3471
- # Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://stripe.com/docs/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.
3558
+ # Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://docs.stripe.com/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.
3472
3559
  #
3473
- # Consult with local regulations to determine whether and how an invoice might be amended, canceled, or voided in the jurisdiction you're doing business in. You might need to [issue another invoice or <a href="#create_credit_note">credit note](https://stripe.com/docs/api#create_invoice) instead. Stripe recommends that you consult with your legal counsel for advice specific to your business.
3560
+ # Consult with local regulations to determine whether and how an invoice might be amended, canceled, or voided in the jurisdiction you're doing business in. You might need to [issue another invoice or <a href="#create_credit_note">credit note](https://docs.stripe.com/api#create_invoice) instead. Stripe recommends that you consult with your legal counsel for advice specific to your business.
3474
3561
  def void_invoice(params = {}, opts = {})
3475
3562
  request_stripe_object(
3476
3563
  method: :post,
@@ -3480,9 +3567,9 @@ module Stripe
3480
3567
  )
3481
3568
  end
3482
3569
 
3483
- # Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://stripe.com/docs/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.
3570
+ # Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://docs.stripe.com/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.
3484
3571
  #
3485
- # Consult with local regulations to determine whether and how an invoice might be amended, canceled, or voided in the jurisdiction you're doing business in. You might need to [issue another invoice or <a href="#create_credit_note">credit note](https://stripe.com/docs/api#create_invoice) instead. Stripe recommends that you consult with your legal counsel for advice specific to your business.
3572
+ # Consult with local regulations to determine whether and how an invoice might be amended, canceled, or voided in the jurisdiction you're doing business in. You might need to [issue another invoice or <a href="#create_credit_note">credit note](https://docs.stripe.com/api#create_invoice) instead. Stripe recommends that you consult with your legal counsel for advice specific to your business.
3486
3573
  def self.void_invoice(invoice, params = {}, opts = {})
3487
3574
  request_stripe_object(
3488
3575
  method: :post,
@@ -59,8 +59,7 @@ module Stripe
59
59
  attr_reader :unit_amount_decimal
60
60
  end
61
61
 
62
- class DeleteParams < Stripe::RequestParams
63
- end
62
+ class DeleteParams < Stripe::RequestParams; end
64
63
 
65
64
  class UpdateParams < Stripe::RequestParams
66
65
  class Discount < Stripe::RequestParams
@@ -407,7 +406,7 @@ module Stripe
407
406
  attr_reader :metadata
408
407
  # String representing the object's type. Objects of the same type share the same value.
409
408
  attr_reader :object
410
- # The parent that generated this invoice
409
+ # The parent that generated this invoice item.
411
410
  attr_reader :parent
412
411
  # Attribute for field period
413
412
  attr_reader :period
@@ -348,7 +348,7 @@ module Stripe
348
348
  attr_reader :metadata
349
349
  # String representing the object's type. Objects of the same type share the same value.
350
350
  attr_reader :object
351
- # The parent that generated this invoice
351
+ # The parent that generated this line item.
352
352
  attr_reader :parent
353
353
  # Attribute for field period
354
354
  attr_reader :period
@@ -2,7 +2,14 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
- # The invoice payment object
5
+ # Invoice Payments represent payments made against invoices. Invoice Payments can
6
+ # be accessed in two ways:
7
+ # 1. By expanding the `payments` field on the [Invoice](https://stripe.com/docs/api#invoice) resource.
8
+ # 2. By using the Invoice Payment retrieve and list endpoints.
9
+ #
10
+ # Invoice Payments include the mapping between payment objects, such as Payment Intent, and Invoices.
11
+ # This resource and its endpoints allows you to easily track if a payment is associated with a specific invoice and
12
+ # monitor the allocation details of the payments.
6
13
  class InvoicePayment < APIResource
7
14
  extend Stripe::APIOperations::List
8
15
 
@@ -12,7 +19,7 @@ module Stripe
12
19
  end
13
20
 
14
21
  class Payment < Stripe::StripeObject
15
- # ID of the successful charge for this payment when `type` is `charge`.
22
+ # ID of the successful charge for this payment when `type` is `charge`.Note: charge is only surfaced if the charge object is not associated with a payment intent. If the charge object does have a payment intent, the Invoice Payment surfaces the payment intent instead.
16
23
  attr_reader :charge
17
24
  # ID of the PaymentIntent associated with this payment when `type` is `payment_intent`. Note: This property is only populated for invoices finalized on or after March 15th, 2019.
18
25
  attr_reader :payment_intent
@@ -1122,8 +1122,8 @@ module Stripe
1122
1122
  # The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized.
1123
1123
  attr_reader :wallet
1124
1124
 
1125
- # [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
1126
- # This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
1125
+ # [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow.
1126
+ # This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
1127
1127
  def approve(params = {}, opts = {})
1128
1128
  request_stripe_object(
1129
1129
  method: :post,
@@ -1134,8 +1134,8 @@ module Stripe
1134
1134
  end
1135
1135
 
1136
1136
  deprecate :approve, :none, 2024, 3
1137
- # [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
1138
- # This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
1137
+ # [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow.
1138
+ # This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
1139
1139
  def self.approve(authorization, params = {}, opts = {})
1140
1140
  request_stripe_object(
1141
1141
  method: :post,
@@ -1150,8 +1150,8 @@ module Stripe
1150
1150
  deprecate :approve, :none, 2024, 3
1151
1151
  end
1152
1152
 
1153
- # [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
1154
- # This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
1153
+ # [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow.
1154
+ # This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
1155
1155
  def decline(params = {}, opts = {})
1156
1156
  request_stripe_object(
1157
1157
  method: :post,
@@ -1162,8 +1162,8 @@ module Stripe
1162
1162
  end
1163
1163
 
1164
1164
  deprecate :decline, :none, 2024, 3
1165
- # [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
1166
- # This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
1165
+ # [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow.
1166
+ # This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
1167
1167
  def self.decline(authorization, params = {}, opts = {})
1168
1168
  request_stripe_object(
1169
1169
  method: :post,
@@ -345,7 +345,7 @@ module Stripe
345
345
  attr_accessor :currency
346
346
  # Specifies which fields in the response should be expanded.
347
347
  attr_accessor :expand
348
- # Attribute for param field financial_account
348
+ # The new financial account ID the card will be associated with. This field allows a card to be reassigned to a different financial account.
349
349
  attr_accessor :financial_account
350
350
  # 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`.
351
351
  attr_accessor :metadata
@@ -797,7 +797,7 @@ module Stripe
797
797
  # [Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
798
798
  attr_reader :treasury
799
799
 
800
- # Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence) for more details about evidence requirements.
800
+ # Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence) for more details about evidence requirements.
801
801
  def self.create(params = {}, opts = {})
802
802
  request_stripe_object(
803
803
  method: :post,
@@ -817,7 +817,7 @@ module Stripe
817
817
  )
818
818
  end
819
819
 
820
- # Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence).
820
+ # Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence).
821
821
  def submit(params = {}, opts = {})
822
822
  request_stripe_object(
823
823
  method: :post,
@@ -827,7 +827,7 @@ module Stripe
827
827
  )
828
828
  end
829
829
 
830
- # Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence).
830
+ # Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence).
831
831
  def self.submit(dispute, params = {}, opts = {})
832
832
  request_stripe_object(
833
833
  method: :post,