stripe 18.1.0.pre.alpha.4 → 18.2.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 (449) hide show
  1. checksums.yaml +4 -4
  2. data/lib/data/ca-certificates.crt +682 -518
  3. data/lib/stripe/api_requestor.rb +2 -0
  4. data/lib/stripe/api_version.rb +1 -1
  5. data/lib/stripe/errors.rb +3 -0
  6. data/lib/stripe/event_types.rb +56 -0
  7. data/lib/stripe/events/v2_core_health_api_error_firing_event.rb +19 -1
  8. data/lib/stripe/events/v2_core_health_api_error_resolved_event.rb +19 -1
  9. data/lib/stripe/events/v2_core_health_api_latency_firing_event.rb +19 -1
  10. data/lib/stripe/events/v2_core_health_api_latency_resolved_event.rb +19 -1
  11. data/lib/stripe/events/v2_core_health_payment_method_error_firing_event.rb +19 -1
  12. data/lib/stripe/events/v2_core_health_payment_method_error_resolved_event.rb +19 -1
  13. data/lib/stripe/events/v2_core_health_sepa_debit_delayed_firing_event.rb +58 -0
  14. data/lib/stripe/events/v2_core_health_sepa_debit_delayed_resolved_event.rb +60 -0
  15. data/lib/stripe/events/v2_money_management_payout_method_created_event.rb +44 -0
  16. data/lib/stripe/events/v2_payments_settlement_allocation_intent_canceled_event.rb +44 -0
  17. data/lib/stripe/events/v2_payments_settlement_allocation_intent_created_event.rb +44 -0
  18. data/lib/stripe/events/v2_payments_settlement_allocation_intent_errored_event.rb +65 -0
  19. data/lib/stripe/events/v2_payments_settlement_allocation_intent_funds_not_received_event.rb +44 -0
  20. data/lib/stripe/events/v2_payments_settlement_allocation_intent_matched_event.rb +44 -0
  21. data/lib/stripe/events/v2_payments_settlement_allocation_intent_not_found_event.rb +38 -0
  22. data/lib/stripe/events/v2_payments_settlement_allocation_intent_settled_event.rb +44 -0
  23. data/lib/stripe/events/v2_payments_settlement_allocation_intent_split_canceled_event.rb +61 -0
  24. data/lib/stripe/events/v2_payments_settlement_allocation_intent_split_created_event.rb +61 -0
  25. data/lib/stripe/events/v2_payments_settlement_allocation_intent_split_settled_event.rb +61 -0
  26. data/lib/stripe/events/v2_payments_settlement_allocation_intent_submitted_event.rb +44 -0
  27. data/lib/stripe/object_types.rb +6 -0
  28. data/lib/stripe/params/account_create_params.rb +50 -28
  29. data/lib/stripe/params/account_external_account_create_params.rb +2 -2
  30. data/lib/stripe/params/account_external_account_update_params.rb +2 -2
  31. data/lib/stripe/params/account_notice_update_params.rb +1 -1
  32. data/lib/stripe/params/account_person_create_params.rb +10 -10
  33. data/lib/stripe/params/account_person_update_params.rb +10 -10
  34. data/lib/stripe/params/account_session_create_params.rb +17 -0
  35. data/lib/stripe/params/account_update_params.rb +49 -27
  36. data/lib/stripe/params/application_fee_refund_create_params.rb +1 -1
  37. data/lib/stripe/params/application_fee_refund_update_params.rb +1 -1
  38. data/lib/stripe/params/balance_transfer_create_params.rb +1 -1
  39. data/lib/stripe/params/billing/credit_balance_summary_retrieve_params.rb +2 -2
  40. data/lib/stripe/params/billing/credit_balance_transaction_list_params.rb +2 -2
  41. data/lib/stripe/params/billing/credit_grant_create_params.rb +2 -2
  42. data/lib/stripe/params/billing/credit_grant_list_params.rb +1 -1
  43. data/lib/stripe/params/billing/meter_event_create_params.rb +1 -1
  44. data/lib/stripe/params/billing_portal/configuration_create_params.rb +7 -3
  45. data/lib/stripe/params/billing_portal/configuration_update_params.rb +7 -3
  46. data/lib/stripe/params/billing_portal/session_create_params.rb +7 -7
  47. data/lib/stripe/params/charge_capture_params.rb +9 -9
  48. data/lib/stripe/params/charge_create_params.rb +12 -12
  49. data/lib/stripe/params/charge_search_params.rb +1 -1
  50. data/lib/stripe/params/charge_update_params.rb +10 -10
  51. data/lib/stripe/params/checkout/session_create_params.rb +53 -41
  52. data/lib/stripe/params/checkout/session_update_params.rb +27 -15
  53. data/lib/stripe/params/climate/order_create_params.rb +1 -1
  54. data/lib/stripe/params/climate/order_update_params.rb +1 -1
  55. data/lib/stripe/params/confirmation_token_create_params.rb +6 -6
  56. data/lib/stripe/params/coupon_create_params.rb +1 -1
  57. data/lib/stripe/params/coupon_update_params.rb +1 -1
  58. data/lib/stripe/params/credit_note_create_params.rb +1 -1
  59. data/lib/stripe/params/credit_note_list_params.rb +1 -1
  60. data/lib/stripe/params/credit_note_list_preview_line_items_params.rb +1 -1
  61. data/lib/stripe/params/credit_note_preview_lines_list_params.rb +1 -1
  62. data/lib/stripe/params/credit_note_preview_params.rb +1 -1
  63. data/lib/stripe/params/credit_note_update_params.rb +1 -1
  64. data/lib/stripe/params/customer_balance_transaction_create_params.rb +2 -2
  65. data/lib/stripe/params/customer_balance_transaction_list_params.rb +11 -1
  66. data/lib/stripe/params/customer_balance_transaction_update_params.rb +1 -1
  67. data/lib/stripe/params/customer_cash_balance_update_params.rb +1 -1
  68. data/lib/stripe/params/customer_create_params.rb +5 -5
  69. data/lib/stripe/params/customer_fund_cash_balance_params.rb +2 -2
  70. data/lib/stripe/params/customer_payment_source_create_params.rb +2 -2
  71. data/lib/stripe/params/customer_payment_source_update_params.rb +2 -2
  72. data/lib/stripe/params/customer_search_params.rb +1 -1
  73. data/lib/stripe/params/customer_update_params.rb +7 -7
  74. data/lib/stripe/params/delegated_checkout/requested_session_confirm_params.rb +84 -1
  75. data/lib/stripe/params/dispute_update_params.rb +3 -3
  76. data/lib/stripe/params/external_account_create_params.rb +2 -2
  77. data/lib/stripe/params/external_account_update_params.rb +2 -2
  78. data/lib/stripe/params/file_create_params.rb +3 -3
  79. data/lib/stripe/params/file_link_create_params.rb +1 -1
  80. data/lib/stripe/params/file_link_update_params.rb +1 -1
  81. data/lib/stripe/params/financial_connections/account_list_params.rb +3 -3
  82. data/lib/stripe/params/financial_connections/session_create_params.rb +3 -3
  83. data/lib/stripe/params/forwarding/request_create_params.rb +1 -1
  84. data/lib/stripe/params/identity/verification_session_create_params.rb +6 -6
  85. data/lib/stripe/params/identity/verification_session_list_params.rb +3 -3
  86. data/lib/stripe/params/identity/verification_session_update_params.rb +5 -5
  87. data/lib/stripe/params/invoice_add_lines_params.rb +21 -9
  88. data/lib/stripe/params/invoice_attach_payment_params.rb +1 -1
  89. data/lib/stripe/params/invoice_create_params.rb +37 -13
  90. data/lib/stripe/params/invoice_create_preview_params.rb +60 -60
  91. data/lib/stripe/params/invoice_finalize_invoice_params.rb +1 -1
  92. data/lib/stripe/params/invoice_item_create_params.rb +8 -8
  93. data/lib/stripe/params/invoice_item_list_params.rb +2 -2
  94. data/lib/stripe/params/invoice_item_update_params.rb +6 -6
  95. data/lib/stripe/params/invoice_line_item_update_params.rb +20 -8
  96. data/lib/stripe/params/invoice_list_params.rb +2 -2
  97. data/lib/stripe/params/invoice_remove_lines_params.rb +1 -1
  98. data/lib/stripe/params/invoice_search_params.rb +1 -1
  99. data/lib/stripe/params/invoice_update_lines_params.rb +21 -9
  100. data/lib/stripe/params/invoice_update_params.rb +34 -10
  101. data/lib/stripe/params/issuing/authorization_approve_params.rb +2 -2
  102. data/lib/stripe/params/issuing/authorization_capture_params.rb +1 -1
  103. data/lib/stripe/params/issuing/authorization_create_params.rb +5 -5
  104. data/lib/stripe/params/issuing/authorization_decline_params.rb +1 -1
  105. data/lib/stripe/params/issuing/authorization_finalize_amount_params.rb +1 -1
  106. data/lib/stripe/params/issuing/authorization_increment_params.rb +2 -2
  107. data/lib/stripe/params/issuing/authorization_reverse_params.rb +1 -1
  108. data/lib/stripe/params/issuing/authorization_update_params.rb +1 -1
  109. data/lib/stripe/params/issuing/card_create_params.rb +7 -7
  110. data/lib/stripe/params/issuing/card_list_params.rb +34 -1
  111. data/lib/stripe/params/issuing/card_update_params.rb +6 -6
  112. data/lib/stripe/params/issuing/cardholder_create_params.rb +11 -11
  113. data/lib/stripe/params/issuing/cardholder_update_params.rb +10 -10
  114. data/lib/stripe/params/issuing/credit_underwriting_record_correct_params.rb +5 -5
  115. data/lib/stripe/params/issuing/credit_underwriting_record_create_from_application_params.rb +1 -1
  116. data/lib/stripe/params/issuing/credit_underwriting_record_create_from_proactive_review_params.rb +5 -5
  117. data/lib/stripe/params/issuing/credit_underwriting_record_report_decision_params.rb +4 -4
  118. data/lib/stripe/params/issuing/dispute_create_params.rb +2 -2
  119. data/lib/stripe/params/issuing/dispute_submit_params.rb +1 -1
  120. data/lib/stripe/params/issuing/dispute_update_params.rb +2 -2
  121. data/lib/stripe/params/issuing/personalization_design_create_params.rb +1 -1
  122. data/lib/stripe/params/issuing/personalization_design_update_params.rb +1 -1
  123. data/lib/stripe/params/issuing/program_update_params.rb +1 -1
  124. data/lib/stripe/params/issuing/transaction_create_force_capture_params.rb +2 -2
  125. data/lib/stripe/params/issuing/transaction_create_unlinked_refund_params.rb +2 -2
  126. data/lib/stripe/params/issuing/transaction_refund_params.rb +1 -1
  127. data/lib/stripe/params/issuing/transaction_update_params.rb +1 -1
  128. data/lib/stripe/params/mandate_list_params.rb +1 -1
  129. data/lib/stripe/params/margin_create_params.rb +1 -1
  130. data/lib/stripe/params/margin_update_params.rb +1 -1
  131. data/lib/stripe/params/order_create_params.rb +12 -12
  132. data/lib/stripe/params/order_update_params.rb +12 -12
  133. data/lib/stripe/params/payment_intent_apply_customer_balance_params.rb +1 -1
  134. data/lib/stripe/params/payment_intent_capture_params.rb +18 -18
  135. data/lib/stripe/params/payment_intent_confirm_params.rb +43 -39
  136. data/lib/stripe/params/payment_intent_create_params.rb +61 -57
  137. data/lib/stripe/params/payment_intent_decrement_authorization_params.rb +4 -4
  138. data/lib/stripe/params/payment_intent_increment_authorization_params.rb +10 -10
  139. data/lib/stripe/params/payment_intent_list_params.rb +1 -1
  140. data/lib/stripe/params/payment_intent_search_params.rb +1 -1
  141. data/lib/stripe/params/payment_intent_update_params.rb +40 -40
  142. data/lib/stripe/params/payment_link_create_params.rb +32 -20
  143. data/lib/stripe/params/payment_link_update_params.rb +9 -9
  144. data/lib/stripe/params/payment_method_attach_params.rb +1 -1
  145. data/lib/stripe/params/payment_method_configuration_create_params.rb +40 -40
  146. data/lib/stripe/params/payment_method_configuration_update_params.rb +40 -40
  147. data/lib/stripe/params/payment_method_create_params.rb +4 -4
  148. data/lib/stripe/params/payment_method_update_params.rb +2 -2
  149. data/lib/stripe/params/payment_record_report_payment_attempt_informational_params.rb +2 -2
  150. data/lib/stripe/params/payment_record_report_payment_attempt_params.rb +3 -3
  151. data/lib/stripe/params/payment_record_report_payment_params.rb +4 -4
  152. data/lib/stripe/params/payment_record_report_refund_params.rb +3 -3
  153. data/lib/stripe/params/payout_create_params.rb +1 -1
  154. data/lib/stripe/params/payout_reverse_params.rb +1 -1
  155. data/lib/stripe/params/payout_update_params.rb +1 -1
  156. data/lib/stripe/params/plan_create_params.rb +4 -4
  157. data/lib/stripe/params/plan_update_params.rb +2 -2
  158. data/lib/stripe/params/price_create_params.rb +6 -6
  159. data/lib/stripe/params/price_search_params.rb +1 -1
  160. data/lib/stripe/params/price_update_params.rb +3 -3
  161. data/lib/stripe/params/product_create_params.rb +21 -8
  162. data/lib/stripe/params/product_feature_create_params.rb +1 -1
  163. data/lib/stripe/params/product_list_params.rb +1 -1
  164. data/lib/stripe/params/product_search_params.rb +1 -1
  165. data/lib/stripe/params/product_update_params.rb +18 -5
  166. data/lib/stripe/params/promotion_code_create_params.rb +3 -3
  167. data/lib/stripe/params/promotion_code_list_params.rb +1 -1
  168. data/lib/stripe/params/promotion_code_update_params.rb +1 -1
  169. data/lib/stripe/params/quote_create_params.rb +14 -14
  170. data/lib/stripe/params/quote_list_params.rb +2 -2
  171. data/lib/stripe/params/quote_update_params.rb +14 -14
  172. data/lib/stripe/params/radar/value_list_create_params.rb +1 -1
  173. data/lib/stripe/params/radar/value_list_update_params.rb +1 -1
  174. data/lib/stripe/params/refund_create_params.rb +2 -2
  175. data/lib/stripe/params/refund_update_params.rb +1 -1
  176. data/lib/stripe/params/reporting/report_run_create_params.rb +2 -2
  177. data/lib/stripe/params/setup_intent_confirm_params.rb +6 -6
  178. data/lib/stripe/params/setup_intent_create_params.rb +12 -12
  179. data/lib/stripe/params/setup_intent_update_params.rb +8 -8
  180. data/lib/stripe/params/shared_payment/granted_token_create_params.rb +47 -0
  181. data/lib/stripe/params/shared_payment/granted_token_retrieve_params.rb +15 -0
  182. data/lib/stripe/params/shared_payment/granted_token_update_params.rb +15 -0
  183. data/lib/stripe/params/shipping_rate_create_params.rb +2 -2
  184. data/lib/stripe/params/shipping_rate_update_params.rb +1 -1
  185. data/lib/stripe/params/source_create_params.rb +3 -3
  186. data/lib/stripe/params/source_update_params.rb +3 -3
  187. data/lib/stripe/params/subscription_create_params.rb +51 -27
  188. data/lib/stripe/params/subscription_item_create_params.rb +15 -15
  189. data/lib/stripe/params/subscription_item_delete_params.rb +2 -2
  190. data/lib/stripe/params/subscription_item_update_params.rb +15 -15
  191. data/lib/stripe/params/subscription_list_params.rb +3 -3
  192. data/lib/stripe/params/subscription_resume_params.rb +2 -2
  193. data/lib/stripe/params/subscription_schedule_amend_params.rb +10 -10
  194. data/lib/stripe/params/subscription_schedule_create_params.rb +31 -31
  195. data/lib/stripe/params/subscription_schedule_update_params.rb +31 -31
  196. data/lib/stripe/params/subscription_search_params.rb +1 -1
  197. data/lib/stripe/params/subscription_update_params.rb +49 -25
  198. data/lib/stripe/params/tax/association_find_params.rb +1 -1
  199. data/lib/stripe/params/tax/calculation_create_params.rb +7 -7
  200. data/lib/stripe/params/tax/settings_update_params.rb +1 -1
  201. data/lib/stripe/params/tax/transaction_create_from_calculation_params.rb +1 -1
  202. data/lib/stripe/params/tax/transaction_create_reversal_params.rb +9 -9
  203. data/lib/stripe/params/tax_id_create_params.rb +2 -2
  204. data/lib/stripe/params/tax_id_list_params.rb +2 -2
  205. data/lib/stripe/params/tax_rate_create_params.rb +1 -1
  206. data/lib/stripe/params/tax_rate_update_params.rb +1 -1
  207. data/lib/stripe/params/terminal/location_create_params.rb +2 -2
  208. data/lib/stripe/params/terminal/location_update_params.rb +2 -2
  209. data/lib/stripe/params/terminal/reader_collect_inputs_params.rb +1 -1
  210. data/lib/stripe/params/terminal/reader_create_params.rb +1 -1
  211. data/lib/stripe/params/terminal/reader_refund_payment_params.rb +1 -1
  212. data/lib/stripe/params/terminal/reader_set_reader_display_params.rb +3 -3
  213. data/lib/stripe/params/terminal/reader_update_params.rb +1 -1
  214. data/lib/stripe/params/test_helpers/confirmation_token_create_params.rb +6 -6
  215. data/lib/stripe/params/test_helpers/customer_fund_cash_balance_params.rb +2 -2
  216. data/lib/stripe/params/test_helpers/issuing/authorization_capture_params.rb +1 -1
  217. data/lib/stripe/params/test_helpers/issuing/authorization_create_params.rb +5 -5
  218. data/lib/stripe/params/test_helpers/issuing/authorization_finalize_amount_params.rb +1 -1
  219. data/lib/stripe/params/test_helpers/issuing/authorization_increment_params.rb +2 -2
  220. data/lib/stripe/params/test_helpers/issuing/authorization_reverse_params.rb +1 -1
  221. data/lib/stripe/params/test_helpers/issuing/transaction_create_force_capture_params.rb +2 -2
  222. data/lib/stripe/params/test_helpers/issuing/transaction_create_unlinked_refund_params.rb +2 -2
  223. data/lib/stripe/params/test_helpers/issuing/transaction_refund_params.rb +1 -1
  224. data/lib/stripe/params/test_helpers/shared_payment/granted_token_create_params.rb +49 -0
  225. data/lib/stripe/params/test_helpers/shared_payment/granted_token_update_params.rb +17 -0
  226. data/lib/stripe/params/test_helpers/treasury/received_credit_create_params.rb +1 -1
  227. data/lib/stripe/params/test_helpers/treasury/received_debit_create_params.rb +1 -1
  228. data/lib/stripe/params/token_create_params.rb +22 -22
  229. data/lib/stripe/params/topup_create_params.rb +2 -2
  230. data/lib/stripe/params/topup_update_params.rb +1 -1
  231. data/lib/stripe/params/transfer_create_params.rb +3 -3
  232. data/lib/stripe/params/transfer_reversal_create_params.rb +1 -1
  233. data/lib/stripe/params/transfer_reversal_update_params.rb +1 -1
  234. data/lib/stripe/params/transfer_update_params.rb +1 -1
  235. data/lib/stripe/params/treasury/credit_reversal_create_params.rb +1 -1
  236. data/lib/stripe/params/treasury/debit_reversal_create_params.rb +1 -1
  237. data/lib/stripe/params/treasury/financial_account_create_params.rb +1 -1
  238. data/lib/stripe/params/treasury/financial_account_update_params.rb +1 -1
  239. data/lib/stripe/params/treasury/inbound_transfer_create_params.rb +2 -2
  240. data/lib/stripe/params/treasury/outbound_payment_create_params.rb +5 -5
  241. data/lib/stripe/params/treasury/outbound_transfer_create_params.rb +3 -3
  242. data/lib/stripe/params/treasury/received_credit_create_params.rb +1 -1
  243. data/lib/stripe/params/treasury/received_debit_create_params.rb +1 -1
  244. data/lib/stripe/params/v2/billing/intent_create_params.rb +110 -40
  245. data/lib/stripe/params/v2/core/account_create_params.rb +36 -24
  246. data/lib/stripe/params/v2/core/account_link_create_params.rb +5 -5
  247. data/lib/stripe/params/v2/core/account_token_create_params.rb +8 -8
  248. data/lib/stripe/params/v2/core/account_update_params.rb +41 -29
  249. data/lib/stripe/params/v2/core/accounts/person_create_params.rb +5 -5
  250. data/lib/stripe/params/v2/core/accounts/person_token_create_params.rb +5 -5
  251. data/lib/stripe/params/v2/core/accounts/person_update_params.rb +5 -5
  252. data/lib/stripe/params/v2/core/claimable_sandbox_create_params.rb +1 -1
  253. data/lib/stripe/params/v2/iam/api_key_create_params.rb +51 -0
  254. data/lib/stripe/params/v2/iam/api_key_expire_params.rb +10 -0
  255. data/lib/stripe/params/v2/iam/api_key_list_params.rb +20 -0
  256. data/lib/stripe/params/v2/iam/api_key_retrieve_params.rb +10 -0
  257. data/lib/stripe/params/v2/iam/api_key_rotate_params.rb +46 -0
  258. data/lib/stripe/params/v2/iam/api_key_update_params.rb +20 -0
  259. data/lib/stripe/params/v2/money_management/financial_account_list_params.rb +4 -1
  260. data/lib/stripe/params/v2/money_management/outbound_payment_create_params.rb +4 -1
  261. data/lib/stripe/params/v2/money_management/outbound_payment_quote_create_params.rb +4 -1
  262. data/lib/stripe/params/v2/payments/settlement_allocation_intent_cancel_params.rb +10 -0
  263. data/lib/stripe/params/v2/payments/settlement_allocation_intent_create_params.rb +46 -0
  264. data/lib/stripe/params/v2/payments/settlement_allocation_intent_retrieve_params.rb +10 -0
  265. data/lib/stripe/params/v2/payments/settlement_allocation_intent_submit_params.rb +10 -0
  266. data/lib/stripe/params/v2/payments/settlement_allocation_intent_update_params.rb +31 -0
  267. data/lib/stripe/params/v2/payments/settlement_allocation_intents/split_cancel_params.rb +12 -0
  268. data/lib/stripe/params/v2/payments/settlement_allocation_intents/split_create_params.rb +39 -0
  269. data/lib/stripe/params/v2/payments/settlement_allocation_intents/split_retrieve_params.rb +12 -0
  270. data/lib/stripe/params/v2/tax/manual_rule_create_params.rb +94 -0
  271. data/lib/stripe/params/v2/tax/manual_rule_deactivate_params.rb +10 -0
  272. data/lib/stripe/params/v2/tax/manual_rule_list_params.rb +17 -0
  273. data/lib/stripe/params/v2/tax/manual_rule_retrieve_params.rb +10 -0
  274. data/lib/stripe/params/v2/tax/manual_rule_update_params.rb +94 -0
  275. data/lib/stripe/params/webhook_endpoint_create_params.rb +1 -1
  276. data/lib/stripe/params/webhook_endpoint_update_params.rb +1 -1
  277. data/lib/stripe/params.rb +24 -0
  278. data/lib/stripe/resources/account.rb +27 -27
  279. data/lib/stripe/resources/account_link.rb +1 -1
  280. data/lib/stripe/resources/account_notice.rb +6 -6
  281. data/lib/stripe/resources/account_session.rb +5 -5
  282. data/lib/stripe/resources/application_fee_refund.rb +2 -2
  283. data/lib/stripe/resources/apps/secret.rb +1 -1
  284. data/lib/stripe/resources/balance.rb +2 -2
  285. data/lib/stripe/resources/balance_settings.rb +1 -1
  286. data/lib/stripe/resources/balance_transaction.rb +1 -1
  287. data/lib/stripe/resources/balance_transfer.rb +3 -3
  288. data/lib/stripe/resources/bank_account.rb +10 -10
  289. data/lib/stripe/resources/billing/alert.rb +2 -2
  290. data/lib/stripe/resources/billing/credit_balance_summary.rb +2 -2
  291. data/lib/stripe/resources/billing/credit_balance_transaction.rb +2 -2
  292. data/lib/stripe/resources/billing/credit_grant.rb +3 -3
  293. data/lib/stripe/resources/billing/meter_event.rb +1 -1
  294. data/lib/stripe/resources/billing_portal/configuration.rb +5 -3
  295. data/lib/stripe/resources/billing_portal/session.rb +6 -6
  296. data/lib/stripe/resources/capability.rb +16 -16
  297. data/lib/stripe/resources/capital/financing_offer.rb +2 -2
  298. data/lib/stripe/resources/capital/financing_summary.rb +7 -4
  299. data/lib/stripe/resources/card.rb +2 -2
  300. data/lib/stripe/resources/cash_balance.rb +2 -2
  301. data/lib/stripe/resources/charge.rb +47 -35
  302. data/lib/stripe/resources/checkout/session.rb +19 -19
  303. data/lib/stripe/resources/climate/order.rb +1 -1
  304. data/lib/stripe/resources/confirmation_token.rb +11 -11
  305. data/lib/stripe/resources/coupon.rb +3 -3
  306. data/lib/stripe/resources/credit_note.rb +5 -5
  307. data/lib/stripe/resources/credit_note_line_item.rb +1 -1
  308. data/lib/stripe/resources/customer.rb +8 -8
  309. data/lib/stripe/resources/customer_balance_transaction.rb +6 -6
  310. data/lib/stripe/resources/customer_cash_balance_transaction.rb +10 -10
  311. data/lib/stripe/resources/delegated_checkout/requested_session.rb +63 -10
  312. data/lib/stripe/resources/discount.rb +5 -5
  313. data/lib/stripe/resources/dispute.rb +5 -5
  314. data/lib/stripe/resources/entitlements/active_entitlement.rb +1 -1
  315. data/lib/stripe/resources/event.rb +1 -1
  316. data/lib/stripe/resources/exchange_rate.rb +2 -2
  317. data/lib/stripe/resources/file.rb +4 -4
  318. data/lib/stripe/resources/file_link.rb +1 -1
  319. data/lib/stripe/resources/financial_connections/account.rb +3 -3
  320. data/lib/stripe/resources/financial_connections/session.rb +2 -2
  321. data/lib/stripe/resources/forwarding/request.rb +1 -1
  322. data/lib/stripe/resources/funding_instructions.rb +14 -14
  323. data/lib/stripe/resources/identity/blocklist_entry.rb +1 -1
  324. data/lib/stripe/resources/identity/verification_report.rb +9 -9
  325. data/lib/stripe/resources/identity/verification_session.rb +11 -11
  326. data/lib/stripe/resources/invoice.rb +66 -34
  327. data/lib/stripe/resources/invoice_item.rb +9 -9
  328. data/lib/stripe/resources/invoice_line_item.rb +7 -7
  329. data/lib/stripe/resources/invoice_payment.rb +1 -1
  330. data/lib/stripe/resources/invoice_rendering_template.rb +1 -1
  331. data/lib/stripe/resources/issuing/authorization.rb +20 -20
  332. data/lib/stripe/resources/issuing/card.rb +16 -12
  333. data/lib/stripe/resources/issuing/cardholder.rb +14 -14
  334. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +5 -5
  335. data/lib/stripe/resources/issuing/dispute.rb +7 -7
  336. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +1 -1
  337. data/lib/stripe/resources/issuing/personalization_design.rb +1 -1
  338. data/lib/stripe/resources/issuing/program.rb +1 -1
  339. data/lib/stripe/resources/issuing/settlement.rb +2 -2
  340. data/lib/stripe/resources/issuing/token.rb +1 -1
  341. data/lib/stripe/resources/issuing/transaction.rb +13 -13
  342. data/lib/stripe/resources/line_item.rb +3 -3
  343. data/lib/stripe/resources/login_link.rb +1 -1
  344. data/lib/stripe/resources/margin.rb +1 -1
  345. data/lib/stripe/resources/order.rb +13 -13
  346. data/lib/stripe/resources/payment_attempt_record.rb +80 -22
  347. data/lib/stripe/resources/payment_intent.rb +117 -74
  348. data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +3 -3
  349. data/lib/stripe/resources/payment_link.rb +7 -7
  350. data/lib/stripe/resources/payment_method.rb +13 -13
  351. data/lib/stripe/resources/payment_method_configuration.rb +4 -4
  352. data/lib/stripe/resources/payment_method_domain.rb +1 -1
  353. data/lib/stripe/resources/payment_record.rb +82 -22
  354. data/lib/stripe/resources/payout.rb +7 -7
  355. data/lib/stripe/resources/person.rb +23 -23
  356. data/lib/stripe/resources/plan.rb +5 -5
  357. data/lib/stripe/resources/price.rb +6 -6
  358. data/lib/stripe/resources/product.rb +9 -9
  359. data/lib/stripe/resources/promotion_code.rb +4 -4
  360. data/lib/stripe/resources/quote.rb +15 -15
  361. data/lib/stripe/resources/quote_line.rb +5 -5
  362. data/lib/stripe/resources/quote_preview_invoice.rb +64 -32
  363. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +100 -100
  364. data/lib/stripe/resources/radar/early_fraud_warning.rb +1 -1
  365. data/lib/stripe/resources/radar/value_list.rb +2 -2
  366. data/lib/stripe/resources/radar/value_list_item.rb +1 -1
  367. data/lib/stripe/resources/refund.rb +3 -3
  368. data/lib/stripe/resources/reporting/report_run.rb +3 -3
  369. data/lib/stripe/resources/reporting/report_type.rb +3 -3
  370. data/lib/stripe/resources/reversal.rb +4 -4
  371. data/lib/stripe/resources/review.rb +1 -1
  372. data/lib/stripe/resources/setup_attempt.rb +17 -17
  373. data/lib/stripe/resources/setup_intent.rb +19 -19
  374. data/lib/stripe/resources/shared_payment/granted_token.rb +126 -0
  375. data/lib/stripe/resources/shipping_rate.rb +3 -3
  376. data/lib/stripe/resources/sigma/scheduled_query_run.rb +1 -1
  377. data/lib/stripe/resources/source.rb +8 -8
  378. data/lib/stripe/resources/source_mandate_notification.rb +3 -3
  379. data/lib/stripe/resources/subscription.rb +46 -14
  380. data/lib/stripe/resources/subscription_item.rb +22 -22
  381. data/lib/stripe/resources/subscription_schedule.rb +101 -101
  382. data/lib/stripe/resources/tax/association.rb +3 -3
  383. data/lib/stripe/resources/tax/calculation.rb +12 -12
  384. data/lib/stripe/resources/tax/calculation_line_item.rb +7 -7
  385. data/lib/stripe/resources/tax/registration.rb +3 -3
  386. data/lib/stripe/resources/tax/settings.rb +2 -2
  387. data/lib/stripe/resources/tax/transaction.rb +9 -9
  388. data/lib/stripe/resources/tax/transaction_line_item.rb +5 -5
  389. data/lib/stripe/resources/tax_id.rb +4 -4
  390. data/lib/stripe/resources/tax_rate.rb +1 -1
  391. data/lib/stripe/resources/terminal/connection_token.rb +1 -1
  392. data/lib/stripe/resources/terminal/location.rb +3 -3
  393. data/lib/stripe/resources/terminal/reader.rb +10 -10
  394. data/lib/stripe/resources/token.rb +4 -4
  395. data/lib/stripe/resources/topup.rb +3 -3
  396. data/lib/stripe/resources/transfer.rb +5 -5
  397. data/lib/stripe/resources/treasury/credit_reversal.rb +3 -3
  398. data/lib/stripe/resources/treasury/debit_reversal.rb +3 -3
  399. data/lib/stripe/resources/treasury/financial_account.rb +1 -1
  400. data/lib/stripe/resources/treasury/inbound_transfer.rb +5 -5
  401. data/lib/stripe/resources/treasury/outbound_payment.rb +6 -6
  402. data/lib/stripe/resources/treasury/outbound_transfer.rb +5 -5
  403. data/lib/stripe/resources/treasury/received_credit.rb +10 -10
  404. data/lib/stripe/resources/treasury/received_debit.rb +7 -7
  405. data/lib/stripe/resources/treasury/transaction.rb +11 -11
  406. data/lib/stripe/resources/treasury/transaction_entry.rb +11 -11
  407. data/lib/stripe/resources/v2/billing/intent_action.rb +139 -51
  408. data/lib/stripe/resources/v2/core/account.rb +174 -289
  409. data/lib/stripe/resources/v2/core/account_link.rb +11 -11
  410. data/lib/stripe/resources/v2/core/account_person.rb +10 -10
  411. data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +21 -1
  412. data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +23 -1
  413. data/lib/stripe/resources/v2/iam/api_key.rb +129 -0
  414. data/lib/stripe/resources/v2/money_management/financial_account.rb +35 -0
  415. data/lib/stripe/resources/v2/money_management/outbound_payment.rb +2 -0
  416. data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +2 -0
  417. data/lib/stripe/resources/v2/money_management/payout_method.rb +20 -0
  418. data/lib/stripe/resources/v2/money_management/received_credit.rb +2 -0
  419. data/lib/stripe/resources/v2/payments/settlement_allocation_intent.rb +92 -0
  420. data/lib/stripe/resources/v2/payments/settlement_allocation_intent_split.rb +78 -0
  421. data/lib/stripe/resources/v2/tax/manual_rule.rb +115 -0
  422. data/lib/stripe/resources/webhook_endpoint.rb +1 -1
  423. data/lib/stripe/resources.rb +19 -0
  424. data/lib/stripe/services/capital/financing_summary_service.rb +1 -1
  425. data/lib/stripe/services/payment_method_service.rb +1 -1
  426. data/lib/stripe/services/shared_payment/granted_token_service.rb +19 -0
  427. data/lib/stripe/services/shared_payment_service.rb +13 -0
  428. data/lib/stripe/services/test_helpers/shared_payment/granted_token_service.rb +32 -0
  429. data/lib/stripe/services/test_helpers/shared_payment_service.rb +15 -0
  430. data/lib/stripe/services/test_helpers_service.rb +2 -1
  431. data/lib/stripe/services/v1_services.rb +2 -1
  432. data/lib/stripe/services/v2/core/account_link_service.rb +1 -1
  433. data/lib/stripe/services/v2/core/account_service.rb +0 -4
  434. data/lib/stripe/services/v2/core/accounts/person_service.rb +2 -2
  435. data/lib/stripe/services/v2/iam/api_key_service.rb +76 -0
  436. data/lib/stripe/services/v2/iam_service.rb +15 -0
  437. data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +2 -0
  438. data/lib/stripe/services/v2/money_management/payout_method_service.rb +2 -0
  439. data/lib/stripe/services/v2/payment_service.rb +3 -1
  440. data/lib/stripe/services/v2/payments/settlement_allocation_intent_service.rb +72 -0
  441. data/lib/stripe/services/v2/payments/settlement_allocation_intents/split_service.rb +45 -0
  442. data/lib/stripe/services/v2/tax/manual_rule_service.rb +65 -0
  443. data/lib/stripe/services/v2/tax_service.rb +15 -0
  444. data/lib/stripe/services/v2_services.rb +3 -1
  445. data/lib/stripe/services.rb +10 -0
  446. data/lib/stripe/stripe_object.rb +11 -3
  447. data/lib/stripe/version.rb +1 -1
  448. data/rbi/stripe.rbi +6022 -3221
  449. metadata +55 -2
