stripe 15.3.0 → 15.4.0.pre.beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (589) hide show
  1. checksums.yaml +4 -4
  2. data/API_VERSION +1 -1
  3. data/CHANGELOG.md +1594 -667
  4. data/README.md +1 -1
  5. data/VERSION +1 -1
  6. data/lib/stripe/api_requestor.rb +28 -0
  7. data/lib/stripe/api_version.rb +1 -2
  8. data/lib/stripe/errors.rb +54 -0
  9. data/lib/stripe/event_types.rb +98 -0
  10. data/lib/stripe/events/v2_core_account_closed_event.rb +21 -0
  11. data/lib/stripe/events/v2_core_account_created_event.rb +21 -0
  12. data/lib/stripe/events/v2_core_account_including_configuration_customer_capability_status_updated_event.rb +23 -0
  13. data/lib/stripe/events/v2_core_account_including_configuration_customer_updated_event.rb +21 -0
  14. data/lib/stripe/events/v2_core_account_including_configuration_merchant_capability_status_updated_event.rb +23 -0
  15. data/lib/stripe/events/v2_core_account_including_configuration_merchant_updated_event.rb +21 -0
  16. data/lib/stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event.rb +23 -0
  17. data/lib/stripe/events/v2_core_account_including_configuration_recipient_updated_event.rb +21 -0
  18. data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +21 -0
  19. data/lib/stripe/events/v2_core_account_including_identity_updated_event.rb +21 -0
  20. data/lib/stripe/events/v2_core_account_including_requirements_updated_event.rb +21 -0
  21. data/lib/stripe/events/v2_core_account_link_completed_event.rb +13 -0
  22. data/lib/stripe/events/v2_core_account_person_created_event.rb +23 -0
  23. data/lib/stripe/events/v2_core_account_person_deleted_event.rb +23 -0
  24. data/lib/stripe/events/v2_core_account_person_updated_event.rb +23 -0
  25. data/lib/stripe/events/v2_core_account_updated_event.rb +21 -0
  26. data/lib/stripe/events/v2_money_management_adjustment_created_event.rb +21 -0
  27. data/lib/stripe/events/v2_money_management_financial_account_created_event.rb +21 -0
  28. data/lib/stripe/events/v2_money_management_financial_account_updated_event.rb +21 -0
  29. data/lib/stripe/events/v2_money_management_financial_address_activated_event.rb +21 -0
  30. data/lib/stripe/events/v2_money_management_financial_address_failed_event.rb +21 -0
  31. data/lib/stripe/events/v2_money_management_inbound_transfer_available_event.rb +23 -0
  32. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +21 -0
  33. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +21 -0
  34. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +21 -0
  35. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +21 -0
  36. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +21 -0
  37. data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +21 -0
  38. data/lib/stripe/events/v2_money_management_outbound_payment_created_event.rb +21 -0
  39. data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +21 -0
  40. data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +21 -0
  41. data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +21 -0
  42. data/lib/stripe/events/v2_money_management_outbound_payment_updated_event.rb +21 -0
  43. data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +21 -0
  44. data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +21 -0
  45. data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +21 -0
  46. data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +21 -0
  47. data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +21 -0
  48. data/lib/stripe/events/v2_money_management_outbound_transfer_updated_event.rb +21 -0
  49. data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +23 -0
  50. data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +21 -0
  51. data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +21 -0
  52. data/lib/stripe/events/v2_money_management_received_credit_succeeded_event.rb +21 -0
  53. data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +21 -0
  54. data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +21 -0
  55. data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +21 -0
  56. data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +21 -0
  57. data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +21 -0
  58. data/lib/stripe/events/v2_money_management_transaction_created_event.rb +21 -0
  59. data/lib/stripe/events/v2_money_management_transaction_updated_event.rb +21 -0
  60. data/lib/stripe/events/v2_off_session_payment_requires_capture_event.rb +21 -0
  61. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_failed_event.rb +21 -0
  62. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb +21 -0
  63. data/lib/stripe/events/v2_payments_off_session_payment_canceled_event.rb +21 -0
  64. data/lib/stripe/events/v2_payments_off_session_payment_created_event.rb +21 -0
  65. data/lib/stripe/events/v2_payments_off_session_payment_failed_event.rb +21 -0
  66. data/lib/stripe/events/v2_payments_off_session_payment_succeeded_event.rb +21 -0
  67. data/lib/stripe/object_types.rb +50 -0
  68. data/lib/stripe/resources/account.rb +653 -1
  69. data/lib/stripe/resources/account_notice.rb +123 -0
  70. data/lib/stripe/resources/account_session.rb +256 -1
  71. data/lib/stripe/resources/balance_settings.rb +105 -0
  72. data/lib/stripe/resources/billing/credit_balance_summary.rb +2 -0
  73. data/lib/stripe/resources/billing/credit_balance_transaction.rb +4 -0
  74. data/lib/stripe/resources/billing/credit_grant.rb +10 -0
  75. data/lib/stripe/resources/billing_portal/session.rb +6 -0
  76. data/lib/stripe/resources/capital/financing_offer.rb +179 -0
  77. data/lib/stripe/resources/capital/financing_summary.rb +55 -0
  78. data/lib/stripe/resources/capital/financing_transaction.rb +114 -0
  79. data/lib/stripe/resources/card.rb +2 -0
  80. data/lib/stripe/resources/cash_balance.rb +2 -0
  81. data/lib/stripe/resources/charge.rb +1538 -0
  82. data/lib/stripe/resources/checkout/session.rb +326 -2
  83. data/lib/stripe/resources/confirmation_token.rb +170 -0
  84. data/lib/stripe/resources/coupon.rb +30 -1
  85. data/lib/stripe/resources/credit_note.rb +6 -0
  86. data/lib/stripe/resources/credit_note_line_item.rb +9 -0
  87. data/lib/stripe/resources/customer.rb +2 -0
  88. data/lib/stripe/resources/customer_balance_transaction.rb +2 -0
  89. data/lib/stripe/resources/customer_cash_balance_transaction.rb +2 -0
  90. data/lib/stripe/resources/customer_session.rb +6 -1
  91. data/lib/stripe/resources/discount.rb +2 -0
  92. data/lib/stripe/resources/dispute.rb +2 -0
  93. data/lib/stripe/resources/event.rb +31 -0
  94. data/lib/stripe/resources/financial_connections/account.rb +22 -1
  95. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +27 -0
  96. data/lib/stripe/resources/financial_connections/institution.rb +92 -0
  97. data/lib/stripe/resources/financial_connections/session.rb +62 -2
  98. data/lib/stripe/resources/fx_quote.rb +184 -0
  99. data/lib/stripe/resources/identity/verification_session.rb +10 -0
  100. data/lib/stripe/resources/invoice.rb +1063 -16
  101. data/lib/stripe/resources/invoice_item.rb +78 -2
  102. data/lib/stripe/resources/invoice_line_item.rb +55 -1
  103. data/lib/stripe/resources/invoice_payment.rb +2 -53
  104. data/lib/stripe/resources/issuing/cardholder.rb +2 -1
  105. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +602 -0
  106. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +82 -0
  107. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +86 -0
  108. data/lib/stripe/resources/issuing/settlement.rb +53 -0
  109. data/lib/stripe/resources/issuing/transaction.rb +6 -0
  110. data/lib/stripe/resources/line_item.rb +37 -0
  111. data/lib/stripe/resources/mandate.rb +24 -0
  112. data/lib/stripe/resources/margin.rb +115 -0
  113. data/lib/stripe/resources/order.rb +2958 -0
  114. data/lib/stripe/resources/payment_attempt_record.rb +1099 -0
  115. data/lib/stripe/resources/payment_intent.rb +8540 -3584
  116. data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +72 -0
  117. data/lib/stripe/resources/payment_method.rb +192 -1
  118. data/lib/stripe/resources/payment_method_configuration.rb +295 -0
  119. data/lib/stripe/resources/payment_record.rb +1628 -0
  120. data/lib/stripe/resources/payout.rb +6 -0
  121. data/lib/stripe/resources/price.rb +30 -0
  122. data/lib/stripe/resources/privacy/redaction_job.rb +298 -0
  123. data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +33 -0
  124. data/lib/stripe/resources/promotion_code.rb +10 -0
  125. data/lib/stripe/resources/quote.rb +2038 -7
  126. data/lib/stripe/resources/quote_line.rb +274 -0
  127. data/lib/stripe/resources/quote_preview_invoice.rb +663 -0
  128. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +371 -0
  129. data/lib/stripe/resources/refund.rb +9 -0
  130. data/lib/stripe/resources/setup_attempt.rb +21 -0
  131. data/lib/stripe/resources/setup_intent.rb +578 -9
  132. data/lib/stripe/resources/source.rb +29 -0
  133. data/lib/stripe/resources/subscription.rb +288 -9
  134. data/lib/stripe/resources/subscription_item.rb +84 -3
  135. data/lib/stripe/resources/subscription_schedule.rb +1007 -10
  136. data/lib/stripe/resources/tax/association.rb +66 -0
  137. data/lib/stripe/resources/tax/form.rb +211 -0
  138. data/lib/stripe/resources/tax_id.rb +12 -2
  139. data/lib/stripe/resources/terminal/reader.rb +8 -0
  140. data/lib/stripe/resources/terminal/reader_collected_data.rb +31 -0
  141. data/lib/stripe/resources/transfer.rb +6 -0
  142. data/lib/stripe/resources/treasury/financial_account.rb +22 -3
  143. data/lib/stripe/resources/treasury/financial_account_features.rb +2 -0
  144. data/lib/stripe/resources/treasury/outbound_transfer.rb +37 -0
  145. data/lib/stripe/resources/treasury/received_credit.rb +38 -1
  146. data/lib/stripe/resources/treasury/received_debit.rb +40 -1
  147. data/lib/stripe/resources/v2/core/account.rb +1755 -0
  148. data/lib/stripe/resources/v2/core/account_link.rb +56 -0
  149. data/lib/stripe/resources/v2/core/person.rb +276 -0
  150. data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +74 -0
  151. data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +39 -0
  152. data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +20 -0
  153. data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +22 -0
  154. data/lib/stripe/resources/v2/money_management/adjustment.rb +51 -0
  155. data/lib/stripe/resources/v2/money_management/financial_account.rb +58 -0
  156. data/lib/stripe/resources/v2/money_management/financial_address.rb +68 -0
  157. data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +94 -0
  158. data/lib/stripe/resources/v2/money_management/outbound_payment.rb +129 -0
  159. data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +82 -0
  160. data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +45 -0
  161. data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +117 -0
  162. data/lib/stripe/resources/v2/money_management/payout_method.rb +75 -0
  163. data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +49 -0
  164. data/lib/stripe/resources/v2/money_management/received_credit.rb +122 -0
  165. data/lib/stripe/resources/v2/money_management/received_debit.rb +84 -0
  166. data/lib/stripe/resources/v2/money_management/transaction.rb +78 -0
  167. data/lib/stripe/resources/v2/money_management/transaction_entry.rb +68 -0
  168. data/lib/stripe/resources/v2/payments/off_session_payment.rb +72 -0
  169. data/lib/stripe/resources.rb +104 -0
  170. data/lib/stripe/services/account_notice_service.rb +101 -0
  171. data/lib/stripe/services/account_service.rb +562 -1
  172. data/lib/stripe/services/account_session_service.rb +226 -1
  173. data/lib/stripe/services/balance_settings_service.rb +96 -0
  174. data/lib/stripe/services/billing/credit_balance_summary_service.rb +4 -1
  175. data/lib/stripe/services/billing/credit_balance_transaction_service.rb +4 -0
  176. data/lib/stripe/services/billing/credit_grant_service.rb +8 -0
  177. data/lib/stripe/services/billing_portal/session_service.rb +4 -0
  178. data/lib/stripe/services/capital/financing_offer_service.rb +112 -0
  179. data/lib/stripe/services/capital/financing_summary_service.rb +28 -0
  180. data/lib/stripe/services/capital/financing_transaction_service.rb +79 -0
  181. data/lib/stripe/services/capital_service.rb +15 -0
  182. data/lib/stripe/services/charge_service.rb +1418 -0
  183. data/lib/stripe/services/checkout/session_service.rb +243 -2
  184. data/lib/stripe/services/coupon_service.rb +17 -1
  185. data/lib/stripe/services/credit_note_service.rb +4 -0
  186. data/lib/stripe/services/customer_session_service.rb +4 -1
  187. data/{rbi/stripe/services/account_external_account_service.rbi → lib/stripe/services/external_account_service.rb} +135 -122
  188. data/{rbi/stripe/services/tax/transaction_line_item_service.rbi → lib/stripe/services/financial_connections/account_inferred_balance_service.rb} +21 -17
  189. data/lib/stripe/services/financial_connections/account_service.rb +7 -2
  190. data/{rbi/stripe/services/climate/supplier_service.rbi → lib/stripe/services/financial_connections/institution_service.rb} +36 -25
  191. data/lib/stripe/services/financial_connections/session_service.rb +34 -2
  192. data/lib/stripe/services/financial_connections_service.rb +2 -1
  193. data/lib/stripe/services/fx_quote_service.rb +123 -0
  194. data/lib/stripe/services/identity/verification_session_service.rb +8 -0
  195. data/lib/stripe/services/invoice_item_service.rb +74 -2
  196. data/lib/stripe/services/invoice_line_item_service.rb +33 -1
  197. data/lib/stripe/services/invoice_service.rb +1014 -16
  198. data/lib/stripe/services/issuing/cardholder_service.rb +2 -1
  199. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +504 -0
  200. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +66 -0
  201. data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +83 -0
  202. data/lib/stripe/services/issuing/transaction_service.rb +4 -0
  203. data/lib/stripe/services/issuing_service.rb +5 -1
  204. data/lib/stripe/services/margin_service.rb +119 -0
  205. data/{rbi/stripe/services/source_transaction_service.rbi → lib/stripe/services/order_line_item_service.rb} +20 -16
  206. data/lib/stripe/services/order_service.rb +2388 -0
  207. data/lib/stripe/services/payment_attempt_record_service.rb +49 -0
  208. data/{rbi/stripe/services/quote_line_item_service.rbi → lib/stripe/services/payment_intent_amount_details_line_item_service.rb} +20 -16
  209. data/lib/stripe/services/payment_intent_service.rb +4879 -391
  210. data/lib/stripe/services/payment_method_configuration_service.rb +210 -0
  211. data/lib/stripe/services/payment_method_service.rb +120 -1
  212. data/lib/stripe/services/payment_record_service.rb +542 -0
  213. data/lib/stripe/services/payout_service.rb +4 -0
  214. data/lib/stripe/services/price_service.rb +19 -0
  215. data/lib/stripe/services/privacy/redaction_job_service.rb +240 -0
  216. data/{rbi/stripe/services/tax/calculation_line_item_service.rbi → lib/stripe/services/privacy/redaction_job_validation_error_service.rb} +21 -17
  217. data/lib/stripe/services/privacy_service.rb +13 -0
  218. data/lib/stripe/services/promotion_code_service.rb +8 -0
  219. data/{rbi/stripe/services/credit_note_line_item_service.rbi → lib/stripe/services/quote_line_service.rb} +20 -16
  220. data/{rbi/stripe/services/payment_link_line_item_service.rbi → lib/stripe/services/quote_preview_invoice_service.rb} +20 -16
  221. data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +35 -0
  222. data/lib/stripe/services/quote_service.rb +1723 -8
  223. data/lib/stripe/services/setup_intent_service.rb +538 -9
  224. data/lib/stripe/services/subscription_item_service.rb +75 -3
  225. data/lib/stripe/services/subscription_schedule_service.rb +911 -10
  226. data/lib/stripe/services/subscription_service.rb +249 -9
  227. data/lib/stripe/services/tax/association_service.rb +31 -0
  228. data/lib/stripe/services/tax/form_service.rb +100 -0
  229. data/lib/stripe/services/tax_id_service.rb +8 -2
  230. data/lib/stripe/services/tax_service.rb +3 -1
  231. data/lib/stripe/services/terminal/reader_collected_data_service.rb +28 -0
  232. data/lib/stripe/services/terminal_service.rb +2 -1
  233. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +97 -0
  234. data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +25 -1
  235. data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +25 -1
  236. data/lib/stripe/services/transfer_service.rb +4 -0
  237. data/lib/stripe/services/treasury/financial_account_features_service.rb +4 -1
  238. data/lib/stripe/services/treasury/financial_account_service.rb +16 -2
  239. data/lib/stripe/services/treasury/outbound_transfer_service.rb +24 -0
  240. data/lib/stripe/services/v1_services.rb +11 -2
  241. data/lib/stripe/services/v2/core/account_link_service.rb +76 -0
  242. data/lib/stripe/services/v2/core/account_service.rb +4170 -0
  243. data/lib/stripe/services/v2/core/accounts/person_service.rb +1045 -0
  244. data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +130 -0
  245. data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +107 -0
  246. data/lib/stripe/services/v2/core/vault_service.rb +18 -0
  247. data/lib/stripe/services/v2/core_service.rb +4 -1
  248. data/lib/stripe/services/v2/money_management/adjustment_service.rb +74 -0
  249. data/lib/stripe/services/v2/money_management/financial_account_service.rb +43 -0
  250. data/lib/stripe/services/v2/money_management/financial_address_service.rb +82 -0
  251. data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +125 -0
  252. data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +95 -0
  253. data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +199 -0
  254. data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +235 -0
  255. data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +172 -0
  256. data/lib/stripe/services/v2/money_management/payout_method_service.rb +90 -0
  257. data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +32 -0
  258. data/lib/stripe/services/v2/money_management/received_credit_service.rb +70 -0
  259. data/lib/stripe/services/v2/money_management/received_debit_service.rb +43 -0
  260. data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +69 -0
  261. data/lib/stripe/services/v2/money_management/transaction_service.rb +73 -0
  262. data/lib/stripe/services/v2/money_management_service.rb +31 -0
  263. data/lib/stripe/services/v2/payment_service.rb +15 -0
  264. data/lib/stripe/services/v2/payments/off_session_payment_service.rb +137 -0
  265. data/lib/stripe/services/v2/test_helper_service.rb +15 -0
  266. data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +49 -0
  267. data/lib/stripe/services/v2_services.rb +4 -1
  268. data/lib/stripe/services.rb +53 -1
  269. data/lib/stripe/stripe_configuration.rb +3 -1
  270. data/lib/stripe/stripe_object.rb +1 -1
  271. data/lib/stripe/util.rb +7 -1
  272. data/lib/stripe/version.rb +1 -1
  273. data/lib/stripe.rb +53 -0
  274. data/rbi/stripe.rbi +193855 -0
  275. data/stripe.gemspec +4 -1
  276. metadata +161 -324
  277. data/lib/stripe/services/invoice_payment_service.rb +0 -83
  278. data/rbi/stripe/resources/account.rbi +0 -4995
  279. data/rbi/stripe/resources/account_link.rbi +0 -74
  280. data/rbi/stripe/resources/account_session.rbi +0 -1013
  281. data/rbi/stripe/resources/apple_pay_domain.rbi +0 -88
  282. data/rbi/stripe/resources/application.rbi +0 -20
  283. data/rbi/stripe/resources/application_fee.rbi +0 -118
  284. data/rbi/stripe/resources/application_fee_refund.rbi +0 -37
  285. data/rbi/stripe/resources/apps/secret.rbi +0 -195
  286. data/rbi/stripe/resources/balance.rbi +0 -235
  287. data/rbi/stripe/resources/balance_transaction.rbi +0 -147
  288. data/rbi/stripe/resources/bank_account.rbi +0 -127
  289. data/rbi/stripe/resources/billing/alert.rbi +0 -201
  290. data/rbi/stripe/resources/billing/alert_triggered.rbi +0 -28
  291. data/rbi/stripe/resources/billing/credit_balance_summary.rbi +0 -63
  292. data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +0 -147
  293. data/rbi/stripe/resources/billing/credit_grant.rbi +0 -291
  294. data/rbi/stripe/resources/billing/meter.rbi +0 -226
  295. data/rbi/stripe/resources/billing/meter_event.rbi +0 -64
  296. data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +0 -64
  297. data/rbi/stripe/resources/billing/meter_event_summary.rbi +0 -35
  298. data/rbi/stripe/resources/billing_portal/configuration.rbi +0 -645
  299. data/rbi/stripe/resources/billing_portal/session.rbi +0 -345
  300. data/rbi/stripe/resources/capability.rbi +0 -125
  301. data/rbi/stripe/resources/card.rbi +0 -125
  302. data/rbi/stripe/resources/cash_balance.rbi +0 -32
  303. data/rbi/stripe/resources/charge.rbi +0 -2086
  304. data/rbi/stripe/resources/checkout/session.rbi +0 -4060
  305. data/rbi/stripe/resources/climate/order.rbi +0 -245
  306. data/rbi/stripe/resources/climate/product.rbi +0 -75
  307. data/rbi/stripe/resources/climate/supplier.rbi +0 -72
  308. data/rbi/stripe/resources/confirmation_token.rbi +0 -1818
  309. data/rbi/stripe/resources/connect_collection_transfer.rbi +0 -26
  310. data/rbi/stripe/resources/country_spec.rbi +0 -85
  311. data/rbi/stripe/resources/coupon.rbi +0 -250
  312. data/rbi/stripe/resources/credit_note.rbi +0 -752
  313. data/rbi/stripe/resources/credit_note_line_item.rbi +0 -101
  314. data/rbi/stripe/resources/customer.rbi +0 -1005
  315. data/rbi/stripe/resources/customer_balance_transaction.rbi +0 -56
  316. data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +0 -151
  317. data/rbi/stripe/resources/customer_session.rbi +0 -200
  318. data/rbi/stripe/resources/discount.rbi +0 -53
  319. data/rbi/stripe/resources/dispute.rbi +0 -761
  320. data/rbi/stripe/resources/entitlements/active_entitlement.rbi +0 -58
  321. data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +0 -23
  322. data/rbi/stripe/resources/entitlements/feature.rbi +0 -117
  323. data/rbi/stripe/resources/ephemeral_key.rbi +0 -44
  324. data/rbi/stripe/resources/event.rbi +0 -149
  325. data/rbi/stripe/resources/exchange_rate.rbi +0 -66
  326. data/rbi/stripe/resources/file.rbi +0 -143
  327. data/rbi/stripe/resources/file_link.rbi +0 -141
  328. data/rbi/stripe/resources/financial_connections/account.rbi +0 -339
  329. data/rbi/stripe/resources/financial_connections/account_owner.rbi +0 -35
  330. data/rbi/stripe/resources/financial_connections/account_ownership.rbi +0 -23
  331. data/rbi/stripe/resources/financial_connections/session.rbi +0 -123
  332. data/rbi/stripe/resources/financial_connections/transaction.rbi +0 -124
  333. data/rbi/stripe/resources/forwarding/request.rbi +0 -216
  334. data/rbi/stripe/resources/funding_instructions.rbi +0 -437
  335. data/rbi/stripe/resources/identity/verification_report.rbi +0 -360
  336. data/rbi/stripe/resources/identity/verification_session.rbi +0 -564
  337. data/rbi/stripe/resources/invoice.rbi +0 -3842
  338. data/rbi/stripe/resources/invoice_item.rbi +0 -470
  339. data/rbi/stripe/resources/invoice_line_item.rbi +0 -432
  340. data/rbi/stripe/resources/invoice_payment.rbi +0 -121
  341. data/rbi/stripe/resources/invoice_rendering_template.rbi +0 -104
  342. data/rbi/stripe/resources/issuing/authorization.rbi +0 -1283
  343. data/rbi/stripe/resources/issuing/card.rbi +0 -741
  344. data/rbi/stripe/resources/issuing/cardholder.rbi +0 -744
  345. data/rbi/stripe/resources/issuing/dispute.rbi +0 -913
  346. data/rbi/stripe/resources/issuing/personalization_design.rbi +0 -338
  347. data/rbi/stripe/resources/issuing/physical_bundle.rbi +0 -79
  348. data/rbi/stripe/resources/issuing/token.rbi +0 -226
  349. data/rbi/stripe/resources/issuing/transaction.rbi +0 -1061
  350. data/rbi/stripe/resources/line_item.rbi +0 -72
  351. data/rbi/stripe/resources/login_link.rbi +0 -19
  352. data/rbi/stripe/resources/mandate.rbi +0 -191
  353. data/rbi/stripe/resources/payment_intent.rbi +0 -9987
  354. data/rbi/stripe/resources/payment_link.rbi +0 -1801
  355. data/rbi/stripe/resources/payment_method.rbi +0 -1770
  356. data/rbi/stripe/resources/payment_method_configuration.rbi +0 -3550
  357. data/rbi/stripe/resources/payment_method_domain.rbi +0 -228
  358. data/rbi/stripe/resources/payout.rbi +0 -300
  359. data/rbi/stripe/resources/person.rbi +0 -401
  360. data/rbi/stripe/resources/plan.rbi +0 -371
  361. data/rbi/stripe/resources/price.rbi +0 -694
  362. data/rbi/stripe/resources/product.rbi +0 -555
  363. data/rbi/stripe/resources/product_feature.rbi +0 -26
  364. data/rbi/stripe/resources/promotion_code.rbi +0 -261
  365. data/rbi/stripe/resources/quote.rbi +0 -1145
  366. data/rbi/stripe/resources/radar/early_fraud_warning.rbi +0 -98
  367. data/rbi/stripe/resources/radar/value_list.rbi +0 -168
  368. data/rbi/stripe/resources/radar/value_list_item.rbi +0 -129
  369. data/rbi/stripe/resources/refund.rbi +0 -523
  370. data/rbi/stripe/resources/reporting/report_run.rbi +0 -191
  371. data/rbi/stripe/resources/reporting/report_type.rbi +0 -57
  372. data/rbi/stripe/resources/reserve_transaction.rbi +0 -23
  373. data/rbi/stripe/resources/reversal.rbi +0 -51
  374. data/rbi/stripe/resources/review.rbi +0 -154
  375. data/rbi/stripe/resources/setup_attempt.rbi +0 -477
  376. data/rbi/stripe/resources/setup_intent.rbi +0 -3978
  377. data/rbi/stripe/resources/shipping_rate.rbi +0 -305
  378. data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +0 -75
  379. data/rbi/stripe/resources/source.rbi +0 -1496
  380. data/rbi/stripe/resources/source_mandate_notification.rbi +0 -77
  381. data/rbi/stripe/resources/source_transaction.rbi +0 -127
  382. data/rbi/stripe/resources/subscription.rbi +0 -2080
  383. data/rbi/stripe/resources/subscription_item.rbi +0 -404
  384. data/rbi/stripe/resources/subscription_schedule.rbi +0 -1645
  385. data/rbi/stripe/resources/tax/calculation.rbi +0 -478
  386. data/rbi/stripe/resources/tax/calculation_line_item.rbi +0 -91
  387. data/rbi/stripe/resources/tax/registration.rbi +0 -2732
  388. data/rbi/stripe/resources/tax/settings.rbi +0 -141
  389. data/rbi/stripe/resources/tax/transaction.rbi +0 -351
  390. data/rbi/stripe/resources/tax/transaction_line_item.rbi +0 -54
  391. data/rbi/stripe/resources/tax_code.rbi +0 -44
  392. data/rbi/stripe/resources/tax_deducted_at_source.rbi +0 -23
  393. data/rbi/stripe/resources/tax_id.rbi +0 -165
  394. data/rbi/stripe/resources/tax_rate.rbi +0 -239
  395. data/rbi/stripe/resources/terminal/configuration.rbi +0 -1387
  396. data/rbi/stripe/resources/terminal/connection_token.rbi +0 -37
  397. data/rbi/stripe/resources/terminal/location.rbi +0 -222
  398. data/rbi/stripe/resources/terminal/reader.rbi +0 -994
  399. data/rbi/stripe/resources/test_helpers/test_clock.rbi +0 -132
  400. data/rbi/stripe/resources/token.rbi +0 -1283
  401. data/rbi/stripe/resources/topup.rbi +0 -222
  402. data/rbi/stripe/resources/transfer.rbi +0 -199
  403. data/rbi/stripe/resources/treasury/credit_reversal.rbi +0 -119
  404. data/rbi/stripe/resources/treasury/debit_reversal.rbi +0 -131
  405. data/rbi/stripe/resources/treasury/financial_account.rbi +0 -869
  406. data/rbi/stripe/resources/treasury/financial_account_features.rbi +0 -260
  407. data/rbi/stripe/resources/treasury/inbound_transfer.rbi +0 -295
  408. data/rbi/stripe/resources/treasury/outbound_payment.rbi +0 -592
  409. data/rbi/stripe/resources/treasury/outbound_transfer.rbi +0 -431
  410. data/rbi/stripe/resources/treasury/received_credit.rbi +0 -302
  411. data/rbi/stripe/resources/treasury/received_debit.rbi +0 -256
  412. data/rbi/stripe/resources/treasury/transaction.rbi +0 -215
  413. data/rbi/stripe/resources/treasury/transaction_entry.rbi +0 -192
  414. data/rbi/stripe/resources/v2/amount.rbi +0 -14
  415. data/rbi/stripe/resources/v2/billing/meter_event.rbi +0 -37
  416. data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +0 -41
  417. data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +0 -31
  418. data/rbi/stripe/resources/v2/event.rbi +0 -48
  419. data/rbi/stripe/resources/v2/event_destination.rbi +0 -91
  420. data/rbi/stripe/resources/webhook_endpoint.rbi +0 -168
  421. data/rbi/stripe/services/account_capability_service.rbi +0 -51
  422. data/rbi/stripe/services/account_link_service.rbi +0 -58
  423. data/rbi/stripe/services/account_login_link_service.rbi +0 -22
  424. data/rbi/stripe/services/account_person_service.rbi +0 -1011
  425. data/rbi/stripe/services/account_service.rbi +0 -4281
  426. data/rbi/stripe/services/account_session_service.rbi +0 -646
  427. data/rbi/stripe/services/apple_pay_domain_service.rbi +0 -76
  428. data/rbi/stripe/services/application_fee_refund_service.rbi +0 -93
  429. data/rbi/stripe/services/application_fee_service.rbi +0 -78
  430. data/rbi/stripe/services/apps/secret_service.rbi +0 -151
  431. data/rbi/stripe/services/apps_service.rbi +0 -9
  432. data/rbi/stripe/services/balance_service.rbi +0 -21
  433. data/rbi/stripe/services/balance_transaction_service.rbi +0 -93
  434. data/rbi/stripe/services/billing/alert_service.rbi +0 -152
  435. data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +0 -68
  436. data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +0 -59
  437. data/rbi/stripe/services/billing/credit_grant_service.rbi +0 -211
  438. data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +0 -42
  439. data/rbi/stripe/services/billing/meter_event_service.rbi +0 -42
  440. data/rbi/stripe/services/billing/meter_event_summary_service.rbi +0 -54
  441. data/rbi/stripe/services/billing/meter_service.rbi +0 -163
  442. data/rbi/stripe/services/billing_portal/configuration_service.rbi +0 -511
  443. data/rbi/stripe/services/billing_portal/session_service.rbi +0 -204
  444. data/rbi/stripe/services/billing_portal_service.rbi +0 -10
  445. data/rbi/stripe/services/billing_service.rbi +0 -15
  446. data/rbi/stripe/services/charge_service.rbi +0 -448
  447. data/rbi/stripe/services/checkout/session_line_item_service.rbi +0 -33
  448. data/rbi/stripe/services/checkout/session_service.rbi +0 -2670
  449. data/rbi/stripe/services/checkout_service.rbi +0 -9
  450. data/rbi/stripe/services/climate/order_service.rbi +0 -142
  451. data/rbi/stripe/services/climate/product_service.rbi +0 -46
  452. data/rbi/stripe/services/climate_service.rbi +0 -11
  453. data/rbi/stripe/services/confirmation_token_service.rbi +0 -20
  454. data/rbi/stripe/services/country_spec_service.rbi +0 -44
  455. data/rbi/stripe/services/coupon_service.rbi +0 -194
  456. data/rbi/stripe/services/credit_note_preview_lines_service.rbi +0 -167
  457. data/rbi/stripe/services/credit_note_service.rbi +0 -415
  458. data/rbi/stripe/services/customer_balance_transaction_service.rbi +0 -92
  459. data/rbi/stripe/services/customer_cash_balance_service.rbi +0 -45
  460. data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +0 -44
  461. data/rbi/stripe/services/customer_funding_instructions_service.rbi +0 -59
  462. data/rbi/stripe/services/customer_payment_method_service.rbi +0 -57
  463. data/rbi/stripe/services/customer_payment_source_service.rbi +0 -232
  464. data/rbi/stripe/services/customer_service.rbi +0 -647
  465. data/rbi/stripe/services/customer_session_service.rbi +0 -116
  466. data/rbi/stripe/services/customer_tax_id_service.rbi +0 -70
  467. data/rbi/stripe/services/dispute_service.rbi +0 -424
  468. data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +0 -55
  469. data/rbi/stripe/services/entitlements/feature_service.rbi +0 -107
  470. data/rbi/stripe/services/entitlements_service.rbi +0 -10
  471. data/rbi/stripe/services/ephemeral_key_service.rbi +0 -53
  472. data/rbi/stripe/services/event_service.rbi +0 -83
  473. data/rbi/stripe/services/exchange_rate_service.rbi +0 -44
  474. data/rbi/stripe/services/file_link_service.rbi +0 -124
  475. data/rbi/stripe/services/file_service.rbi +0 -116
  476. data/rbi/stripe/services/financial_connections/account_owner_service.rbi +0 -42
  477. data/rbi/stripe/services/financial_connections/account_service.rbi +0 -133
  478. data/rbi/stripe/services/financial_connections/session_service.rbi +0 -88
  479. data/rbi/stripe/services/financial_connections/transaction_service.rbi +0 -92
  480. data/rbi/stripe/services/financial_connections_service.rbi +0 -11
  481. data/rbi/stripe/services/forwarding/request_service.rbi +0 -134
  482. data/rbi/stripe/services/forwarding_service.rbi +0 -9
  483. data/rbi/stripe/services/identity/verification_report_service.rbi +0 -87
  484. data/rbi/stripe/services/identity/verification_session_service.rbi +0 -339
  485. data/rbi/stripe/services/identity_service.rbi +0 -10
  486. data/rbi/stripe/services/invoice_item_service.rbi +0 -366
  487. data/rbi/stripe/services/invoice_line_item_service.rbi +0 -259
  488. data/rbi/stripe/services/invoice_payment_service.rbi +0 -71
  489. data/rbi/stripe/services/invoice_rendering_template_service.rbi +0 -82
  490. data/rbi/stripe/services/invoice_service.rbi +0 -3011
  491. data/rbi/stripe/services/issuing/authorization_service.rbi +0 -146
  492. data/rbi/stripe/services/issuing/card_service.rbi +0 -495
  493. data/rbi/stripe/services/issuing/cardholder_service.rbi +0 -587
  494. data/rbi/stripe/services/issuing/dispute_service.rbi +0 -707
  495. data/rbi/stripe/services/issuing/personalization_design_service.rbi +0 -243
  496. data/rbi/stripe/services/issuing/physical_bundle_service.rbi +0 -59
  497. data/rbi/stripe/services/issuing/token_service.rbi +0 -99
  498. data/rbi/stripe/services/issuing/transaction_service.rbi +0 -105
  499. data/rbi/stripe/services/issuing_service.rbi +0 -16
  500. data/rbi/stripe/services/mandate_service.rbi +0 -20
  501. data/rbi/stripe/services/payment_intent_service.rbi +0 -7989
  502. data/rbi/stripe/services/payment_link_service.rbi +0 -1352
  503. data/rbi/stripe/services/payment_method_configuration_service.rbi +0 -2487
  504. data/rbi/stripe/services/payment_method_domain_service.rbi +0 -112
  505. data/rbi/stripe/services/payment_method_service.rbi +0 -781
  506. data/rbi/stripe/services/payout_service.rbi +0 -205
  507. data/rbi/stripe/services/plan_service.rbi +0 -282
  508. data/rbi/stripe/services/price_service.rbi +0 -546
  509. data/rbi/stripe/services/product_feature_service.rbi +0 -67
  510. data/rbi/stripe/services/product_service.rbi +0 -477
  511. data/rbi/stripe/services/promotion_code_service.rbi +0 -214
  512. data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +0 -31
  513. data/rbi/stripe/services/quote_service.rbi +0 -699
  514. data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +0 -85
  515. data/rbi/stripe/services/radar/value_list_item_service.rbi +0 -109
  516. data/rbi/stripe/services/radar/value_list_service.rbi +0 -141
  517. data/rbi/stripe/services/radar_service.rbi +0 -11
  518. data/rbi/stripe/services/refund_service.rbi +0 -185
  519. data/rbi/stripe/services/reporting/report_run_service.rbi +0 -135
  520. data/rbi/stripe/services/reporting/report_type_service.rbi +0 -35
  521. data/rbi/stripe/services/reporting_service.rbi +0 -10
  522. data/rbi/stripe/services/review_service.rbi +0 -84
  523. data/rbi/stripe/services/setup_attempt_service.rbi +0 -65
  524. data/rbi/stripe/services/setup_intent_service.rbi +0 -3709
  525. data/rbi/stripe/services/shipping_rate_service.rbi +0 -241
  526. data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +0 -46
  527. data/rbi/stripe/services/sigma_service.rbi +0 -9
  528. data/rbi/stripe/services/source_service.rbi +0 -663
  529. data/rbi/stripe/services/subscription_item_service.rbi +0 -350
  530. data/rbi/stripe/services/subscription_schedule_service.rbi +0 -1301
  531. data/rbi/stripe/services/subscription_service.rbi +0 -1684
  532. data/rbi/stripe/services/tax/calculation_service.rbi +0 -234
  533. data/rbi/stripe/services/tax/registration_service.rbi +0 -1858
  534. data/rbi/stripe/services/tax/settings_service.rbi +0 -93
  535. data/rbi/stripe/services/tax/transaction_service.rbi +0 -146
  536. data/rbi/stripe/services/tax_code_service.rbi +0 -44
  537. data/rbi/stripe/services/tax_id_service.rbi +0 -110
  538. data/rbi/stripe/services/tax_rate_service.rbi +0 -185
  539. data/rbi/stripe/services/tax_service.rbi +0 -12
  540. data/rbi/stripe/services/terminal/configuration_service.rbi +0 -1118
  541. data/rbi/stripe/services/terminal/connection_token_service.rbi +0 -25
  542. data/rbi/stripe/services/terminal/location_service.rbi +0 -182
  543. data/rbi/stripe/services/terminal/reader_service.rbi +0 -540
  544. data/rbi/stripe/services/terminal_service.rbi +0 -12
  545. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +0 -746
  546. data/rbi/stripe/services/test_helpers/customer_service.rbi +0 -33
  547. data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +0 -848
  548. data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +0 -76
  549. data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +0 -69
  550. data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +0 -711
  551. data/rbi/stripe/services/test_helpers/issuing_service.rbi +0 -14
  552. data/rbi/stripe/services/test_helpers/refund_service.rbi +0 -22
  553. data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +0 -93
  554. data/rbi/stripe/services/test_helpers/terminal_service.rbi +0 -11
  555. data/rbi/stripe/services/test_helpers/test_clock_service.rbi +0 -90
  556. data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +0 -64
  557. data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +0 -125
  558. data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +0 -125
  559. data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +0 -87
  560. data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +0 -87
  561. data/rbi/stripe/services/test_helpers/treasury_service.rbi +0 -15
  562. data/rbi/stripe/services/test_helpers_service.rbi +0 -15
  563. data/rbi/stripe/services/token_service.rbi +0 -1257
  564. data/rbi/stripe/services/topup_service.rbi +0 -176
  565. data/rbi/stripe/services/transfer_reversal_service.rbi +0 -101
  566. data/rbi/stripe/services/transfer_service.rbi +0 -152
  567. data/rbi/stripe/services/treasury/credit_reversal_service.rbi +0 -84
  568. data/rbi/stripe/services/treasury/debit_reversal_service.rbi +0 -88
  569. data/rbi/stripe/services/treasury/financial_account_features_service.rbi +0 -198
  570. data/rbi/stripe/services/treasury/financial_account_service.rbi +0 -566
  571. data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +0 -117
  572. data/rbi/stripe/services/treasury/outbound_payment_service.rbi +0 -304
  573. data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +0 -157
  574. data/rbi/stripe/services/treasury/received_credit_service.rbi +0 -72
  575. data/rbi/stripe/services/treasury/received_debit_service.rbi +0 -59
  576. data/rbi/stripe/services/treasury/transaction_entry_service.rbi +0 -111
  577. data/rbi/stripe/services/treasury/transaction_service.rbi +0 -122
  578. data/rbi/stripe/services/treasury_service.rbi +0 -18
  579. data/rbi/stripe/services/v1_services.rbi +0 -77
  580. data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +0 -39
  581. data/rbi/stripe/services/v2/billing/meter_event_service.rbi +0 -42
  582. data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +0 -18
  583. data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +0 -55
  584. data/rbi/stripe/services/v2/billing_service.rbi +0 -14
  585. data/rbi/stripe/services/v2/core/event_destination_service.rbi +0 -192
  586. data/rbi/stripe/services/v2/core/event_service.rbi +0 -36
  587. data/rbi/stripe/services/v2/core_service.rbi +0 -12
  588. data/rbi/stripe/services/v2_services.rbi +0 -10
  589. data/rbi/stripe/services/webhook_endpoint_service.rbi +0 -129