@@ -4,7 +4,7 @@
4
4
  module Stripe
5
5
  # Subscriptions allow you to charge a customer on a recurring basis.
6
6
  #
7
- # Related guide: [Creating subscriptions](https://stripe.com/docs/billing/subscriptions/creating)
7
+ # Related guide: [Creating subscriptions](https://docs.stripe.com/billing/subscriptions/creating)
8
8
  class Subscription < APIResource
9
9
  extend Stripe::APIOperations::Create
10
10
  extend Stripe::APIOperations::List
@@ -350,7 +350,7 @@ module Stripe
350
350
  attr_reader :mandate_options
351
351
  # Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time.
352
352
  attr_reader :network
353
- # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
353
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://docs.stripe.com/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
354
354
  attr_reader :request_three_d_secure
355
355
 
356
356
  def self.inner_class_types
@@ -423,6 +423,35 @@ module Stripe
423
423
  end
424
424
  end
425
425
 
426
+ class Payto < ::Stripe::StripeObject
427
+ class MandateOptions < ::Stripe::StripeObject
428
+ # The maximum amount that can be collected in a single invoice. If you don't specify a maximum, then there is no limit.
429
+ attr_reader :amount
430
+ # Only `maximum` is supported.
431
+ attr_reader :amount_type
432
+ # The purpose for which payments are made. Has a default value based on your merchant category code.
433
+ attr_reader :purpose
434
+
435
+ def self.inner_class_types
436
+ @inner_class_types = {}
437
+ end
438
+
439
+ def self.field_remappings
440
+ @field_remappings = {}
441
+ end
442
+ end
443
+ # Attribute for field mandate_options
444
+ attr_reader :mandate_options
445
+
446
+ def self.inner_class_types
447
+ @inner_class_types = { mandate_options: MandateOptions }
448
+ end
449
+
450
+ def self.field_remappings
451
+ @field_remappings = {}
452
+ end
453
+ end
454
+
426
455
  class Pix < ::Stripe::StripeObject
427
456
  class MandateOptions < ::Stripe::StripeObject
428
457
  # Amount to be charged for future payments.
@@ -551,6 +580,8 @@ module Stripe
551
580
  attr_reader :id_bank_transfer
552
581
  # This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription.
553
582
  attr_reader :konbini
583
+ # This sub-hash contains details about the PayTo payment method options to pass to invoices created by the subscription.
584
+ attr_reader :payto
554
585
  # This sub-hash contains details about the Pix payment method options to pass to invoices created by the subscription.
555
586
  attr_reader :pix
556
587
  # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to invoices created by the subscription.
@@ -568,6 +599,7 @@ module Stripe
568
599
  customer_balance: CustomerBalance,
569
600
  id_bank_transfer: IdBankTransfer,
570
601
  konbini: Konbini,
602
+ payto: Payto,
571
603
  pix: Pix,
572
604
  sepa_debit: SepaDebit,
573
605
  upi: Upi,
@@ -621,7 +653,7 @@ module Stripe
621
653
  attr_reader :subscription_items
622
654
  # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time, if the update is applied.
623
655
  attr_reader :trial_end
624
- # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
656
+ # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://docs.stripe.com/billing/subscriptions/trials) to learn more.
625
657
  attr_reader :trial_from_plan
626
658
 