@@ -22,6 +22,24 @@ module Stripe
22
22
  end
23
23
 
24
24
  class UpdateParams < Stripe::RequestParams
25
+ class AmountsDue < Stripe::RequestParams
26
+ # The amount in cents (or local equivalent).
27
+ attr_accessor :amount
28
+ # Number of days from when invoice is finalized until the payment is due.
29
+ attr_accessor :days_until_due
30
+ # An arbitrary string attached to the object. Often useful for displaying to users.
31
+ attr_accessor :description
32
+ # Date on which a payment plan’s payment is due.
33
+ attr_accessor :due_date
34
+
35
+ def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil)
36
+ @amount = amount
37
+ @days_until_due = days_until_due
38
+ @description = description
39
+ @due_date = due_date
40
+ end
41
+ end
42
+
25
43
  class AutomaticTax < Stripe::RequestParams
26
44
  class Liability < Stripe::RequestParams
27
45
  # The connected account being referenced when `type` is `account`.
@@ -58,16 +76,44 @@ module Stripe
58
76
  end
59
77
 
60
78
  class Discount < Stripe::RequestParams
79
+ class DiscountEnd < Stripe::RequestParams
80
+ class Duration < Stripe::RequestParams
81
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
82
+ attr_accessor :interval
83
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
84
+ attr_accessor :interval_count
85
+
86
+ def initialize(interval: nil, interval_count: nil)
87
+ @interval = interval
88
+ @interval_count = interval_count
89
+ end
90
+ end
91
+ # Time span for the redeemed discount.
92
+ attr_accessor :duration
93
+ # A precise Unix timestamp for the discount to end. Must be in the future.
94
+ attr_accessor :timestamp
95
+ # The type of calculation made to determine when the discount ends.
96
+ attr_accessor :type
97
+
98
+ def initialize(duration: nil, timestamp: nil, type: nil)
99
+ @duration = duration
100
+ @timestamp = timestamp
101
+ @type = type
102
+ end
103
+ end
61
104
  # ID of the coupon to create a new discount for.