627
659
  def self.inner_class_types
@@ -699,7 +731,7 @@ module Stripe
699
731
  attr_reader :automatic_tax
700
732
  # The Billing Cadence which controls the timing of recurring invoice generation for this subscription.If unset, the subscription will bill according to its own configured schedule and create its own invoices.If set, this subscription will be billed by the cadence instead, potentially sharing invoices with the other subscriptions linked to that Cadence.
701
733
  attr_reader :billing_cadence
702
- # The reference point that aligns future [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle) dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. The timestamp is in UTC format.
734
+ # The reference point that aligns future [billing cycle](https://docs.stripe.com/subscriptions/billing-cycle) dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. The timestamp is in UTC format.
703
735
  attr_reader :billing_cycle_anchor
704
736
  # The fixed values used to calculate the `billing_cycle_anchor`.
705
737
  attr_reader :billing_cycle_anchor_config
@@ -725,13 +757,13 @@ module Stripe
725
757
  attr_reader :currency
726
758
  # ID of the customer who owns the subscription.
727
759
  attr_reader :customer
728
- # ID of the account who owns the subscription.
760
+ # ID of the account representing the customer who owns the subscription.
729
761
  attr_reader :customer_account
730
762
  # Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`.
731
763
  attr_reader :days_until_due
732
- # ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
764
+ # ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://docs.stripe.com/api/customers/object#customer_object-default_source).
733
765
  attr_reader :default_payment_method
734
- # ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
766
+ # ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://docs.stripe.com/api/customers/object#customer_object-default_source).
735
767
  attr_reader :default_source
736
768
  # The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription.
737
769
  attr_reader :default_tax_rates
@@ -753,23 +785,23 @@ module Stripe
753
785
  attr_reader :latest_invoice
754
786
  # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
755
787
  attr_reader :livemode
756
- # 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.
788
+ # Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
757
789
  attr_reader :metadata
758
790
  # Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`.
759
791
  attr_reader :next_pending_invoice_item_invoice
760
792
  # String representing the object's type. Objects of the same type share the same value.
761
793
  attr_reader :object
762
- # The account (if any) the charge was made on behalf of for charges associated with this subscription. See the [Connect documentation](https://stripe.com/docs/connect/subscriptions#on-behalf-of) for details.
794
+ # The account (if any) the charge was made on behalf of for charges associated with this subscription. See the [Connect documentation](https://docs.stripe.com/connect/subscriptions#on-behalf-of) for details.
763
795
  attr_reader :on_behalf_of
764
- # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
796
+ # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://docs.stripe.com/billing/subscriptions/pause-payment).
765
797
  attr_reader :pause_collection
766
798
  # Payment settings passed on to invoices created by the subscription.
767
799
  attr_reader :payment_settings