62
105
  attr_accessor :coupon
63
106
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
64
107
  attr_accessor :discount
108
+ # Details to determine how long the discount should be applied for.
109
+ attr_accessor :discount_end
65
110
  # ID of the promotion code to create a new discount for.
66
111
  attr_accessor :promotion_code
67
112
 
68
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
113
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
69
114
  @coupon = coupon
70
115
  @discount = discount
116
+ @discount_end = discount_end
71
117
  @promotion_code = promotion_code
72
118
  end
73
119
  end
@@ -187,6 +233,7 @@ module Stripe
187
233
  end
188
234
  end
189
235
 
236
+ class IdBankTransfer < Stripe::RequestParams; end
190
237
  class Konbini < Stripe::RequestParams; end
191
238
  class SepaDebit < Stripe::RequestParams; end
192
239
 
@@ -195,9 +242,12 @@ module Stripe
195
242
  class Filters < Stripe::RequestParams
196
243
  # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
197
244
  attr_accessor :account_subcategories
245
+ # ID of the institution to use to filter for selectable accounts.
246
+ attr_accessor :institution
198
247
 
199
- def initialize(account_subcategories: nil)
248
+ def initialize(account_subcategories: nil, institution: nil)
200
249
  @account_subcategories = account_subcategories
250
+ @institution = institution
201
251
  end