768
- # Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval.
800
+ # Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://docs.stripe.com/api#create_invoice) for the given subscription at the specified interval.
769
801
  attr_reader :pending_invoice_item_interval
770
- # You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2).
802
+ # You can use this [SetupIntent](https://docs.stripe.com/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://docs.stripe.com/billing/migration/strong-customer-authentication#scenario-2).
771
803
  attr_reader :pending_setup_intent
772
- # If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid.
804
+ # If specified, [pending updates](https://docs.stripe.com/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid.
773
805
  attr_reader :pending_update
774
806
  # Time period and invoice for a Subscription billed in advance.
775
807
  attr_reader :prebilling
@@ -783,7 +815,7 @@ module Stripe
783
815
  #
784
816
  # A subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over.
785
817
  #
786
- # A subscription can only enter a `paused` status [when a trial ends without a payment method](https://stripe.com/docs/billing/subscriptions/trials#create-free-trials-without-payment). A `paused` subscription doesn't generate invoices and can be resumed after your customer adds their payment method. The `paused` status is different from [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment), which still generates invoices and leaves the subscription's status unchanged.
818
+ # A subscription can only enter a `paused` status [when a trial ends without a payment method](https://docs.stripe.com/billing/subscriptions/trials#create-free-trials-without-payment). A `paused` subscription doesn't generate invoices and can be resumed after your customer adds their payment method. The `paused` status is different from [pausing collection](https://docs.stripe.com/billing/subscriptions/pause-payment), which still generates invoices and leaves the subscription's status unchanged.
787
819
  #
788
820
  # If subscription `collection_method=charge_automatically`, it becomes `past_due` when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has exhausted all payment retry attempts, the subscription will become `canceled` or `unpaid` (depending on your subscriptions settings).
789
821
  #
@@ -28,11 +28,13 @@ module Stripe
28
28
  end
29
29
  end
30
30
 
31
- class Trial < ::Stripe::StripeObject
32
- # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial.
33
- attr_reader :converts_to
34
- # Determines the type of trial for this item.
35
- attr_reader :type
31
+ class CurrentTrial < ::Stripe::StripeObject
32
+ # Attribute for field end_date
33
+ attr_reader :end_date
34
+ # Attribute for field start_date
35
+ attr_reader :start_date
36
+ # Attribute for field trial_offer
37
+ attr_reader :trial_offer
36
38
 
37
39
  def self.inner_class_types
38
40
  @inner_class_types = {}
@@ -43,13 +45,11 @@ module Stripe
43
45
  end
44
46
  end
45
47
 
46
- class CurrentTrial < ::Stripe::StripeObject
47
- # Attribute for field end_date
48
- attr_reader :end_date
49
- # Attribute for field start_date
50
- attr_reader :start_date
51
- # Attribute for field trial_offer
52
- attr_reader :trial_offer
48
+ class Trial < ::Stripe::StripeObject
49
+ # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial.
50
+ attr_reader :converts_to
51
+ # Determines the type of trial for this item.
52
+ attr_reader :type
53
53
 
54
54
  def self.inner_class_types
55
55
  @inner_class_types = {}
@@ -69,31 +69,33 @@ module Stripe
69
69
  attr_reader :current_period_end
70
70
  # The start time of this subscription item's current billing period.
71
71
  attr_reader :current_period_start
72
+ # The current trial that is applied to this subscription item.
73
+ attr_reader :current_trial
72
74
  # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.
73
75
  attr_reader :discounts
74
76
  # Unique identifier for the object.
75
77
  attr_reader :id
76
- # 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.
78
+ # Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
77
79
  attr_reader :metadata
78
80
  # String representing the object's type. Objects of the same type share the same value.
79
81
  attr_reader :object
80
- # You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration.
82
+ # You can now model subscriptions more flexibly using the [Prices API](https://api.stripe.com#prices). It replaces the Plans API and is backwards compatible to simplify your migration.
81
83
  #