202
252
  end
203
253
  # Provide filters for the linked accounts that the customer can select for the payment method.
@@ -231,6 +281,8 @@ module Stripe
231
281
  attr_accessor :card
232
282
  # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
233
283
  attr_accessor :customer_balance
284
+ # If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent.
285
+ attr_accessor :id_bank_transfer
234
286
  # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
235
287
  attr_accessor :konbini
236
288
  # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
@@ -243,6 +295,7 @@ module Stripe
243
295
  bancontact: nil,
244
296
  card: nil,
245
297
  customer_balance: nil,
298
+ id_bank_transfer: nil,
246
299
  konbini: nil,
247
300
  sepa_debit: nil,
248
301
  us_bank_account: nil
@@ -251,6 +304,7 @@ module Stripe
251
304
  @bancontact = bancontact
252
305
  @card = card
253
306
  @customer_balance = customer_balance
307
+ @id_bank_transfer = id_bank_transfer
254
308
  @konbini = konbini
255
309
  @sepa_debit = sepa_debit
256
310
  @us_bank_account = us_bank_account
@@ -462,6 +516,8 @@ module Stripe
462
516
  end
463
517
  # The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
464
518
  attr_accessor :account_tax_ids
519
+ # List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
520
+ attr_accessor :amounts_due
465
521
  # A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
466
522
  attr_accessor :application_fee_amount
467
523
  # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice.
@@ -476,6 +532,8 @@ module Stripe
476
532
  attr_accessor :custom_fields
477
533
  # The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices.
478
534
  attr_accessor :days_until_due
535
+ # The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
536
+ attr_accessor :default_margins
479
537
  # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
480
538
  attr_accessor :default_payment_method
481
539
  # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
@@ -517,6 +575,7 @@ module Stripe
517
575
 
518
576
  def initialize(
519
577
  account_tax_ids: nil,
578
+ amounts_due: nil,
520
579
  application_fee_amount: nil,
521
580
  auto_advance: nil,
522
581
  automatic_tax: nil,
@@ -524,6 +583,7 @@ module Stripe
524
583
  collection_method: nil,
525
584
  custom_fields: nil,
526
585
  days_until_due: nil,
586
+ default_margins: nil,
527
587
  default_payment_method: nil,
528
588
  default_source: nil,
529
589
  default_tax_rates: nil,
@@ -545,6 +605,7 @@ module Stripe
545
605
  transfer_data: nil
546
606
  )
547
607
  @account_tax_ids = account_tax_ids
608
+ @amounts_due = amounts_due
548
609
  @application_fee_amount = application_fee_amount
549
610
  @auto_advance = auto_advance
550
611
  @automatic_tax = automatic_tax
@@ -552,6 +613,7 @@ module Stripe
552
613
  @collection_method = collection_method
553
614
  @custom_fields = custom_fields
554
615
  @days_until_due = days_until_due
616
+ @default_margins = default_margins
555
617
  @default_payment_method = default_payment_method
556
618
  @default_source = default_source
557
619
  @default_tax_rates = default_tax_rates
@@ -616,6 +678,8 @@ module Stripe
616
678
  attr_accessor :created
617
679
  # Only return invoices for the customer specified by this customer ID.
618
680
  attr_accessor :customer
681
+ # Only return invoices for the account specified by this account ID.
682
+ attr_accessor :customer_account
619
683
  # Attribute for param field due_date
620
684
  attr_accessor :due_date
621
685
  # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
@@ -635,6 +699,7 @@ module Stripe
635
699
  collection_method: nil,
636
700
  created: nil,
637
701
  customer: nil,
702
+ customer_account: nil,
638
703
  due_date: nil,
639
704
  ending_before: nil,
640
705
  expand: nil,
@@ -646,6 +711,7 @@ module Stripe
646
711
  @collection_method = collection_method
647
712
  @created = created
648
713
  @customer = customer
714
+ @customer_account = customer_account
649
715
  @due_date = due_date
650
716
  @ending_before = ending_before
651
717
  @expand = expand
@@ -657,6 +723,24 @@ module Stripe
657
723
  end
658
724
 
659
725
  class CreateParams < Stripe::RequestParams
726
+ class AmountsDue < Stripe::RequestParams
727
+ # The amount in cents (or local equivalent).
728
+ attr_accessor :amount
729
+ # Number of days from when invoice is finalized until the payment is due.
730
+ attr_accessor :days_until_due
731
+ # An arbitrary string attached to the object. Often useful for displaying to users.
732
+ attr_accessor :description
733
+ # Date on which a payment plan’s payment is due.
734
+ attr_accessor :due_date
735
+
736
+ def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil)
737
+ @amount = amount
738
+ @days_until_due = days_until_due
739
+ @description = description
740
+ @due_date = due_date
741
+ end
742
+ end
743
+
660
744
  class AutomaticTax < Stripe::RequestParams
661
745
  class Liability < Stripe::RequestParams
662
746
  # The connected account being referenced when `type` is `account`.
@@ -693,16 +777,44 @@ module Stripe
693
777
  end
694
778
 
695
779
  class Discount < Stripe::RequestParams
780
+ class DiscountEnd < Stripe::RequestParams
781
+ class Duration < Stripe::RequestParams
782
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
783
+ attr_accessor :interval
784
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
785
+ attr_accessor :interval_count
786
+
787
+ def initialize(interval: nil, interval_count: nil)
788
+ @interval = interval
789
+ @interval_count = interval_count
790
+ end
791
+ end
792
+ # Time span for the redeemed discount.
793
+ attr_accessor :duration
794
+ # A precise Unix timestamp for the discount to end. Must be in the future.
795
+ attr_accessor :timestamp
796
+ # The type of calculation made to determine when the discount ends.
797
+ attr_accessor :type
798
+
799
+ def initialize(duration: nil, timestamp: nil, type: nil)
800
+ @duration = duration
801
+ @timestamp = timestamp
802
+ @type = type
803
+ end
804
+ end
696
805
  # ID of the coupon to create a new discount for.
697
806
  attr_accessor :coupon
698
807
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
699
808
  attr_accessor :discount
809
+ # Details to determine how long the discount should be applied for.
810
+ attr_accessor :discount_end
700
811
  # ID of the promotion code to create a new discount for.
701
812
  attr_accessor :promotion_code
702
813
 
703
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
814
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
704
815
  @coupon = coupon
705
816
  @discount = discount
817
+ @discount_end = discount_end
706
818
  @promotion_code = promotion_code
707
819
  end
708
820
  end
@@ -834,6 +946,7 @@ module Stripe
834
946
  end
835
947
  end
836
948
 
949
+ class IdBankTransfer < Stripe::RequestParams; end
837
950
  class Konbini < Stripe::RequestParams; end
838
951
  class SepaDebit < Stripe::RequestParams; end
839
952
 
@@ -842,9 +955,12 @@ module Stripe
842
955
  class Filters < Stripe::RequestParams
843
956
  # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
844
957
  attr_accessor :account_subcategories
958
+ # ID of the institution to use to filter for selectable accounts.
959
+ attr_accessor :institution
845
960
 
846
- def initialize(account_subcategories: nil)
961
+ def initialize(account_subcategories: nil, institution: nil)
847
962
  @account_subcategories = account_subcategories
963
+ @institution = institution
848
964
  end
849
965
  end
850
966
  # Provide filters for the linked accounts that the customer can select for the payment method.
@@ -878,6 +994,8 @@ module Stripe
878
994
  attr_accessor :card
879
995
  # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
880
996
  attr_accessor :customer_balance
997
+ # If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent.
998
+ attr_accessor :id_bank_transfer
881
999
  # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
882
1000
  attr_accessor :konbini
883
1001
  # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
@@ -890,6 +1008,7 @@ module Stripe
890
1008
  bancontact: nil,
891
1009
  card: nil,
892
1010
  customer_balance: nil,
1011
+ id_bank_transfer: nil,
893
1012
  konbini: nil,
894
1013
  sepa_debit: nil,
895
1014
  us_bank_account: nil
@@ -898,6 +1017,7 @@ module Stripe
898
1017
  @bancontact = bancontact
899
1018
  @card = card
900
1019
  @customer_balance = customer_balance
1020
+ @id_bank_transfer = id_bank_transfer
901
1021
  @konbini = konbini
902
1022
  @sepa_debit = sepa_debit
903
1023
  @us_bank_account = us_bank_account
@@ -1109,6 +1229,8 @@ module Stripe
1109
1229
  end
1110
1230
  # The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
1111
1231
  attr_accessor :account_tax_ids
1232
+ # List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
1233
+ attr_accessor :amounts_due
1112
1234
  # A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
1113
1235
  attr_accessor :application_fee_amount
1114
1236
  # 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.
@@ -1125,8 +1247,12 @@ module Stripe
1125
1247
  attr_accessor :custom_fields
1126
1248
  # The ID of the customer who will be billed.
1127
1249
  attr_accessor :customer
1250
+ # The ID of the account who will be billed.
1251
+ attr_accessor :customer_account
1128
1252
  # The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.
1129
1253
  attr_accessor :days_until_due
1254
+ # The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
1255
+ attr_accessor :default_margins
1130
1256
  # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
1131
1257
  attr_accessor :default_payment_method
1132
1258
  # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
@@ -1174,6 +1300,7 @@ module Stripe
1174
1300
 
1175
1301
  def initialize(
1176
1302
  account_tax_ids: nil,
1303
+ amounts_due: nil,
1177
1304
  application_fee_amount: nil,
1178
1305
  auto_advance: nil,
1179
1306
  automatic_tax: nil,
@@ -1182,7 +1309,9 @@ module Stripe
1182
1309
  currency: nil,
1183
1310
  custom_fields: nil,
1184
1311
  customer: nil,
1312
+ customer_account: nil,
1185
1313
  days_until_due: nil,
1314
+ default_margins: nil,
1186
1315
  default_payment_method: nil,
1187
1316
  default_source: nil,
1188
1317
  default_tax_rates: nil,
@@ -1207,6 +1336,7 @@ module Stripe
1207
1336
  transfer_data: nil
1208
1337
  )
1209
1338
  @account_tax_ids = account_tax_ids
1339
+ @amounts_due = amounts_due
1210
1340
  @application_fee_amount = application_fee_amount
1211
1341
  @auto_advance = auto_advance
1212
1342
  @automatic_tax = automatic_tax
@@ -1215,7 +1345,9 @@ module Stripe
1215
1345
  @currency = currency
1216
1346
  @custom_fields = custom_fields
1217
1347
  @customer = customer
1348
+ @customer_account = customer_account
1218
1349
  @days_until_due = days_until_due
1350
+ @default_margins = default_margins
1219
1351
  @default_payment_method = default_payment_method
1220
1352
  @default_source = default_source
1221
1353
  @default_tax_rates = default_tax_rates
@@ -1262,16 +1394,44 @@ module Stripe
1262
1394
  class AddLinesParams < Stripe::RequestParams
1263
1395
  class Line < Stripe::RequestParams
1264
1396
  class Discount < Stripe::RequestParams
1397
+ class DiscountEnd < Stripe::RequestParams
1398
+ class Duration < Stripe::RequestParams
1399
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1400
+ attr_accessor :interval
1401
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1402
+ attr_accessor :interval_count
1403
+
1404
+ def initialize(interval: nil, interval_count: nil)
1405
+ @interval = interval
1406
+ @interval_count = interval_count
1407
+ end
1408
+ end
1409
+ # Time span for the redeemed discount.
1410
+ attr_accessor :duration
1411
+ # A precise Unix timestamp for the discount to end. Must be in the future.
1412
+ attr_accessor :timestamp
1413
+ # The type of calculation made to determine when the discount ends.
1414
+ attr_accessor :type
1415
+
1416
+ def initialize(duration: nil, timestamp: nil, type: nil)
1417
+ @duration = duration
1418
+ @timestamp = timestamp
1419
+ @type = type
1420
+ end
1421
+ end
1265
1422
  # ID of the coupon to create a new discount for.
1266
1423
  attr_accessor :coupon
1267
1424
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
1268
1425
  attr_accessor :discount
1426
+ # Details to determine how long the discount should be applied for.
1427
+ attr_accessor :discount_end
1269
1428
  # ID of the promotion code to create a new discount for.
1270
1429
  attr_accessor :promotion_code
1271
1430
 
1272
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
1431
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1273
1432
  @coupon = coupon
1274
1433
  @discount = discount
1434
+ @discount_end = discount_end
1275
1435
  @promotion_code = promotion_code
1276
1436
  end
1277
1437
  end
@@ -1424,6 +1584,8 @@ module Stripe
1424
1584
  attr_accessor :discounts
1425
1585
  # ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created.
1426
1586
  attr_accessor :invoice_item
1587
+ # The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item.
1588
+ attr_accessor :margins
1427
1589
  # 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`.
1428
1590
  attr_accessor :metadata
1429
1591
  # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
@@ -1445,6 +1607,7 @@ module Stripe
1445
1607
  discountable: nil,
1446
1608
  discounts: nil,
1447
1609
  invoice_item: nil,
1610
+ margins: nil,
1448
1611
  metadata: nil,
1449
1612
  period: nil,
1450
1613
  price_data: nil,
@@ -1458,6 +1621,7 @@ module Stripe
1458
1621
  @discountable = discountable
1459
1622
  @discounts = discounts
1460
1623
  @invoice_item = invoice_item
1624
+ @margins = margins
1461
1625
  @metadata = metadata
1462
1626
  @period = period
1463
1627
  @price_data = price_data
@@ -1482,14 +1646,59 @@ module Stripe
1482
1646
  end
1483
1647
 
1484
1648
  class AttachPaymentParams < Stripe::RequestParams
1649
+ class PaymentRecordData < Stripe::RequestParams
1650
+ # The amount that was paid out of band.
1651
+ attr_accessor :amount
1652
+ # The currency that was paid out of band.
1653
+ attr_accessor :currency
1654
+ # 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`.
1655
+ attr_accessor :metadata
1656
+ # The type of money movement for this out of band payment record.
1657
+ attr_accessor :money_movement_type
1658
+ # The timestamp when this out of band payment was paid.
1659
+ attr_accessor :paid_at
1660
+ # The reference for this out of band payment record.
1661
+ attr_accessor :payment_reference
1662
+
1663
+ def initialize(
1664
+ amount: nil,
1665
+ currency: nil,
1666
+ metadata: nil,
1667
+ money_movement_type: nil,
1668
+ paid_at: nil,
1669
+ payment_reference: nil
1670
+ )
1671
+ @amount = amount
1672
+ @currency = currency
1673
+ @metadata = metadata
1674
+ @money_movement_type = money_movement_type
1675
+ @paid_at = paid_at
1676
+ @payment_reference = payment_reference
1677
+ end
1678
+ end
1679
+ # The portion of the `amount` on the PaymentIntent or out of band payment to apply to this invoice. It defaults to the entire amount.
1680
+ attr_accessor :amount_requested
1485
1681
  # Specifies which fields in the response should be expanded.
1486
1682
  attr_accessor :expand
1487
1683
  # The ID of the PaymentIntent to attach to the invoice.
1488
1684
  attr_accessor :payment_intent
1685
+ # The ID of the PaymentRecord to attach to the invoice.
1686
+ attr_accessor :payment_record
1687
+ # The PaymentRecord data for attaching an out of band payment to the invoice.
1688
+ attr_accessor :payment_record_data
1489
1689
 
1490
- def initialize(expand: nil, payment_intent: nil)
1690
+ def initialize(
1691
+ amount_requested: nil,
1692
+ expand: nil,
1693
+ payment_intent: nil,
1694
+ payment_record: nil,
1695
+ payment_record_data: nil
1696
+ )
1697
+ @amount_requested = amount_requested
1491
1698
  @expand = expand
1492
1699
  @payment_intent = payment_intent
1700
+ @payment_record = payment_record
1701
+ @payment_record_data = payment_record_data
1493
1702
  end
1494
1703
  end
1495
1704
 
@@ -1589,16 +1798,44 @@ module Stripe
1589
1798
  class UpdateLinesParams < Stripe::RequestParams
1590
1799
  class Line < Stripe::RequestParams
1591
1800
  class Discount < Stripe::RequestParams
1801
+ class DiscountEnd < Stripe::RequestParams
1802
+ class Duration < Stripe::RequestParams
1803
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1804
+ attr_accessor :interval
1805
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1806
+ attr_accessor :interval_count
1807
+
1808
+ def initialize(interval: nil, interval_count: nil)
1809
+ @interval = interval
1810
+ @interval_count = interval_count
1811
+ end
1812
+ end
1813
+ # Time span for the redeemed discount.
1814
+ attr_accessor :duration
1815
+ # A precise Unix timestamp for the discount to end. Must be in the future.
1816
+ attr_accessor :timestamp
1817
+ # The type of calculation made to determine when the discount ends.
1818
+ attr_accessor :type
1819
+
1820
+ def initialize(duration: nil, timestamp: nil, type: nil)
1821
+ @duration = duration
1822
+ @timestamp = timestamp
1823
+ @type = type
1824
+ end
1825
+ end
1592
1826
  # ID of the coupon to create a new discount for.
1593
1827
  attr_accessor :coupon
1594
1828
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
1595
1829
  attr_accessor :discount
1830
+ # Details to determine how long the discount should be applied for.
1831
+ attr_accessor :discount_end
1596
1832
  # ID of the promotion code to create a new discount for.
1597
1833
  attr_accessor :promotion_code
1598
1834
 
1599
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
1835
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1600
1836
  @coupon = coupon
1601
1837
  @discount = discount
1838
+ @discount_end = discount_end
1602
1839
  @promotion_code = promotion_code
1603
1840
  end
1604
1841
  end
@@ -1751,6 +1988,8 @@ module Stripe
1751
1988
  attr_accessor :discounts