82
84
  # Plans define the base price, currency, and billing cycle for recurring purchases of products.
83
- # [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.
85
+ # [Products](https://api.stripe.com#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.
84
86
  #
85
87
  # For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year.
86
88
  #
87
- # Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview).
89
+ # Related guides: [Set up a subscription](https://docs.stripe.com/billing/subscriptions/set-up-subscription) and more about [products and prices](https://docs.stripe.com/products-prices/overview).
88
90
  attr_reader :plan
89
91
  # Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products.
90
- # [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.
92
+ # [Products](https://api.stripe.com#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.
91
93
  #
92
94
  # For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once.
93
95
  #
94
- # Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview).
96
+ # Related guides: [Set up a subscription](https://docs.stripe.com/billing/subscriptions/set-up-subscription), [create an invoice](https://docs.stripe.com/billing/invoices/create), and more about [products and prices](https://docs.stripe.com/products-prices/overview).
95
97
  attr_reader :price
96
- # The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed.
98
+ # The [quantity](https://docs.stripe.com/subscriptions/quantities) of the plan to which the customer should be subscribed.
97
99
  attr_reader :quantity
98
100
  # The `subscription` this `subscription_item` belongs to.
99
101
  attr_reader :subscription
@@ -101,8 +103,6 @@ module Stripe
101
103
  attr_reader :tax_rates
102
104
  # Options that configure the trial on the subscription item.
103
105
  attr_reader :trial
104
- # The current trial that is applied to this subscription item.
105
- attr_reader :current_trial
106
106
  # Always true for a deleted object
107
107
  attr_reader :deleted
108
108
 
@@ -159,8 +159,8 @@ module Stripe
159
159
  def self.inner_class_types
160
160
  @inner_class_types = {
161
161
  billing_thresholds: BillingThresholds,
162
- trial: Trial,
163
162
  current_trial: CurrentTrial,
163
+ trial: Trial,
164
164
  }
165
165
  end
166
166
 
@@ -4,7 +4,7 @@
4
4
  module Stripe
5
5
  # A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes.
6
6
  #
7
- # Related guide: [Subscription schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules)
7
+ # Related guide: [Subscription schedules](https://docs.stripe.com/billing/subscriptions/subscription-schedules)
8
8
  class SubscriptionSchedule < APIResource
9
9
  extend Stripe::APIOperations::Create
10
10
  extend Stripe::APIOperations::List
@@ -44,6 +44,89 @@ module Stripe
44
44
  end
45
45
  end
46
46
 
47
+ class BillingSchedule < ::Stripe::StripeObject
48
+ class AppliesTo < ::Stripe::StripeObject
49
+ # The billing schedule will apply to the subscription item with the given price ID.
50
+ attr_reader :price
51
+ # Controls which subscription items the billing schedule applies to.
52
+ attr_reader :type
53
+
54
+ def self.inner_class_types
55
+ @inner_class_types = {}
56
+ end
57
+
58
+ def self.field_remappings
59
+ @field_remappings = {}
60
+ end
61
+ end
62
+
63
+ class BillFrom < ::Stripe::StripeObject
64
+ # The time the billing schedule applies from.
65
+ attr_reader :computed_timestamp
66
+ # Use a precise Unix timestamp for prebilling to start. Must be earlier than `bill_until`.
67
+ attr_reader :timestamp
68
+ # Describes how the billing schedule determines the start date. Possible values are `timestamp`.
69
+ attr_reader :type
70
+
71
+ def self.inner_class_types
72
+ @inner_class_types = {}
73
+ end
74
+
75
+ def self.field_remappings
76
+ @field_remappings = {}
77
+ end
78
+ end
79
+
80
+ class BillUntil < ::Stripe::StripeObject
81
+ class Duration < ::Stripe::StripeObject
82
+ # Specifies billing duration. Either `day`, `week`, `month` or `year`.
83
+ attr_reader :interval
84
+ # The multiplier applied to the interval.
85
+ attr_reader :interval_count
86
+
87
+ def self.inner_class_types
88
+ @inner_class_types = {}
89
+ end
90
+
91
+ def self.field_remappings
92
+ @field_remappings = {}
93
+ end
94
+ end
95
+ # The timestamp the billing schedule will apply until.
96
+ attr_reader :computed_timestamp
97
+ # Specifies the billing period.
98
+ attr_reader :duration
99
+ # If specified, the billing schedule will apply until the specified timestamp.
100
+ attr_reader :timestamp
101
+ # Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.
102
+ attr_reader :type
103
+
104
+ def self.inner_class_types
105
+ @inner_class_types = { duration: Duration }
106
+ end
107
+
108
+ def self.field_remappings
109
+ @field_remappings = {}
110
+ end
111
+ end
112
+ # Specifies which subscription items the billing schedule applies to.
113
+ attr_reader :applies_to
114
+ # Specifies the start of the billing period.
115
+ attr_reader :bill_from
116
+ # Specifies the end of billing period.
117
+ attr_reader :bill_until
118
+ # Unique identifier for the billing schedule.
119
+ attr_reader :key
120
+
121
+ def self.inner_class_types
122
+ @inner_class_types = { applies_to: AppliesTo, bill_from: BillFrom, bill_until: BillUntil }
123
+ end
124
+
125
+ def self.field_remappings
126
+ @field_remappings = {}
127
+ end
128
+ end
129
+
47
130
  class CurrentPhase < ::Stripe::StripeObject
48
131
  # The end of this phase of the subscription schedule.
49
132
  attr_reader :end_date
@@ -155,7 +238,7 @@ module Stripe
155
238
  attr_reader :application_fee_percent
156
239
  # Attribute for field automatic_tax
157
240
  attr_reader :automatic_tax
158
- # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
241
+ # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://docs.stripe.com/billing/subscriptions/billing-cycle).
159
242
  attr_reader :billing_cycle_anchor
160
243
  # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
161
244
  attr_reader :billing_thresholds
@@ -169,10 +252,10 @@ module Stripe
169
252
  attr_reader :invoice_settings
170
253
  # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details.
171
254
  attr_reader :on_behalf_of
172
- # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
173
- attr_reader :transfer_data
174
255
  # Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
175
256
  attr_reader :phase_effective_at
257
+ # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
258
+ attr_reader :transfer_data
176
259
 
177
260
  def self.inner_class_types