1752
1989
  # ID of an existing line item on the invoice.
1753
1990
  attr_accessor :id
1991
+ # The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item.
1992
+ attr_accessor :margins
1754
1993
  # 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`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
1755
1994
  attr_accessor :metadata
1756
1995
  # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
@@ -1772,6 +2011,7 @@ module Stripe
1772
2011
  discountable: nil,
1773
2012
  discounts: nil,
1774
2013
  id: nil,
2014
+ margins: nil,
1775
2015
  metadata: nil,
1776
2016
  period: nil,
1777
2017
  price_data: nil,
@@ -1785,6 +2025,7 @@ module Stripe
1785
2025
  @discountable = discountable
1786
2026
  @discounts = discounts
1787
2027
  @id = id
2028
+ @margins = margins
1788
2029
  @metadata = metadata
1789
2030
  @period = period
1790
2031
  @price_data = price_data
@@ -1959,32 +2200,88 @@ module Stripe
1959
2200
  end
1960
2201
 
1961
2202
  class Discount < Stripe::RequestParams
2203
+ class DiscountEnd < Stripe::RequestParams
2204
+ class Duration < Stripe::RequestParams
2205
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2206
+ attr_accessor :interval
2207
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2208
+ attr_accessor :interval_count
2209
+
2210
+ def initialize(interval: nil, interval_count: nil)
2211
+ @interval = interval
2212
+ @interval_count = interval_count
2213
+ end
2214
+ end
2215
+ # Time span for the redeemed discount.
2216
+ attr_accessor :duration
2217
+ # A precise Unix timestamp for the discount to end. Must be in the future.
2218
+ attr_accessor :timestamp
2219
+ # The type of calculation made to determine when the discount ends.
2220
+ attr_accessor :type
2221
+
2222
+ def initialize(duration: nil, timestamp: nil, type: nil)
2223
+ @duration = duration
2224
+ @timestamp = timestamp
2225
+ @type = type
2226
+ end
2227
+ end
1962
2228
  # ID of the coupon to create a new discount for.
1963
2229
  attr_accessor :coupon
1964
2230
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
1965
2231
  attr_accessor :discount
2232
+ # Details to determine how long the discount should be applied for.
2233
+ attr_accessor :discount_end
1966
2234
  # ID of the promotion code to create a new discount for.
1967
2235
  attr_accessor :promotion_code
1968
2236
 
1969
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
2237
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1970
2238
  @coupon = coupon
1971
2239
  @discount = discount
2240
+ @discount_end = discount_end
1972
2241
  @promotion_code = promotion_code
1973
2242
  end
1974
2243
  end
1975
2244
 
1976
2245
  class InvoiceItem < Stripe::RequestParams
1977
2246
  class Discount < Stripe::RequestParams
2247
+ class DiscountEnd < Stripe::RequestParams
2248
+ class Duration < Stripe::RequestParams
2249
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2250
+ attr_accessor :interval
2251
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2252
+ attr_accessor :interval_count
2253
+
2254
+ def initialize(interval: nil, interval_count: nil)
2255
+ @interval = interval
2256
+ @interval_count = interval_count
2257
+ end
2258
+ end
2259
+ # Time span for the redeemed discount.
2260
+ attr_accessor :duration
2261
+ # A precise Unix timestamp for the discount to end. Must be in the future.
2262
+ attr_accessor :timestamp
2263
+ # The type of calculation made to determine when the discount ends.
2264
+ attr_accessor :type
2265
+
2266
+ def initialize(duration: nil, timestamp: nil, type: nil)
2267
+ @duration = duration
2268
+ @timestamp = timestamp
2269
+ @type = type
2270
+ end
2271
+ end
1978
2272
  # ID of the coupon to create a new discount for.
1979
2273
  attr_accessor :coupon
1980
2274
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
1981
2275
  attr_accessor :discount
2276
+ # Details to determine how long the discount should be applied for.
2277
+ attr_accessor :discount_end
1982
2278
  # ID of the promotion code to create a new discount for.
1983
2279
  attr_accessor :promotion_code
1984
2280
 
1985
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
2281
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1986
2282
  @coupon = coupon
1987
2283
  @discount = discount
2284
+ @discount_end = discount_end
1988
2285
  @promotion_code = promotion_code
1989
2286
  end
1990
2287
  end
@@ -2110,6 +2407,458 @@ module Stripe
2110
2407
  end
2111
2408
 
2112
2409
  class ScheduleDetails < Stripe::RequestParams
2410
+ class Amendment < Stripe::RequestParams
2411
+ class AmendmentEnd < Stripe::RequestParams
2412
+ class DiscountEnd < Stripe::RequestParams
2413
+ # The ID of a specific discount.
2414
+ attr_accessor :discount
2415
+
2416
+ def initialize(discount: nil)
2417
+ @discount = discount
2418
+ end
2419
+ end
2420
+
2421
+ class Duration < Stripe::RequestParams
2422
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2423
+ attr_accessor :interval
2424
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2425
+ attr_accessor :interval_count
2426
+
2427
+ def initialize(interval: nil, interval_count: nil)
2428
+ @interval = interval
2429
+ @interval_count = interval_count
2430
+ end
2431
+ end
2432
+ # Use the `end` time of a given discount.
2433
+ attr_accessor :discount_end
2434
+ # Time span for the amendment starting from the `amendment_start`.
2435
+ attr_accessor :duration
2436
+ # A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
2437
+ attr_accessor :timestamp
2438
+ # Select one of three ways to pass the `amendment_end`.
2439
+ attr_accessor :type
2440
+
2441
+ def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
2442
+ @discount_end = discount_end
2443
+ @duration = duration
2444
+ @timestamp = timestamp
2445
+ @type = type
2446
+ end
2447
+ end
2448
+
2449
+ class AmendmentStart < Stripe::RequestParams
2450
+ class AmendmentEnd < Stripe::RequestParams
2451
+ # The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array.
2452
+ attr_accessor :index
2453
+
2454
+ def initialize(index: nil)
2455
+ @index = index
2456
+ end
2457
+ end
2458
+
2459
+ class DiscountEnd < Stripe::RequestParams
2460
+ # The ID of a specific discount.
2461
+ attr_accessor :discount
2462
+
2463
+ def initialize(discount: nil)
2464
+ @discount = discount
2465
+ end
2466
+ end
2467
+ # Details of another amendment in the same array, immediately after which this amendment should begin.
2468
+ attr_accessor :amendment_end
2469
+ # Use the `end` time of a given discount.
2470
+ attr_accessor :discount_end
2471
+ # A precise Unix timestamp for the amendment to start.
2472
+ attr_accessor :timestamp
2473
+ # Select one of three ways to pass the `amendment_start`.
2474
+ attr_accessor :type
2475
+
2476
+ def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
2477
+ @amendment_end = amendment_end
2478
+ @discount_end = discount_end
2479
+ @timestamp = timestamp
2480
+ @type = type
2481
+ end
2482
+ end
2483
+
2484
+ class DiscountAction < Stripe::RequestParams
2485
+ class Add < Stripe::RequestParams
2486
+ class DiscountEnd < Stripe::RequestParams
2487
+ # The type of calculation made to determine when the discount ends.
2488
+ attr_accessor :type
2489
+
2490
+ def initialize(type: nil)
2491
+ @type = type
2492
+ end
2493
+ end
2494
+ # The coupon code to redeem.
2495
+ attr_accessor :coupon
2496
+ # An ID of an existing discount for a coupon that was already redeemed.
2497
+ attr_accessor :discount
2498
+ # Details to determine how long the discount should be applied for.
2499
+ attr_accessor :discount_end
2500
+ # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array.
2501
+ attr_accessor :index
2502
+ # The promotion code to redeem.
2503
+ attr_accessor :promotion_code
2504
+
2505
+ def initialize(
2506
+ coupon: nil,
2507
+ discount: nil,
2508
+ discount_end: nil,
2509
+ index: nil,
2510
+ promotion_code: nil
2511
+ )
2512
+ @coupon = coupon
2513
+ @discount = discount
2514
+ @discount_end = discount_end
2515
+ @index = index
2516
+ @promotion_code = promotion_code
2517
+ end
2518
+ end
2519
+
2520
+ class Remove < Stripe::RequestParams
2521
+ # The coupon code to remove from the `discounts` array.
2522
+ attr_accessor :coupon
2523
+ # The ID of a discount to remove from the `discounts` array.
2524
+ attr_accessor :discount
2525
+ # The ID of a promotion code to remove from the `discounts` array.
2526
+ attr_accessor :promotion_code
2527
+
2528
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
2529
+ @coupon = coupon
2530
+ @discount = discount
2531
+ @promotion_code = promotion_code
2532
+ end
2533
+ end
2534
+
2535
+ class Set < Stripe::RequestParams
2536
+ # The coupon code to replace the `discounts` array with.
2537
+ attr_accessor :coupon
2538
+ # An ID of an existing discount to replace the `discounts` array with.
2539
+ attr_accessor :discount
2540
+ # An ID of an existing promotion code to replace the `discounts` array with.
2541
+ attr_accessor :promotion_code
2542
+
2543
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
2544
+ @coupon = coupon
2545
+ @discount = discount
2546
+ @promotion_code = promotion_code
2547
+ end
2548
+ end
2549
+ # Details of the discount to add.
2550
+ attr_accessor :add
2551
+ # Details of the discount to remove.
2552
+ attr_accessor :remove
2553
+ # Details of the discount to replace the existing discounts with.
2554
+ attr_accessor :set
2555
+ # Determines the type of discount action.
2556
+ attr_accessor :type
2557
+
2558
+ def initialize(add: nil, remove: nil, set: nil, type: nil)
2559
+ @add = add
2560
+ @remove = remove
2561
+ @set = set
2562
+ @type = type
2563
+ end
2564
+ end
2565
+
2566
+ class ItemAction < Stripe::RequestParams
2567
+ class Add < Stripe::RequestParams
2568
+ class Discount < Stripe::RequestParams
2569
+ class DiscountEnd < Stripe::RequestParams
2570
+ class Duration < Stripe::RequestParams
2571
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2572
+ attr_accessor :interval
2573
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2574
+ attr_accessor :interval_count
2575
+
2576
+ def initialize(interval: nil, interval_count: nil)
2577
+ @interval = interval
2578
+ @interval_count = interval_count
2579
+ end
2580
+ end
2581
+ # Time span for the redeemed discount.
2582
+ attr_accessor :duration
2583
+ # A precise Unix timestamp for the discount to end. Must be in the future.
2584
+ attr_accessor :timestamp
2585
+ # The type of calculation made to determine when the discount ends.
2586
+ attr_accessor :type
2587
+
2588
+ def initialize(duration: nil, timestamp: nil, type: nil)
2589
+ @duration = duration
2590
+ @timestamp = timestamp
2591
+ @type = type
2592
+ end
2593
+ end
2594
+ # ID of the coupon to create a new discount for.
2595
+ attr_accessor :coupon
2596
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
2597
+ attr_accessor :discount
2598
+ # Details to determine how long the discount should be applied for.
2599
+ attr_accessor :discount_end
2600
+ # ID of the promotion code to create a new discount for.
2601
+ attr_accessor :promotion_code
2602
+
2603
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
2604
+ @coupon = coupon
2605
+ @discount = discount
2606
+ @discount_end = discount_end
2607
+ @promotion_code = promotion_code
2608
+ end
2609
+ end
2610
+
2611
+ class Trial < Stripe::RequestParams
2612
+ # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
2613
+ attr_accessor :converts_to
2614
+ # Determines the type of trial for this item.
2615
+ attr_accessor :type
2616
+
2617
+ def initialize(converts_to: nil, type: nil)
2618
+ @converts_to = converts_to
2619
+ @type = type
2620
+ end
2621
+ end
2622
+ # The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
2623
+ attr_accessor :discounts
2624
+ # 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`.
2625
+ attr_accessor :metadata
2626
+ # The ID of the price object.
2627
+ attr_accessor :price
2628
+ # Quantity for this item.
2629
+ attr_accessor :quantity
2630
+ # The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`.
2631
+ attr_accessor :tax_rates
2632
+ # Options that configure the trial on the subscription item.
2633
+ attr_accessor :trial
2634
+
2635
+ def initialize(
2636
+ discounts: nil,
2637
+ metadata: nil,
2638
+ price: nil,
2639
+ quantity: nil,
2640
+ tax_rates: nil,
2641
+ trial: nil
2642
+ )
2643
+ @discounts = discounts
2644
+ @metadata = metadata
2645
+ @price = price
2646
+ @quantity = quantity
2647
+ @tax_rates = tax_rates
2648
+ @trial = trial
2649
+ end
2650
+ end
2651
+
2652
+ class Remove < Stripe::RequestParams
2653
+ # ID of a price to remove.
2654
+ attr_accessor :price
2655
+
2656
+ def initialize(price: nil)
2657
+ @price = price
2658
+ end
2659
+ end
2660
+
2661
+ class Set < Stripe::RequestParams
2662
+ class Discount < Stripe::RequestParams
2663
+ class DiscountEnd < Stripe::RequestParams
2664
+ class Duration < Stripe::RequestParams
2665
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2666
+ attr_accessor :interval
2667
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2668
+ attr_accessor :interval_count
2669
+
2670
+ def initialize(interval: nil, interval_count: nil)
2671
+ @interval = interval
2672
+ @interval_count = interval_count
2673
+ end
2674
+ end
2675
+ # Time span for the redeemed discount.
2676
+ attr_accessor :duration
2677
+ # A precise Unix timestamp for the discount to end. Must be in the future.
2678
+ attr_accessor :timestamp
2679
+ # The type of calculation made to determine when the discount ends.
2680
+ attr_accessor :type
2681
+
2682
+ def initialize(duration: nil, timestamp: nil, type: nil)
2683
+ @duration = duration
2684
+ @timestamp = timestamp
2685
+ @type = type
2686
+ end
2687
+ end
2688
+ # ID of the coupon to create a new discount for.
2689
+ attr_accessor :coupon
2690
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
2691
+ attr_accessor :discount
2692
+ # Details to determine how long the discount should be applied for.
2693
+ attr_accessor :discount_end
2694
+ # ID of the promotion code to create a new discount for.
2695
+ attr_accessor :promotion_code
2696
+
2697
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
2698
+ @coupon = coupon
2699
+ @discount = discount
2700
+ @discount_end = discount_end
2701
+ @promotion_code = promotion_code
2702
+ end
2703
+ end
2704
+
2705
+ class Trial < Stripe::RequestParams
2706
+ # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
2707
+ attr_accessor :converts_to
2708
+ # Determines the type of trial for this item.
2709
+ attr_accessor :type
2710
+
2711
+ def initialize(converts_to: nil, type: nil)
2712
+ @converts_to = converts_to
2713
+ @type = type
2714
+ end
2715
+ end
2716
+ # If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`.
2717
+ attr_accessor :discounts
2718
+ # If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`.
2719
+ attr_accessor :metadata
2720
+ # The ID of the price object.
2721
+ attr_accessor :price
2722
+ # If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`.
2723
+ attr_accessor :quantity
2724
+ # If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`.
2725
+ attr_accessor :tax_rates
2726
+ # If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`.
2727
+ attr_accessor :trial
2728
+
2729
+ def initialize(
2730
+ discounts: nil,
2731
+ metadata: nil,
2732
+ price: nil,
2733
+ quantity: nil,
2734
+ tax_rates: nil,
2735
+ trial: nil
2736
+ )
2737
+ @discounts = discounts
2738
+ @metadata = metadata
2739
+ @price = price
2740
+ @quantity = quantity
2741
+ @tax_rates = tax_rates
2742
+ @trial = trial
2743
+ end
2744
+ end
2745
+ # Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item.
2746
+ attr_accessor :add
2747
+ # Details of the subscription item to remove.
2748
+ attr_accessor :remove
2749
+ # Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item.
2750
+ attr_accessor :set
2751
+ # Determines the type of item action.
2752
+ attr_accessor :type
2753
+
2754
+ def initialize(add: nil, remove: nil, set: nil, type: nil)
2755
+ @add = add
2756
+ @remove = remove
2757
+ @set = set
2758
+ @type = type
2759
+ end
2760
+ end
2761
+
2762
+ class MetadataAction < Stripe::RequestParams
2763
+ # Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
2764
+ attr_accessor :add
2765
+ # Keys to remove from schedule phase metadata.
2766
+ attr_accessor :remove
2767
+ # Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
2768
+ attr_accessor :set
2769
+ # Select one of three ways to update phase-level `metadata` on subscription schedules.
2770
+ attr_accessor :type
2771
+
2772
+ def initialize(add: nil, remove: nil, set: nil, type: nil)
2773
+ @add = add
2774
+ @remove = remove
2775
+ @set = set
2776
+ @type = type
2777
+ end
2778
+ end
2779
+
2780
+ class SetPauseCollection < Stripe::RequestParams
2781
+ class Set < Stripe::RequestParams
2782
+ # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
2783
+ attr_accessor :behavior
2784
+
2785
+ def initialize(behavior: nil)
2786
+ @behavior = behavior
2787
+ end
2788
+ end
2789
+ # Details of the pause_collection behavior to apply to the amendment.
2790
+ attr_accessor :set
2791
+ # Determines the type of the pause_collection amendment.
2792
+ attr_accessor :type
2793
+
2794
+ def initialize(set: nil, type: nil)
2795
+ @set = set
2796
+ @type = type
2797
+ end
2798
+ end
2799
+
2800
+ class TrialSettings < Stripe::RequestParams
2801
+ class EndBehavior < Stripe::RequestParams
2802
+ # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
2803
+ attr_accessor :prorate_up_front
2804
+
2805
+ def initialize(prorate_up_front: nil)
2806
+ @prorate_up_front = prorate_up_front
2807
+ end
2808
+ end
2809
+ # Defines how the subscription should behave when a trial ends.
2810
+ attr_accessor :end_behavior
2811
+
2812
+ def initialize(end_behavior: nil)
2813
+ @end_behavior = end_behavior
2814
+ end
2815
+ end
2816
+ # Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment.
2817
+ attr_accessor :amendment_end
2818
+ # Details to identify the earliest timestamp where the proposed change should take effect.
2819
+ attr_accessor :amendment_start
2820
+ # For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment.
2821
+ attr_accessor :billing_cycle_anchor
2822
+ # Changes to the coupons being redeemed or discounts being applied during the amendment time span.
2823
+ attr_accessor :discount_actions
2824
+ # Changes to the subscription items during the amendment time span.
2825
+ attr_accessor :item_actions
2826
+ # Instructions for how to modify phase metadata
2827
+ attr_accessor :metadata_actions
2828
+ # Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`.
2829
+ attr_accessor :proration_behavior
2830
+ # Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
2831
+ attr_accessor :set_pause_collection
2832
+ # Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
2833
+ attr_accessor :set_schedule_end
2834
+ # Settings related to subscription trials.
2835
+ attr_accessor :trial_settings
2836
+
2837
+ def initialize(
2838
+ amendment_end: nil,
2839
+ amendment_start: nil,
2840
+ billing_cycle_anchor: nil,
2841
+ discount_actions: nil,
2842
+ item_actions: nil,
2843
+ metadata_actions: nil,
2844
+ proration_behavior: nil,
2845
+ set_pause_collection: nil,
2846
+ set_schedule_end: nil,
2847
+ trial_settings: nil
2848
+ )
2849
+ @amendment_end = amendment_end
2850
+ @amendment_start = amendment_start
2851
+ @billing_cycle_anchor = billing_cycle_anchor
2852
+ @discount_actions = discount_actions
2853
+ @item_actions = item_actions
2854
+ @metadata_actions = metadata_actions
2855
+ @proration_behavior = proration_behavior
2856
+ @set_pause_collection = set_pause_collection
2857
+ @set_schedule_end = set_schedule_end
2858
+ @trial_settings = trial_settings
2859
+ end
2860
+ end
2861
+
2113
2862
  class BillingMode < Stripe::RequestParams
2114
2863
  # Attribute for param field type
2115
2864
  attr_accessor :type
@@ -2122,16 +2871,44 @@ module Stripe
2122
2871
  class Phase < Stripe::RequestParams
2123
2872
  class AddInvoiceItem < Stripe::RequestParams
2124
2873
  class Discount < Stripe::RequestParams
2874
+ class DiscountEnd < Stripe::RequestParams
2875
+ class Duration < Stripe::RequestParams
2876
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2877
+ attr_accessor :interval
2878
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2879
+ attr_accessor :interval_count
2880
+
2881
+ def initialize(interval: nil, interval_count: nil)
2882
+ @interval = interval
2883
+ @interval_count = interval_count
2884
+ end
2885
+ end
2886
+ # Time span for the redeemed discount.
2887
+ attr_accessor :duration
2888
+ # A precise Unix timestamp for the discount to end. Must be in the future.
2889
+ attr_accessor :timestamp
2890
+ # The type of calculation made to determine when the discount ends.
2891
+ attr_accessor :type
2892
+
2893
+ def initialize(duration: nil, timestamp: nil, type: nil)
2894
+ @duration = duration
2895
+ @timestamp = timestamp
2896
+ @type = type
2897
+ end
2898
+ end
2125
2899
  # ID of the coupon to create a new discount for.
2126
2900
  attr_accessor :coupon
2127
2901
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
2128
2902
  attr_accessor :discount
2903
+ # Details to determine how long the discount should be applied for.
2904
+ attr_accessor :discount_end
2129
2905
  # ID of the promotion code to create a new discount for.
2130
2906
  attr_accessor :promotion_code
2131
2907
 
2132
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
2908
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
2133
2909
  @coupon = coupon
2134
2910
  @discount = discount
2911
+ @discount_end = discount_end
2135
2912
  @promotion_code = promotion_code
2136
2913
  end
2137
2914
  end
@@ -2224,16 +3001,44 @@ module Stripe
2224
3001
  end
2225
3002
 
2226
3003
  class Discount < Stripe::RequestParams
3004
+ class DiscountEnd < Stripe::RequestParams
3005
+ class Duration < Stripe::RequestParams
3006
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3007
+ attr_accessor :interval
3008
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3009
+ attr_accessor :interval_count
3010
+
3011
+ def initialize(interval: nil, interval_count: nil)
3012
+ @interval = interval
3013
+ @interval_count = interval_count
3014
+ end
3015
+ end
3016
+ # Time span for the redeemed discount.
3017
+ attr_accessor :duration
3018
+ # A precise Unix timestamp for the discount to end. Must be in the future.
3019
+ attr_accessor :timestamp
3020
+ # The type of calculation made to determine when the discount ends.
3021
+ attr_accessor :type
3022
+
3023
+ def initialize(duration: nil, timestamp: nil, type: nil)
3024
+ @duration = duration
3025
+ @timestamp = timestamp
3026
+ @type = type
3027
+ end
3028
+ end
2227
3029
  # ID of the coupon to create a new discount for.
2228
3030
  attr_accessor :coupon
2229
3031
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
2230
3032
  attr_accessor :discount
3033
+ # Details to determine how long the discount should be applied for.
3034
+ attr_accessor :discount_end
2231
3035
  # ID of the promotion code to create a new discount for.
2232
3036
  attr_accessor :promotion_code
2233
3037
 
2234
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
3038
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
2235
3039
  @coupon = coupon
2236
3040
  @discount = discount
3041
+ @discount_end = discount_end
2237
3042
  @promotion_code = promotion_code
2238
3043
  end
2239
3044
  end
@@ -2275,16 +3080,44 @@ module Stripe
2275
3080
  end
2276
3081
 
2277
3082
  class Discount < Stripe::RequestParams
3083
+ class DiscountEnd < Stripe::RequestParams
3084
+ class Duration < Stripe::RequestParams
3085
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3086
+ attr_accessor :interval
3087
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3088
+ attr_accessor :interval_count
3089
+
3090
+ def initialize(interval: nil, interval_count: nil)
3091
+ @interval = interval
3092
+ @interval_count = interval_count
3093
+ end
3094
+ end
3095
+ # Time span for the redeemed discount.
3096
+ attr_accessor :duration
3097
+ # A precise Unix timestamp for the discount to end. Must be in the future.
3098
+ attr_accessor :timestamp
3099
+ # The type of calculation made to determine when the discount ends.
3100
+ attr_accessor :type
3101
+
3102
+ def initialize(duration: nil, timestamp: nil, type: nil)
3103
+ @duration = duration
3104
+ @timestamp = timestamp
3105
+ @type = type
3106
+ end
3107
+ end
2278
3108
  # ID of the coupon to create a new discount for.
2279
3109
  attr_accessor :coupon
2280
3110
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
2281
3111
  attr_accessor :discount
3112
+ # Details to determine how long the discount should be applied for.
3113
+ attr_accessor :discount_end
2282
3114
  # ID of the promotion code to create a new discount for.
2283
3115
  attr_accessor :promotion_code
2284
3116
 
2285
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
3117
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
2286
3118
  @coupon = coupon
2287
3119
  @discount = discount
3120
+ @discount_end = discount_end
2288
3121
  @promotion_code = promotion_code
2289
3122
  end
2290
3123
  end