178
261
  @inner_class_types = {
@@ -299,7 +382,7 @@ module Stripe
299
382
  end
300
383
  # The stackable discounts that will be applied to the item.
301
384
  attr_reader :discounts
302
- # 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.
385
+ # Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
303
386
  attr_reader :metadata
304
387
  # Attribute for field period
305
388
  attr_reader :period
@@ -494,7 +577,7 @@ module Stripe
494
577
  attr_reader :billing_thresholds
495
578
  # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.
496
579
  attr_reader :discounts
497
- # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered.
580
+ # Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered.
498
581
  attr_reader :metadata
499
582
  # ID of the plan to which the customer should be subscribed.
500
583
  attr_reader :plan
@@ -580,7 +663,7 @@ module Stripe
580
663
  attr_reader :application_fee_percent
581
664
  # Attribute for field automatic_tax
582
665
  attr_reader :automatic_tax
583
- # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
666
+ # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://docs.stripe.com/billing/subscriptions/billing-cycle).
584
667
  attr_reader :billing_cycle_anchor
585
668
  # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
586
669
  attr_reader :billing_thresholds
@@ -596,17 +679,19 @@ module Stripe
596
679
  attr_reader :description
597
680
  # The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts.
598
681
  attr_reader :discounts
682
+ # Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
683
+ attr_reader :effective_at
599
684
  # The end of this phase of the subscription schedule.
600
685
  attr_reader :end_date
601
686
  # The invoice settings applicable during this phase.
602
687
  attr_reader :invoice_settings
603
688
  # Subscription items to configure the subscription to during this phase of the subscription schedule.
604
689
  attr_reader :items
605
- # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`.
690
+ # Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`.
606
691
  attr_reader :metadata
607
692
  # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details.
608
693
  attr_reader :on_behalf_of
609
- # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
694
+ # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://docs.stripe.com/billing/subscriptions/pause-payment).
610
695
  attr_reader :pause_collection
611
696
  # When transitioning phases, controls how prorations are handled (if any). Possible values are `create_prorations`, `none`, and `always_invoice`.
612
697
  attr_reader :proration_behavior
@@ -620,8 +705,6 @@ module Stripe
620
705
  attr_reader :trial_end
621
706
  # Settings related to any trials on the subscription during this phase.
622
707
  attr_reader :trial_settings
623
- # Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
624
- attr_reader :effective_at
625
708
 
626
709
  def self.inner_class_types
627
710
  @inner_class_types = {
@@ -660,95 +743,14 @@ module Stripe
660
743
  @field_remappings = {}
661
744
  end
662
745
  end
663
-
664
- class BillingSchedule < ::Stripe::StripeObject
665
- class AppliesTo < ::Stripe::StripeObject
666
- # The billing schedule will apply to the subscription item with the given price ID.
667
- attr_reader :price
668
- # Controls which subscription items the billing schedule applies to.
669
- attr_reader :type
670
-
671
- def self.inner_class_types
672
- @inner_class_types = {}
673
- end
674
-
675
- def self.field_remappings
676
- @field_remappings = {}
677
- end
678
- end
679
-
680
- class BillFrom < ::Stripe::StripeObject
681
- # The time the billing schedule applies from.
682
- attr_reader :computed_timestamp
683
- # Use a precise Unix timestamp for prebilling to start. Must be earlier than `bill_until`.
684
- attr_reader :timestamp
685
- # Describes how the billing schedule determines the start date. Possible values are `timestamp`.
686
- attr_reader :type
687
-
688
- def self.inner_class_types
689
- @inner_class_types = {}
690
- end
691
-
692
- def self.field_remappings
693
- @field_remappings = {}
694
- end
695
- end
696
-
697
- class BillUntil < ::Stripe::StripeObject
698
- class Duration < ::Stripe::StripeObject
699
- # Specifies billing duration. Either `day`, `week`, `month` or `year`.
700
- attr_reader :interval
701
- # The multiplier applied to the interval.
702
- attr_reader :interval_count
703
-
704
- def self.inner_class_types
705
- @inner_class_types = {}
706
- end
707
-
708
- def self.field_remappings
709
- @field_remappings = {}
710
- end
711
- end
712
- # The timestamp the billing schedule will apply until.
713
- attr_reader :computed_timestamp
714
- # Specifies the billing period.
715
- attr_reader :duration
716
- # If specified, the billing schedule will apply until the specified timestamp.
717
- attr_reader :timestamp
718
- # Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.
719
- attr_reader :type
720
-
721
- def self.inner_class_types
722
- @inner_class_types = { duration: Duration }
723
- end
724
-
725
- def self.field_remappings
726
- @field_remappings = {}
727
- end
728
- end
729
- # Specifies which subscription items the billing schedule applies to.
730
- attr_reader :applies_to
731
- # Specifies the start of the billing period.
732
- attr_reader :bill_from
733
- # Specifies the end of billing period.
734
- attr_reader :bill_until
735
- # Unique identifier for the billing schedule.
736
- attr_reader :key
737
-
738
- def self.inner_class_types
739
- @inner_class_types = { applies_to: AppliesTo, bill_from: BillFrom, bill_until: BillUntil }
740
- end
741
-
742
- def self.field_remappings
743
- @field_remappings = {}
744
- end
745
- end
746
746
  # ID of the Connect Application that created the schedule.
747
747
  attr_reader :application
748
748
  # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
749
749
  attr_reader :billing_behavior
750
750
  # The billing mode of the subscription.
751
751
  attr_reader :billing_mode
752
+ # Billing schedules for this subscription schedule.
753
+ attr_reader :billing_schedules
752
754
  # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.
753
755
  attr_reader :canceled_at
754
756
  # Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch.
@@ -769,9 +771,11 @@ module Stripe
769
771
  attr_reader :id
770
772
  # Details of the most recent price migration that failed for the subscription schedule.
771
773
  attr_reader :last_price_migration_error
774
+ # The most recent invoice this subscription schedule has generated.
775
+ attr_reader :latest_invoice
772
776
  # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
773
777
  attr_reader :livemode
774
- # 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.
778
+ # Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
775
779
  attr_reader :metadata
776
780
  # String representing the object's type. Objects of the same type share the same value.
777
781
  attr_reader :object
@@ -783,16 +787,12 @@ module Stripe
783
787
  attr_reader :released_at
784
788
  # ID of the subscription once managed by the subscription schedule (if it is released).
785
789
  attr_reader :released_subscription
786
- # The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules).
790
+ # The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://docs.stripe.com/billing/subscriptions/subscription-schedules).
787
791
  attr_reader :status
788
792
  # ID of the subscription managed by the subscription schedule.
789
793
  attr_reader :subscription
790
794
  # ID of the test clock this subscription schedule belongs to.
791
795
  attr_reader :test_clock
792
- # Billing schedules for this subscription schedule.
793
- attr_reader :billing_schedules
794
- # The most recent invoice this subscription schedule has generated.
795
- attr_reader :latest_invoice
796
796
 
797
797
  # Amends an existing subscription schedule.
798
798
  def amend(params = {}, opts = {})
@@ -887,12 +887,12 @@ module Stripe
887
887
  def self.inner_class_types
888
888
  @inner_class_types = {
889
889
  billing_mode: BillingMode,
890
+ billing_schedules: BillingSchedule,
890
891
  current_phase: CurrentPhase,
891
892
  default_settings: DefaultSettings,
892
893
  last_price_migration_error: LastPriceMigrationError,
893
894
  phases: Phase,
894
895
  prebilling: Prebilling,
895
- billing_schedules: BillingSchedule,
896
896
  }
897
897
  end
898
898
 
@@ -12,7 +12,7 @@ module Stripe
12
12
 
13
13
  class TaxTransactionAttempt < ::Stripe::StripeObject
14
14
  class Committed < ::Stripe::StripeObject
15
- # The [Tax Transaction](https://stripe.com/docs/api/tax/transaction/object)
15
+ # The [Tax Transaction](https://docs.stripe.com/api/tax/transaction/object)
16
16
  attr_reader :transaction
17
17
 
18
18
  def self.inner_class_types
@@ -53,13 +53,13 @@ module Stripe
53
53
  @field_remappings = {}
54
54
  end
55
55
  end
56
- # The [Tax Calculation](https://stripe.com/docs/api/tax/calculations/object) that was included in PaymentIntent.
56
+ # The [Tax Calculation](https://docs.stripe.com/api/tax/calculations/object) that was included in PaymentIntent.
57
57
  attr_reader :calculation
58
58
  # Unique identifier for the object.
59
59
  attr_reader :id
60
60
  # String representing the object's type. Objects of the same type share the same value.
61
61
  attr_reader :object
62
- # The [PaymentIntent](https://stripe.com/docs/api/payment_intents/object) that this Tax Association is tracking.
62
+ # The [PaymentIntent](https://docs.stripe.com/api/payment_intents/object) that this Tax Association is tracking.
63
63
  attr_reader :payment_intent
64
64
  # Information about the tax transactions linked to this payment intent
65
65
  attr_reader :tax_transaction_attempts