@@ -2330,6 +3163,18 @@ module Stripe
2330
3163
  @unit_amount_decimal = unit_amount_decimal
2331
3164
  end
2332
3165
  end
3166
+
3167
+ class Trial < Stripe::RequestParams
3168
+ # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
3169
+ attr_accessor :converts_to
3170
+ # Determines the type of trial for this item.
3171
+ attr_accessor :type
3172
+
3173
+ def initialize(converts_to: nil, type: nil)
3174
+ @converts_to = converts_to
3175
+ @type = type
3176
+ end
3177
+ end
2333
3178
  # 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.
2334
3179
  attr_accessor :billing_thresholds
2335
3180
  # The coupons to redeem into discounts for the subscription item.
@@ -2346,6 +3191,8 @@ module Stripe
2346
3191
  attr_accessor :quantity
2347
3192
  # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
2348
3193
  attr_accessor :tax_rates
3194
+ # Options that configure the trial on the subscription item.
3195
+ attr_accessor :trial
2349
3196
 
2350
3197
  def initialize(
2351
3198
  billing_thresholds: nil,
@@ -2355,7 +3202,8 @@ module Stripe
2355
3202
  price: nil,
2356
3203
  price_data: nil,
2357
3204
  quantity: nil,
2358
- tax_rates: nil
3205
+ tax_rates: nil,
3206
+ trial: nil
2359
3207
  )
2360
3208
  @billing_thresholds = billing_thresholds
2361
3209
  @discounts = discounts
@@ -2365,6 +3213,16 @@ module Stripe
2365
3213
  @price_data = price_data
2366
3214
  @quantity = quantity
2367
3215
  @tax_rates = tax_rates
3216
+ @trial = trial
3217
+ end
3218
+ end
3219
+
3220
+ class PauseCollection < Stripe::RequestParams
3221
+ # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
3222
+ attr_accessor :behavior
3223
+
3224
+ def initialize(behavior: nil)
3225
+ @behavior = behavior
2368
3226
  end
2369
3227
  end
2370
3228
 
@@ -2379,6 +3237,23 @@ module Stripe
2379
3237
  @destination = destination
2380
3238
  end
2381
3239
  end
3240
+
3241
+ class TrialSettings < Stripe::RequestParams
3242
+ class EndBehavior < Stripe::RequestParams
3243
+ # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
3244
+ attr_accessor :prorate_up_front
3245
+
3246
+ def initialize(prorate_up_front: nil)
3247
+ @prorate_up_front = prorate_up_front
3248
+ end
3249
+ end
3250
+ # Defines how the subscription should behave when a trial ends.
3251
+ attr_accessor :end_behavior
3252
+
3253
+ def initialize(end_behavior: nil)
3254
+ @end_behavior = end_behavior
3255
+ end
3256
+ end
2382
3257
  # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
2383
3258
  attr_accessor :add_invoice_items
2384
3259
  # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
@@ -2413,6 +3288,8 @@ module Stripe
2413
3288
  attr_accessor :metadata
2414
3289
  # The account on behalf of which to charge, for each of the associated subscription's invoices.
2415
3290
  attr_accessor :on_behalf_of
3291
+ # 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).
3292
+ attr_accessor :pause_collection
2416
3293
  # 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.
2417
3294
  attr_accessor :proration_behavior
2418
3295
  # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
@@ -2421,8 +3298,12 @@ module Stripe
2421
3298
  attr_accessor :transfer_data
2422
3299
  # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
2423
3300
  attr_accessor :trial
3301
+ # Specify trial behavior when crossing phase boundaries
3302
+ attr_accessor :trial_continuation
2424
3303
  # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
2425
3304
  attr_accessor :trial_end
3305
+ # Settings related to subscription trials.
3306
+ attr_accessor :trial_settings
2426
3307
 
2427
3308
  def initialize(
2428
3309
  add_invoice_items: nil,
@@ -2442,11 +3323,14 @@ module Stripe
2442
3323
  iterations: nil,
2443
3324
  metadata: nil,
2444
3325
  on_behalf_of: nil,
3326
+ pause_collection: nil,
2445
3327
  proration_behavior: nil,
2446
3328
  start_date: nil,
2447
3329
  transfer_data: nil,
2448
3330
  trial: nil,
2449
- trial_end: nil
3331
+ trial_continuation: nil,
3332
+ trial_end: nil,
3333
+ trial_settings: nil
2450
3334
  )
2451
3335
  @add_invoice_items = add_invoice_items
2452
3336
  @application_fee_percent = application_fee_percent
@@ -2465,26 +3349,95 @@ module Stripe
2465
3349
  @iterations = iterations
2466
3350
  @metadata = metadata
2467
3351
  @on_behalf_of = on_behalf_of
3352
+ @pause_collection = pause_collection
2468
3353
  @proration_behavior = proration_behavior
2469
3354
  @start_date = start_date
2470
3355
  @transfer_data = transfer_data
2471
3356
  @trial = trial
3357
+ @trial_continuation = trial_continuation
2472
3358
  @trial_end = trial_end
3359
+ @trial_settings = trial_settings
3360
+ end
3361
+ end
3362
+
3363
+ class Prebilling < Stripe::RequestParams
3364
+ class BillUntil < Stripe::RequestParams
3365
+ class AmendmentEnd < Stripe::RequestParams
3366
+ # The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments.
3367
+ attr_accessor :index
3368
+
3369
+ def initialize(index: nil)
3370
+ @index = index
3371
+ end
3372
+ end
3373
+
3374
+ class Duration < Stripe::RequestParams
3375
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3376
+ attr_accessor :interval
3377
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3378
+ attr_accessor :interval_count
3379
+
3380
+ def initialize(interval: nil, interval_count: nil)
3381
+ @interval = interval
3382
+ @interval_count = interval_count
3383
+ end
3384
+ end
3385
+ # End the prebilled period when a specified amendment ends.
3386
+ attr_accessor :amendment_end
3387
+ # Time span for prebilling, starting from `bill_from`.
3388
+ attr_accessor :duration
3389
+ # End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
3390
+ attr_accessor :timestamp
3391
+ # Select one of several ways to pass the `bill_until` value.
3392
+ attr_accessor :type
3393
+
3394
+ def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
3395
+ @amendment_end = amendment_end
3396
+ @duration = duration
3397
+ @timestamp = timestamp
3398
+ @type = type
3399
+ end
3400
+ end
3401
+ # The end of the prebilled time period.
3402
+ attr_accessor :bill_until
3403
+ # This is used to determine the number of billing cycles to prebill.
3404
+ attr_accessor :iterations
3405
+
3406
+ def initialize(bill_until: nil, iterations: nil)
3407
+ @bill_until = bill_until
3408
+ @iterations = iterations
2473
3409
  end
2474
3410
  end
3411
+ # Changes to apply to the phases of the subscription schedule, in the order provided.
3412
+ attr_accessor :amendments
3413
+ # 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.
3414
+ attr_accessor :billing_behavior
2475
3415
  # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
2476
3416
  attr_accessor :billing_mode
2477
3417
  # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
2478
3418
  attr_accessor :end_behavior
2479
3419
  # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase.
2480
3420
  attr_accessor :phases
3421
+ # Provide any time periods to bill in advance.
3422
+ attr_accessor :prebilling
2481
3423
  # In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
2482
3424
  attr_accessor :proration_behavior
2483
3425
 
2484
- def initialize(billing_mode: nil, end_behavior: nil, phases: nil, proration_behavior: nil)
3426
+ def initialize(
3427
+ amendments: nil,
3428
+ billing_behavior: nil,
3429
+ billing_mode: nil,
3430
+ end_behavior: nil,
3431
+ phases: nil,
3432
+ prebilling: nil,
3433
+ proration_behavior: nil
3434
+ )
3435
+ @amendments = amendments
3436
+ @billing_behavior = billing_behavior
2485
3437
  @billing_mode = billing_mode
2486
3438
  @end_behavior = end_behavior
2487
3439
  @phases = phases
3440
+ @prebilling = prebilling
2488
3441
  @proration_behavior = proration_behavior
2489
3442
  end
2490
3443
  end
@@ -2510,16 +3463,44 @@ module Stripe
2510
3463
  end
2511
3464
 
2512
3465
  class Discount < Stripe::RequestParams
3466
+ class DiscountEnd < Stripe::RequestParams
3467
+ class Duration < Stripe::RequestParams
3468
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3469
+ attr_accessor :interval
3470
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3471
+ attr_accessor :interval_count
3472
+
3473
+ def initialize(interval: nil, interval_count: nil)
3474
+ @interval = interval
3475
+ @interval_count = interval_count
3476
+ end
3477
+ end
3478
+ # Time span for the redeemed discount.
3479
+ attr_accessor :duration
3480
+ # A precise Unix timestamp for the discount to end. Must be in the future.
3481
+ attr_accessor :timestamp
3482
+ # The type of calculation made to determine when the discount ends.
3483
+ attr_accessor :type
3484
+
3485
+ def initialize(duration: nil, timestamp: nil, type: nil)
3486
+ @duration = duration
3487
+ @timestamp = timestamp
3488
+ @type = type
3489
+ end
3490
+ end
2513
3491
  # ID of the coupon to create a new discount for.
2514
3492
  attr_accessor :coupon
2515
3493
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
2516
3494
  attr_accessor :discount
3495
+ # Details to determine how long the discount should be applied for.
3496
+ attr_accessor :discount_end
2517
3497
  # ID of the promotion code to create a new discount for.
2518
3498
  attr_accessor :promotion_code
2519
3499
 
2520
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
3500
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
2521
3501
  @coupon = coupon
2522
3502
  @discount = discount
3503
+ @discount_end = discount_end
2523
3504
  @promotion_code = promotion_code
2524
3505
  end
2525
3506
  end
@@ -2614,6 +3595,15 @@ module Stripe
2614
3595
  @tax_rates = tax_rates
2615
3596
  end
2616
3597
  end
3598
+
3599
+ class Prebilling < Stripe::RequestParams
3600
+ # This is used to determine the number of billing cycles to prebill.
3601
+ attr_accessor :iterations
3602
+
3603
+ def initialize(iterations: nil)
3604
+ @iterations = iterations
3605
+ end
3606
+ end
2617
3607
  # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`.
2618
3608
  attr_accessor :billing_cycle_anchor
2619
3609
  # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
@@ -2628,6 +3618,8 @@ module Stripe
2628
3618
  attr_accessor :default_tax_rates
2629
3619
  # A list of up to 20 subscription items, each with an attached price.
2630
3620
  attr_accessor :items
3621
+ # The pre-billing to apply to the subscription as a preview.
3622
+ attr_accessor :prebilling
2631
3623
  # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
2632
3624
  attr_accessor :proration_behavior
2633
3625
  # If previewing an update to a subscription, and doing proration, `subscription_details.proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_details.items`, or `subscription_details.trial_end` are required. Also, `subscription_details.proration_behavior` cannot be set to 'none'.
@@ -2647,6 +3639,7 @@ module Stripe
2647
3639
  cancel_now: nil,
2648
3640
  default_tax_rates: nil,
2649
3641
  items: nil,
3642
+ prebilling: nil,
2650
3643
  proration_behavior: nil,
2651
3644
  proration_date: nil,
2652
3645
  resume_at: nil,
@@ -2660,6 +3653,7 @@ module Stripe
2660
3653
  @cancel_now = cancel_now
2661
3654
  @default_tax_rates = default_tax_rates
2662
3655
  @items = items
3656
+ @prebilling = prebilling
2663
3657
  @proration_behavior = proration_behavior
2664
3658
  @proration_date = proration_date
2665
3659
  @resume_at = resume_at
@@ -2673,6 +3667,8 @@ module Stripe
2673
3667
  attr_accessor :currency
2674
3668
  # The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
2675
3669
  attr_accessor :customer
3670
+ # The identifier of the account whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_account`, `customer_details`, `subscription`, or `schedule` must be set.
3671
+ attr_accessor :customer_account
2676
3672
  # Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
2677
3673
  attr_accessor :customer_details
2678
3674
  # The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts.
@@ -2700,6 +3696,7 @@ module Stripe
2700
3696
  automatic_tax: nil,
2701
3697
  currency: nil,
2702
3698
  customer: nil,
3699
+ customer_account: nil,
2703
3700
  customer_details: nil,
2704
3701
  discounts: nil,
2705
3702
  expand: nil,
@@ -2715,6 +3712,7 @@ module Stripe
2715
3712
  @automatic_tax = automatic_tax
2716
3713
  @currency = currency
2717
3714
  @customer = customer
3715
+ @customer_account = customer_account
2718
3716
  @customer_details = customer_details
2719
3717
  @discounts = discounts
2720
3718
  @expand = expand