stripe 15.5.0 → 15.6.0.pre.alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (717) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1717 -642
  3. data/OPENAPI_VERSION +1 -1
  4. data/VERSION +1 -1
  5. data/lib/stripe/api_requestor.rb +34 -0
  6. data/lib/stripe/api_version.rb +1 -2
  7. data/lib/stripe/errors.rb +63 -0
  8. data/lib/stripe/event_types.rb +185 -0
  9. data/lib/stripe/events/v2_billing_cadence_billed_event.rb +21 -0
  10. data/lib/stripe/events/v2_billing_cadence_canceled_event.rb +21 -0
  11. data/lib/stripe/events/v2_billing_cadence_created_event.rb +23 -0
  12. data/lib/stripe/events/v2_billing_cadence_errored_event.rb +21 -0
  13. data/lib/stripe/events/v2_billing_license_fee_created_event.rb +21 -0
  14. data/lib/stripe/events/v2_billing_license_fee_updated_event.rb +21 -0
  15. data/lib/stripe/events/v2_billing_license_fee_version_created_event.rb +23 -0
  16. data/lib/stripe/events/v2_billing_licensed_item_created_event.rb +21 -0
  17. data/lib/stripe/events/v2_billing_licensed_item_updated_event.rb +21 -0
  18. data/lib/stripe/events/v2_billing_metered_item_created_event.rb +21 -0
  19. data/lib/stripe/events/v2_billing_metered_item_updated_event.rb +21 -0
  20. data/lib/stripe/events/v2_billing_pricing_plan_component_created_event.rb +23 -0
  21. data/lib/stripe/events/v2_billing_pricing_plan_component_updated_event.rb +23 -0
  22. data/lib/stripe/events/v2_billing_pricing_plan_created_event.rb +21 -0
  23. data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_awaiting_customer_action_event.rb +21 -0
  24. data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_current_event.rb +21 -0
  25. data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_past_due_event.rb +21 -0
  26. data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_paused_event.rb +21 -0
  27. data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_unpaid_event.rb +21 -0
  28. data/lib/stripe/events/v2_billing_pricing_plan_subscription_servicing_activated_event.rb +21 -0
  29. data/lib/stripe/events/v2_billing_pricing_plan_subscription_servicing_canceled_event.rb +21 -0
  30. data/lib/stripe/events/v2_billing_pricing_plan_subscription_servicing_paused_event.rb +21 -0
  31. data/lib/stripe/events/v2_billing_pricing_plan_updated_event.rb +21 -0
  32. data/lib/stripe/events/v2_billing_pricing_plan_version_created_event.rb +23 -0
  33. data/lib/stripe/events/v2_billing_rate_card_created_event.rb +23 -0
  34. data/lib/stripe/events/v2_billing_rate_card_rate_created_event.rb +23 -0
  35. data/lib/stripe/events/v2_billing_rate_card_subscription_activated_event.rb +21 -0
  36. data/lib/stripe/events/v2_billing_rate_card_subscription_canceled_event.rb +21 -0
  37. data/lib/stripe/events/v2_billing_rate_card_subscription_collection_awaiting_customer_action_event.rb +21 -0
  38. data/lib/stripe/events/v2_billing_rate_card_subscription_collection_current_event.rb +21 -0
  39. data/lib/stripe/events/v2_billing_rate_card_subscription_collection_past_due_event.rb +21 -0
  40. data/lib/stripe/events/v2_billing_rate_card_subscription_collection_paused_event.rb +21 -0
  41. data/lib/stripe/events/v2_billing_rate_card_subscription_collection_unpaid_event.rb +21 -0
  42. data/lib/stripe/events/v2_billing_rate_card_subscription_servicing_activated_event.rb +21 -0
  43. data/lib/stripe/events/v2_billing_rate_card_subscription_servicing_canceled_event.rb +21 -0
  44. data/lib/stripe/events/v2_billing_rate_card_subscription_servicing_paused_event.rb +21 -0
  45. data/lib/stripe/events/v2_billing_rate_card_updated_event.rb +21 -0
  46. data/lib/stripe/events/v2_billing_rate_card_version_created_event.rb +23 -0
  47. data/lib/stripe/events/v2_core_account_closed_event.rb +21 -0
  48. data/lib/stripe/events/v2_core_account_created_event.rb +21 -0
  49. data/lib/stripe/events/v2_core_account_including_configuration_customer_capability_status_updated_event.rb +23 -0
  50. data/lib/stripe/events/v2_core_account_including_configuration_customer_updated_event.rb +21 -0
  51. data/lib/stripe/events/v2_core_account_including_configuration_merchant_capability_status_updated_event.rb +23 -0
  52. data/lib/stripe/events/v2_core_account_including_configuration_merchant_updated_event.rb +21 -0
  53. data/lib/stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event.rb +23 -0
  54. data/lib/stripe/events/v2_core_account_including_configuration_recipient_updated_event.rb +21 -0
  55. data/lib/stripe/events/v2_core_account_including_configuration_storer_capability_status_updated_event.rb +23 -0
  56. data/lib/stripe/events/v2_core_account_including_configuration_storer_updated_event.rb +21 -0
  57. data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +21 -0
  58. data/lib/stripe/events/v2_core_account_including_identity_updated_event.rb +21 -0
  59. data/lib/stripe/events/v2_core_account_including_requirements_updated_event.rb +21 -0
  60. data/lib/stripe/events/v2_core_account_link_returned_event.rb +13 -0
  61. data/lib/stripe/events/v2_core_account_person_created_event.rb +23 -0
  62. data/lib/stripe/events/v2_core_account_person_deleted_event.rb +23 -0
  63. data/lib/stripe/events/v2_core_account_person_updated_event.rb +23 -0
  64. data/lib/stripe/events/v2_core_account_updated_event.rb +21 -0
  65. data/lib/stripe/events/v2_core_health_api_error_firing_event.rb +13 -0
  66. data/lib/stripe/events/v2_core_health_api_error_resolved_event.rb +13 -0
  67. data/lib/stripe/events/v2_core_health_api_latency_firing_event.rb +13 -0
  68. data/lib/stripe/events/v2_core_health_api_latency_resolved_event.rb +13 -0
  69. data/lib/stripe/events/v2_core_health_authorization_rate_drop_firing_event.rb +13 -0
  70. data/lib/stripe/events/v2_core_health_authorization_rate_drop_resolved_event.rb +13 -0
  71. data/lib/stripe/events/v2_core_health_event_generation_failure_resolved_event.rb +13 -0
  72. data/lib/stripe/events/v2_core_health_fraud_rate_increased_event.rb +13 -0
  73. data/lib/stripe/events/v2_core_health_issuing_authorization_request_timeout_firing_event.rb +13 -0
  74. data/lib/stripe/events/v2_core_health_issuing_authorization_request_timeout_resolved_event.rb +13 -0
  75. data/lib/stripe/events/v2_core_health_payment_method_error_firing_event.rb +13 -0
  76. data/lib/stripe/events/v2_core_health_payment_method_error_resolved_event.rb +13 -0
  77. data/lib/stripe/events/v2_core_health_traffic_volume_drop_firing_event.rb +13 -0
  78. data/lib/stripe/events/v2_core_health_traffic_volume_drop_resolved_event.rb +13 -0
  79. data/lib/stripe/events/v2_core_health_webhook_latency_firing_event.rb +13 -0
  80. data/lib/stripe/events/v2_core_health_webhook_latency_resolved_event.rb +13 -0
  81. data/lib/stripe/events/v2_money_management_adjustment_created_event.rb +21 -0
  82. data/lib/stripe/events/v2_money_management_financial_account_created_event.rb +21 -0
  83. data/lib/stripe/events/v2_money_management_financial_account_updated_event.rb +21 -0
  84. data/lib/stripe/events/v2_money_management_financial_address_activated_event.rb +21 -0
  85. data/lib/stripe/events/v2_money_management_financial_address_failed_event.rb +21 -0
  86. data/lib/stripe/events/v2_money_management_inbound_transfer_available_event.rb +23 -0
  87. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +21 -0
  88. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +21 -0
  89. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +21 -0
  90. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +21 -0
  91. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +21 -0
  92. data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +21 -0
  93. data/lib/stripe/events/v2_money_management_outbound_payment_created_event.rb +21 -0
  94. data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +21 -0
  95. data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +21 -0
  96. data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +21 -0
  97. data/lib/stripe/events/v2_money_management_outbound_payment_updated_event.rb +21 -0
  98. data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +21 -0
  99. data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +21 -0
  100. data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +21 -0
  101. data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +21 -0
  102. data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +21 -0
  103. data/lib/stripe/events/v2_money_management_outbound_transfer_updated_event.rb +21 -0
  104. data/lib/stripe/events/v2_money_management_payout_method_updated_event.rb +21 -0
  105. data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +23 -0
  106. data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +21 -0
  107. data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +21 -0
  108. data/lib/stripe/events/v2_money_management_received_credit_succeeded_event.rb +21 -0
  109. data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +21 -0
  110. data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +21 -0
  111. data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +21 -0
  112. data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +21 -0
  113. data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +21 -0
  114. data/lib/stripe/events/v2_money_management_transaction_created_event.rb +21 -0
  115. data/lib/stripe/events/v2_money_management_transaction_updated_event.rb +21 -0
  116. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_failed_event.rb +21 -0
  117. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb +22 -0
  118. data/lib/stripe/events/v2_payments_off_session_payment_canceled_event.rb +21 -0
  119. data/lib/stripe/events/v2_payments_off_session_payment_created_event.rb +21 -0
  120. data/lib/stripe/events/v2_payments_off_session_payment_failed_event.rb +21 -0
  121. data/lib/stripe/events/v2_payments_off_session_payment_succeeded_event.rb +21 -0
  122. data/lib/stripe/events/v2_reporting_report_run_created_event.rb +21 -0
  123. data/lib/stripe/events/v2_reporting_report_run_failed_event.rb +21 -0
  124. data/lib/stripe/events/v2_reporting_report_run_succeeded_event.rb +21 -0
  125. data/lib/stripe/events/v2_reporting_report_run_updated_event.rb +21 -0
  126. data/lib/stripe/object_types.rb +80 -0
  127. data/lib/stripe/resources/account.rb +653 -1
  128. data/lib/stripe/resources/account_notice.rb +123 -0
  129. data/lib/stripe/resources/account_session.rb +256 -1
  130. data/lib/stripe/resources/balance_settings.rb +112 -0
  131. data/lib/stripe/resources/billing/alert.rb +128 -1
  132. data/lib/stripe/resources/billing/alert_triggered.rb +6 -0
  133. data/lib/stripe/resources/billing/credit_balance_summary.rb +52 -0
  134. data/lib/stripe/resources/billing/credit_balance_transaction.rb +54 -0
  135. data/lib/stripe/resources/billing/credit_grant.rb +71 -2
  136. data/lib/stripe/resources/billing/meter_usage.rb +23 -0
  137. data/lib/stripe/resources/billing/meter_usage_row.rb +28 -0
  138. data/lib/stripe/resources/billing_portal/session.rb +6 -0
  139. data/lib/stripe/resources/capital/financing_offer.rb +179 -0
  140. data/lib/stripe/resources/capital/financing_summary.rb +55 -0
  141. data/lib/stripe/resources/capital/financing_transaction.rb +114 -0
  142. data/lib/stripe/resources/card.rb +2 -0
  143. data/lib/stripe/resources/cash_balance.rb +2 -0
  144. data/lib/stripe/resources/charge.rb +1540 -4
  145. data/lib/stripe/resources/checkout/session.rb +623 -5
  146. data/lib/stripe/resources/confirmation_token.rb +170 -0
  147. data/lib/stripe/resources/coupon.rb +30 -1
  148. data/lib/stripe/resources/credit_note.rb +6 -0
  149. data/lib/stripe/resources/credit_note_line_item.rb +9 -0
  150. data/lib/stripe/resources/customer.rb +2 -0
  151. data/lib/stripe/resources/customer_balance_transaction.rb +2 -0
  152. data/lib/stripe/resources/customer_cash_balance_transaction.rb +2 -0
  153. data/lib/stripe/resources/customer_session.rb +6 -1
  154. data/lib/stripe/resources/discount.rb +2 -0
  155. data/lib/stripe/resources/dispute.rb +11 -0
  156. data/lib/stripe/resources/event.rb +31 -0
  157. data/lib/stripe/resources/financial_connections/account.rb +22 -1
  158. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +27 -0
  159. data/lib/stripe/resources/financial_connections/institution.rb +92 -0
  160. data/lib/stripe/resources/financial_connections/session.rb +62 -2
  161. data/lib/stripe/resources/fx_quote.rb +186 -0
  162. data/lib/stripe/resources/identity/verification_session.rb +10 -0
  163. data/lib/stripe/resources/invoice.rb +1151 -16
  164. data/lib/stripe/resources/invoice_item.rb +126 -2
  165. data/lib/stripe/resources/invoice_line_item.rb +107 -1
  166. data/lib/stripe/resources/invoice_payment.rb +6 -1
  167. data/lib/stripe/resources/issuing/card.rb +0 -8
  168. data/lib/stripe/resources/issuing/cardholder.rb +2 -1
  169. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +602 -0
  170. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +82 -0
  171. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +86 -0
  172. data/lib/stripe/resources/issuing/settlement.rb +53 -0
  173. data/lib/stripe/resources/issuing/transaction.rb +6 -0
  174. data/lib/stripe/resources/line_item.rb +37 -0
  175. data/lib/stripe/resources/mandate.rb +89 -1
  176. data/lib/stripe/resources/margin.rb +115 -0
  177. data/lib/stripe/resources/order.rb +2958 -0
  178. data/lib/stripe/resources/payment_attempt_record.rb +1177 -0
  179. data/lib/stripe/resources/payment_intent.rb +6448 -545
  180. data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +72 -0
  181. data/lib/stripe/resources/payment_method.rb +194 -1
  182. data/lib/stripe/resources/payment_method_configuration.rb +295 -0
  183. data/lib/stripe/resources/payment_record.rb +1723 -0
  184. data/lib/stripe/resources/price.rb +30 -0
  185. data/lib/stripe/resources/privacy/redaction_job.rb +298 -0
  186. data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +33 -0
  187. data/lib/stripe/resources/promotion_code.rb +10 -0
  188. data/lib/stripe/resources/quote.rb +2038 -7
  189. data/lib/stripe/resources/quote_line.rb +274 -0
  190. data/lib/stripe/resources/quote_preview_invoice.rb +687 -0
  191. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +395 -0
  192. data/lib/stripe/resources/refund.rb +9 -0
  193. data/lib/stripe/resources/setup_attempt.rb +24 -0
  194. data/lib/stripe/resources/setup_intent.rb +771 -9
  195. data/lib/stripe/resources/source.rb +29 -0
  196. data/lib/stripe/resources/subscription.rb +403 -9
  197. data/lib/stripe/resources/subscription_item.rb +84 -3
  198. data/lib/stripe/resources/subscription_schedule.rb +1007 -10
  199. data/lib/stripe/resources/tax/association.rb +66 -0
  200. data/lib/stripe/resources/tax/form.rb +211 -0
  201. data/lib/stripe/resources/tax_id.rb +12 -2
  202. data/lib/stripe/resources/terminal/configuration.rb +33 -0
  203. data/lib/stripe/resources/terminal/onboarding_link.rb +84 -0
  204. data/lib/stripe/resources/terminal/reader.rb +8 -0
  205. data/lib/stripe/resources/terminal/reader_collected_data.rb +31 -0
  206. data/lib/stripe/resources/transfer.rb +6 -0
  207. data/lib/stripe/resources/treasury/financial_account.rb +22 -3
  208. data/lib/stripe/resources/treasury/financial_account_features.rb +2 -0
  209. data/lib/stripe/resources/treasury/outbound_transfer.rb +37 -0
  210. data/lib/stripe/resources/treasury/received_credit.rb +38 -1
  211. data/lib/stripe/resources/treasury/received_debit.rb +40 -1
  212. data/lib/stripe/resources/v2/billing/bill_setting.rb +62 -0
  213. data/lib/stripe/resources/v2/billing/bill_setting_version.rb +50 -0
  214. data/lib/stripe/resources/v2/billing/cadence.rb +182 -0
  215. data/lib/stripe/resources/v2/billing/collection_setting.rb +148 -0
  216. data/lib/stripe/resources/v2/billing/collection_setting_version.rb +136 -0
  217. data/lib/stripe/resources/v2/billing/custom_pricing_unit.rb +35 -0
  218. data/lib/stripe/resources/v2/billing/intent.rb +59 -0
  219. data/lib/stripe/resources/v2/billing/intent_action.rb +200 -0
  220. data/lib/stripe/resources/v2/billing/license_fee.rb +79 -0
  221. data/lib/stripe/resources/v2/billing/license_fee_subscription.rb +36 -0
  222. data/lib/stripe/resources/v2/billing/license_fee_version.rb +56 -0
  223. data/lib/stripe/resources/v2/billing/licensed_item.rb +44 -0
  224. data/lib/stripe/resources/v2/billing/metered_item.rb +58 -0
  225. data/lib/stripe/resources/v2/billing/pricing_plan.rb +43 -0
  226. data/lib/stripe/resources/v2/billing/pricing_plan_component.rb +58 -0
  227. data/lib/stripe/resources/v2/billing/pricing_plan_subscription.rb +63 -0
  228. data/lib/stripe/resources/v2/billing/pricing_plan_version.rb +30 -0
  229. data/lib/stripe/resources/v2/billing/profile.rb +38 -0
  230. data/lib/stripe/resources/v2/billing/rate_card.rb +53 -0
  231. data/lib/stripe/resources/v2/billing/rate_card_rate.rb +71 -0
  232. data/lib/stripe/resources/v2/billing/rate_card_subscription.rb +63 -0
  233. data/lib/stripe/resources/v2/billing/rate_card_version.rb +26 -0
  234. data/lib/stripe/resources/v2/billing/service_action.rb +117 -0
  235. data/lib/stripe/resources/v2/core/account.rb +1938 -0
  236. data/lib/stripe/resources/v2/core/account_link.rb +72 -0
  237. data/lib/stripe/resources/v2/core/claimable_sandbox.rb +57 -0
  238. data/lib/stripe/resources/v2/core/person.rb +276 -0
  239. data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +74 -0
  240. data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +39 -0
  241. data/lib/stripe/resources/v2/event.rb +2 -0
  242. data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +20 -0
  243. data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +22 -0
  244. data/lib/stripe/resources/v2/money_management/adjustment.rb +51 -0
  245. data/lib/stripe/resources/v2/money_management/financial_account.rb +79 -0
  246. data/lib/stripe/resources/v2/money_management/financial_address.rb +68 -0
  247. data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +94 -0
  248. data/lib/stripe/resources/v2/money_management/outbound_payment.rb +129 -0
  249. data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +82 -0
  250. data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +45 -0
  251. data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +117 -0
  252. data/lib/stripe/resources/v2/money_management/payout_method.rb +77 -0
  253. data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +49 -0
  254. data/lib/stripe/resources/v2/money_management/received_credit.rb +122 -0
  255. data/lib/stripe/resources/v2/money_management/received_debit.rb +84 -0
  256. data/lib/stripe/resources/v2/money_management/transaction.rb +80 -0
  257. data/lib/stripe/resources/v2/money_management/transaction_entry.rb +70 -0
  258. data/lib/stripe/resources/v2/payments/off_session_payment.rb +89 -0
  259. data/lib/stripe/resources/v2/reporting/report.rb +64 -0
  260. data/lib/stripe/resources/v2/reporting/report_run.rb +89 -0
  261. data/lib/stripe/resources/v2/tax/automatic_rule.rb +31 -0
  262. data/lib/stripe/resources.rb +194 -0
  263. data/lib/stripe/services/account_notice_service.rb +101 -0
  264. data/lib/stripe/services/account_service.rb +562 -1
  265. data/lib/stripe/services/account_session_service.rb +226 -1
  266. data/lib/stripe/services/balance_settings_service.rb +99 -0
  267. data/lib/stripe/services/billing/alert_service.rb +75 -1
  268. data/lib/stripe/services/billing/credit_balance_summary_service.rb +17 -2
  269. data/lib/stripe/services/billing/credit_balance_transaction_service.rb +4 -0
  270. data/lib/stripe/services/billing/credit_grant_service.rb +37 -2
  271. data/lib/stripe/services/billing/meter_usage_service.rb +76 -0
  272. data/lib/stripe/services/billing_portal/session_service.rb +4 -0
  273. data/lib/stripe/services/billing_service.rb +2 -1
  274. data/lib/stripe/services/capital/financing_offer_service.rb +112 -0
  275. data/lib/stripe/services/capital/financing_summary_service.rb +28 -0
  276. data/lib/stripe/services/capital/financing_transaction_service.rb +79 -0
  277. data/lib/stripe/services/capital_service.rb +15 -0
  278. data/lib/stripe/services/charge_service.rb +1418 -0
  279. data/lib/stripe/services/checkout/session_service.rb +472 -5
  280. data/lib/stripe/services/coupon_service.rb +17 -1
  281. data/lib/stripe/services/credit_note_service.rb +4 -0
  282. data/lib/stripe/services/customer_session_service.rb +4 -1
  283. data/{rbi/stripe/services/account_external_account_service.rbi → lib/stripe/services/external_account_service.rb} +135 -122
  284. data/{rbi/stripe/services/tax/transaction_line_item_service.rbi → lib/stripe/services/financial_connections/account_inferred_balance_service.rb} +21 -17
  285. data/lib/stripe/services/financial_connections/account_service.rb +7 -2
  286. data/{rbi/stripe/services/climate/supplier_service.rbi → lib/stripe/services/financial_connections/institution_service.rb} +36 -25
  287. data/lib/stripe/services/financial_connections/session_service.rb +34 -2
  288. data/lib/stripe/services/financial_connections_service.rb +2 -1
  289. data/lib/stripe/services/fx_quote_service.rb +123 -0
  290. data/lib/stripe/services/identity/verification_session_service.rb +8 -0
  291. data/lib/stripe/services/invoice_item_service.rb +74 -2
  292. data/lib/stripe/services/invoice_line_item_service.rb +33 -1
  293. data/lib/stripe/services/invoice_payment_service.rb +4 -1
  294. data/lib/stripe/services/invoice_service.rb +1078 -16
  295. data/lib/stripe/services/issuing/card_service.rb +0 -8
  296. data/lib/stripe/services/issuing/cardholder_service.rb +2 -1
  297. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +504 -0
  298. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +66 -0
  299. data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +83 -0
  300. data/lib/stripe/services/issuing/transaction_service.rb +4 -0
  301. data/lib/stripe/services/issuing_service.rb +5 -1
  302. data/lib/stripe/services/mandate_service.rb +40 -0
  303. data/lib/stripe/services/margin_service.rb +119 -0
  304. data/{rbi/stripe/services/source_transaction_service.rbi → lib/stripe/services/order_line_item_service.rb} +20 -16
  305. data/lib/stripe/services/order_service.rb +2388 -0
  306. data/lib/stripe/services/payment_attempt_record_service.rb +52 -0
  307. data/{rbi/stripe/services/quote_line_item_service.rbi → lib/stripe/services/payment_intent_amount_details_line_item_service.rb} +20 -16
  308. data/lib/stripe/services/payment_intent_service.rb +7630 -2215
  309. data/lib/stripe/services/payment_method_configuration_service.rb +210 -0
  310. data/lib/stripe/services/payment_method_service.rb +120 -1
  311. data/lib/stripe/services/payment_record_service.rb +562 -0
  312. data/lib/stripe/services/price_service.rb +19 -0
  313. data/lib/stripe/services/privacy/redaction_job_service.rb +240 -0
  314. data/{rbi/stripe/services/tax/calculation_line_item_service.rbi → lib/stripe/services/privacy/redaction_job_validation_error_service.rb} +21 -17
  315. data/lib/stripe/services/privacy_service.rb +13 -0
  316. data/lib/stripe/services/promotion_code_service.rb +8 -0
  317. data/{rbi/stripe/services/credit_note_line_item_service.rbi → lib/stripe/services/quote_line_service.rb} +20 -16
  318. data/{rbi/stripe/services/payment_link_line_item_service.rbi → lib/stripe/services/quote_preview_invoice_service.rb} +20 -16
  319. data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +35 -0
  320. data/lib/stripe/services/quote_service.rb +1723 -8
  321. data/lib/stripe/services/setup_intent_service.rb +691 -9
  322. data/lib/stripe/services/subscription_item_service.rb +75 -3
  323. data/lib/stripe/services/subscription_schedule_service.rb +911 -10
  324. data/lib/stripe/services/subscription_service.rb +336 -9
  325. data/lib/stripe/services/tax/association_service.rb +31 -0
  326. data/lib/stripe/services/tax/form_service.rb +100 -0
  327. data/lib/stripe/services/tax_id_service.rb +8 -2
  328. data/lib/stripe/services/tax_service.rb +3 -1
  329. data/lib/stripe/services/terminal/configuration_service.rb +26 -0
  330. data/lib/stripe/services/terminal/onboarding_link_service.rb +56 -0
  331. data/lib/stripe/services/terminal/reader_collected_data_service.rb +28 -0
  332. data/lib/stripe/services/terminal_service.rb +3 -1
  333. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +97 -0
  334. data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +25 -1
  335. data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +25 -1
  336. data/lib/stripe/services/transfer_service.rb +4 -0
  337. data/lib/stripe/services/treasury/financial_account_features_service.rb +4 -1
  338. data/lib/stripe/services/treasury/financial_account_service.rb +16 -2
  339. data/lib/stripe/services/treasury/outbound_transfer_service.rb +24 -0
  340. data/lib/stripe/services/v1_services.rb +11 -1
  341. data/lib/stripe/services/v2/billing/bill_setting_service.rb +214 -0
  342. data/lib/stripe/services/v2/billing/bill_settings/version_service.rb +45 -0
  343. data/lib/stripe/services/v2/billing/cadence_service.rb +428 -0
  344. data/lib/stripe/services/v2/billing/collection_setting_service.rb +518 -0
  345. data/lib/stripe/services/v2/billing/collection_settings/version_service.rb +45 -0
  346. data/lib/stripe/services/v2/billing/custom_pricing_unit_service.rb +108 -0
  347. data/lib/stripe/services/v2/billing/intent_service.rb +465 -0
  348. data/lib/stripe/services/v2/billing/intents/action_service.rb +45 -0
  349. data/lib/stripe/services/v2/billing/license_fee_service.rb +250 -0
  350. data/lib/stripe/services/v2/billing/license_fee_subscription_service.rb +23 -0
  351. data/lib/stripe/services/v2/billing/license_fees/version_service.rb +45 -0
  352. data/lib/stripe/services/v2/billing/licensed_item_service.rb +149 -0
  353. data/lib/stripe/services/v2/billing/metered_item_service.rb +176 -0
  354. data/lib/stripe/services/v2/billing/pricing_plan_service.rb +142 -0
  355. data/lib/stripe/services/v2/billing/pricing_plan_subscription_service.rb +76 -0
  356. data/lib/stripe/services/v2/billing/pricing_plans/component_service.rb +162 -0
  357. data/lib/stripe/services/v2/billing/pricing_plans/version_service.rb +45 -0
  358. data/lib/stripe/services/v2/billing/profile_service.rb +144 -0
  359. data/lib/stripe/services/v2/billing/rate_card_service.rb +151 -0
  360. data/lib/stripe/services/v2/billing/rate_card_subscription_service.rb +144 -0
  361. data/lib/stripe/services/v2/billing/rate_cards/rate_service.rb +161 -0
  362. data/lib/stripe/services/v2/billing/rate_cards/version_service.rb +45 -0
  363. data/lib/stripe/services/v2/billing/service_action_service.rb +259 -0
  364. data/lib/stripe/services/v2/billing_service.rb +18 -1
  365. data/lib/stripe/services/v2/core/account_link_service.rb +114 -0
  366. data/lib/stripe/services/v2/core/account_service.rb +4536 -0
  367. data/lib/stripe/services/v2/core/accounts/person_service.rb +1045 -0
  368. data/lib/stripe/services/v2/core/claimable_sandbox_service.rb +50 -0
  369. data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +130 -0
  370. data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +107 -0
  371. data/lib/stripe/services/v2/core/vault_service.rb +18 -0
  372. data/lib/stripe/services/v2/core_service.rb +5 -1
  373. data/lib/stripe/services/v2/money_management/adjustment_service.rb +74 -0
  374. data/lib/stripe/services/v2/money_management/financial_account_service.rb +119 -0
  375. data/lib/stripe/services/v2/money_management/financial_address_service.rb +82 -0
  376. data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +125 -0
  377. data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +95 -0
  378. data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +199 -0
  379. data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +235 -0
  380. data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +172 -0
  381. data/lib/stripe/services/v2/money_management/payout_method_service.rb +90 -0
  382. data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +32 -0
  383. data/lib/stripe/services/v2/money_management/received_credit_service.rb +70 -0
  384. data/lib/stripe/services/v2/money_management/received_debit_service.rb +43 -0
  385. data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +69 -0
  386. data/lib/stripe/services/v2/money_management/transaction_service.rb +73 -0
  387. data/lib/stripe/services/v2/money_management_service.rb +31 -0
  388. data/lib/stripe/services/v2/payment_service.rb +15 -0
  389. data/lib/stripe/services/v2/payments/off_session_payment_service.rb +152 -0
  390. data/lib/stripe/services/v2/reporting/report_run_service.rb +88 -0
  391. data/lib/stripe/services/v2/reporting/report_service.rb +25 -0
  392. data/lib/stripe/services/v2/reporting_service.rb +16 -0
  393. data/lib/stripe/services/v2/tax/automatic_rule_service.rb +99 -0
  394. data/lib/stripe/services/v2/tax_service.rb +15 -0
  395. data/lib/stripe/services/v2/test_helper_service.rb +15 -0
  396. data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +53 -0
  397. data/lib/stripe/services/v2_services.rb +6 -1
  398. data/lib/stripe/services.rb +84 -0
  399. data/lib/stripe/stripe_configuration.rb +3 -1
  400. data/lib/stripe/stripe_object.rb +1 -1
  401. data/lib/stripe/util.rb +7 -1
  402. data/lib/stripe/version.rb +1 -1
  403. data/lib/stripe.rb +53 -0
  404. data/stripe.gemspec +4 -1
  405. metadata +281 -323
  406. data/rbi/stripe/resources/account.rbi +0 -4991
  407. data/rbi/stripe/resources/account_link.rbi +0 -76
  408. data/rbi/stripe/resources/account_session.rbi +0 -1173
  409. data/rbi/stripe/resources/apple_pay_domain.rbi +0 -88
  410. data/rbi/stripe/resources/application.rbi +0 -20
  411. data/rbi/stripe/resources/application_fee.rbi +0 -118
  412. data/rbi/stripe/resources/application_fee_refund.rbi +0 -37
  413. data/rbi/stripe/resources/apps/secret.rbi +0 -195
  414. data/rbi/stripe/resources/balance.rbi +0 -230
  415. data/rbi/stripe/resources/balance_transaction.rbi +0 -147
  416. data/rbi/stripe/resources/bank_account.rbi +0 -127
  417. data/rbi/stripe/resources/billing/alert.rbi +0 -201
  418. data/rbi/stripe/resources/billing/alert_triggered.rbi +0 -28
  419. data/rbi/stripe/resources/billing/credit_balance_summary.rbi +0 -63
  420. data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +0 -147
  421. data/rbi/stripe/resources/billing/credit_grant.rbi +0 -291
  422. data/rbi/stripe/resources/billing/meter.rbi +0 -226
  423. data/rbi/stripe/resources/billing/meter_event.rbi +0 -64
  424. data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +0 -64
  425. data/rbi/stripe/resources/billing/meter_event_summary.rbi +0 -35
  426. data/rbi/stripe/resources/billing_portal/configuration.rbi +0 -712
  427. data/rbi/stripe/resources/billing_portal/session.rbi +0 -345
  428. data/rbi/stripe/resources/capability.rbi +0 -125
  429. data/rbi/stripe/resources/card.rbi +0 -125
  430. data/rbi/stripe/resources/cash_balance.rbi +0 -32
  431. data/rbi/stripe/resources/charge.rbi +0 -2136
  432. data/rbi/stripe/resources/checkout/session.rbi +0 -4105
  433. data/rbi/stripe/resources/climate/order.rbi +0 -245
  434. data/rbi/stripe/resources/climate/product.rbi +0 -75
  435. data/rbi/stripe/resources/climate/supplier.rbi +0 -72
  436. data/rbi/stripe/resources/confirmation_token.rbi +0 -1818
  437. data/rbi/stripe/resources/connect_collection_transfer.rbi +0 -26
  438. data/rbi/stripe/resources/country_spec.rbi +0 -85
  439. data/rbi/stripe/resources/coupon.rbi +0 -250
  440. data/rbi/stripe/resources/credit_note.rbi +0 -752
  441. data/rbi/stripe/resources/credit_note_line_item.rbi +0 -101
  442. data/rbi/stripe/resources/customer.rbi +0 -993
  443. data/rbi/stripe/resources/customer_balance_transaction.rbi +0 -56
  444. data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +0 -151
  445. data/rbi/stripe/resources/customer_session.rbi +0 -200
  446. data/rbi/stripe/resources/discount.rbi +0 -53
  447. data/rbi/stripe/resources/dispute.rbi +0 -761
  448. data/rbi/stripe/resources/entitlements/active_entitlement.rbi +0 -58
  449. data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +0 -23
  450. data/rbi/stripe/resources/entitlements/feature.rbi +0 -117
  451. data/rbi/stripe/resources/ephemeral_key.rbi +0 -44
  452. data/rbi/stripe/resources/event.rbi +0 -137
  453. data/rbi/stripe/resources/exchange_rate.rbi +0 -66
  454. data/rbi/stripe/resources/file.rbi +0 -143
  455. data/rbi/stripe/resources/file_link.rbi +0 -141
  456. data/rbi/stripe/resources/financial_connections/account.rbi +0 -339
  457. data/rbi/stripe/resources/financial_connections/account_owner.rbi +0 -35
  458. data/rbi/stripe/resources/financial_connections/account_ownership.rbi +0 -23
  459. data/rbi/stripe/resources/financial_connections/session.rbi +0 -123
  460. data/rbi/stripe/resources/financial_connections/transaction.rbi +0 -124
  461. data/rbi/stripe/resources/forwarding/request.rbi +0 -216
  462. data/rbi/stripe/resources/funding_instructions.rbi +0 -437
  463. data/rbi/stripe/resources/identity/verification_report.rbi +0 -360
  464. data/rbi/stripe/resources/identity/verification_session.rbi +0 -564
  465. data/rbi/stripe/resources/invoice.rbi +0 -3894
  466. data/rbi/stripe/resources/invoice_item.rbi +0 -470
  467. data/rbi/stripe/resources/invoice_line_item.rbi +0 -432
  468. data/rbi/stripe/resources/invoice_payment.rbi +0 -121
  469. data/rbi/stripe/resources/invoice_rendering_template.rbi +0 -104
  470. data/rbi/stripe/resources/issuing/authorization.rbi +0 -1283
  471. data/rbi/stripe/resources/issuing/card.rbi +0 -749
  472. data/rbi/stripe/resources/issuing/cardholder.rbi +0 -744
  473. data/rbi/stripe/resources/issuing/dispute.rbi +0 -913
  474. data/rbi/stripe/resources/issuing/personalization_design.rbi +0 -338
  475. data/rbi/stripe/resources/issuing/physical_bundle.rbi +0 -79
  476. data/rbi/stripe/resources/issuing/token.rbi +0 -226
  477. data/rbi/stripe/resources/issuing/transaction.rbi +0 -1061
  478. data/rbi/stripe/resources/line_item.rbi +0 -72
  479. data/rbi/stripe/resources/login_link.rbi +0 -19
  480. data/rbi/stripe/resources/mandate.rbi +0 -191
  481. data/rbi/stripe/resources/payment_intent.rbi +0 -10011
  482. data/rbi/stripe/resources/payment_link.rbi +0 -1891
  483. data/rbi/stripe/resources/payment_method.rbi +0 -1770
  484. data/rbi/stripe/resources/payment_method_configuration.rbi +0 -3550
  485. data/rbi/stripe/resources/payment_method_domain.rbi +0 -228
  486. data/rbi/stripe/resources/payout.rbi +0 -307
  487. data/rbi/stripe/resources/person.rbi +0 -401
  488. data/rbi/stripe/resources/plan.rbi +0 -371
  489. data/rbi/stripe/resources/price.rbi +0 -694
  490. data/rbi/stripe/resources/product.rbi +0 -553
  491. data/rbi/stripe/resources/product_feature.rbi +0 -26
  492. data/rbi/stripe/resources/promotion_code.rbi +0 -264
  493. data/rbi/stripe/resources/quote.rbi +0 -1137
  494. data/rbi/stripe/resources/radar/early_fraud_warning.rbi +0 -98
  495. data/rbi/stripe/resources/radar/value_list.rbi +0 -168
  496. data/rbi/stripe/resources/radar/value_list_item.rbi +0 -129
  497. data/rbi/stripe/resources/refund.rbi +0 -523
  498. data/rbi/stripe/resources/reporting/report_run.rbi +0 -191
  499. data/rbi/stripe/resources/reporting/report_type.rbi +0 -57
  500. data/rbi/stripe/resources/reserve_transaction.rbi +0 -23
  501. data/rbi/stripe/resources/reversal.rbi +0 -51
  502. data/rbi/stripe/resources/review.rbi +0 -154
  503. data/rbi/stripe/resources/setup_attempt.rbi +0 -477
  504. data/rbi/stripe/resources/setup_intent.rbi +0 -3974
  505. data/rbi/stripe/resources/shipping_rate.rbi +0 -305
  506. data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +0 -75
  507. data/rbi/stripe/resources/source.rbi +0 -1496
  508. data/rbi/stripe/resources/source_mandate_notification.rbi +0 -77
  509. data/rbi/stripe/resources/source_transaction.rbi +0 -127
  510. data/rbi/stripe/resources/subscription.rbi +0 -2154
  511. data/rbi/stripe/resources/subscription_item.rbi +0 -404
  512. data/rbi/stripe/resources/subscription_schedule.rbi +0 -1795
  513. data/rbi/stripe/resources/tax/calculation.rbi +0 -478
  514. data/rbi/stripe/resources/tax/calculation_line_item.rbi +0 -91
  515. data/rbi/stripe/resources/tax/registration.rbi +0 -3216
  516. data/rbi/stripe/resources/tax/settings.rbi +0 -141
  517. data/rbi/stripe/resources/tax/transaction.rbi +0 -351
  518. data/rbi/stripe/resources/tax/transaction_line_item.rbi +0 -54
  519. data/rbi/stripe/resources/tax_code.rbi +0 -44
  520. data/rbi/stripe/resources/tax_deducted_at_source.rbi +0 -23
  521. data/rbi/stripe/resources/tax_id.rbi +0 -165
  522. data/rbi/stripe/resources/tax_rate.rbi +0 -239
  523. data/rbi/stripe/resources/terminal/configuration.rbi +0 -1647
  524. data/rbi/stripe/resources/terminal/connection_token.rbi +0 -37
  525. data/rbi/stripe/resources/terminal/location.rbi +0 -222
  526. data/rbi/stripe/resources/terminal/reader.rbi +0 -1016
  527. data/rbi/stripe/resources/test_helpers/test_clock.rbi +0 -132
  528. data/rbi/stripe/resources/token.rbi +0 -1281
  529. data/rbi/stripe/resources/topup.rbi +0 -222
  530. data/rbi/stripe/resources/transfer.rbi +0 -199
  531. data/rbi/stripe/resources/treasury/credit_reversal.rbi +0 -119
  532. data/rbi/stripe/resources/treasury/debit_reversal.rbi +0 -131
  533. data/rbi/stripe/resources/treasury/financial_account.rbi +0 -869
  534. data/rbi/stripe/resources/treasury/financial_account_features.rbi +0 -260
  535. data/rbi/stripe/resources/treasury/inbound_transfer.rbi +0 -295
  536. data/rbi/stripe/resources/treasury/outbound_payment.rbi +0 -592
  537. data/rbi/stripe/resources/treasury/outbound_transfer.rbi +0 -431
  538. data/rbi/stripe/resources/treasury/received_credit.rbi +0 -302
  539. data/rbi/stripe/resources/treasury/received_debit.rbi +0 -256
  540. data/rbi/stripe/resources/treasury/transaction.rbi +0 -215
  541. data/rbi/stripe/resources/treasury/transaction_entry.rbi +0 -192
  542. data/rbi/stripe/resources/v2/amount.rbi +0 -14
  543. data/rbi/stripe/resources/v2/billing/meter_event.rbi +0 -37
  544. data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +0 -41
  545. data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +0 -31
  546. data/rbi/stripe/resources/v2/event.rbi +0 -48
  547. data/rbi/stripe/resources/v2/event_destination.rbi +0 -91
  548. data/rbi/stripe/resources/webhook_endpoint.rbi +0 -168
  549. data/rbi/stripe/services/account_capability_service.rbi +0 -51
  550. data/rbi/stripe/services/account_link_service.rbi +0 -60
  551. data/rbi/stripe/services/account_login_link_service.rbi +0 -22
  552. data/rbi/stripe/services/account_person_service.rbi +0 -1007
  553. data/rbi/stripe/services/account_service.rbi +0 -4281
  554. data/rbi/stripe/services/account_session_service.rbi +0 -748
  555. data/rbi/stripe/services/apple_pay_domain_service.rbi +0 -76
  556. data/rbi/stripe/services/application_fee_refund_service.rbi +0 -93
  557. data/rbi/stripe/services/application_fee_service.rbi +0 -78
  558. data/rbi/stripe/services/apps/secret_service.rbi +0 -151
  559. data/rbi/stripe/services/apps_service.rbi +0 -9
  560. data/rbi/stripe/services/balance_service.rbi +0 -21
  561. data/rbi/stripe/services/balance_transaction_service.rbi +0 -93
  562. data/rbi/stripe/services/billing/alert_service.rbi +0 -152
  563. data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +0 -68
  564. data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +0 -59
  565. data/rbi/stripe/services/billing/credit_grant_service.rbi +0 -211
  566. data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +0 -42
  567. data/rbi/stripe/services/billing/meter_event_service.rbi +0 -42
  568. data/rbi/stripe/services/billing/meter_event_summary_service.rbi +0 -54
  569. data/rbi/stripe/services/billing/meter_service.rbi +0 -163
  570. data/rbi/stripe/services/billing_portal/configuration_service.rbi +0 -561
  571. data/rbi/stripe/services/billing_portal/session_service.rbi +0 -204
  572. data/rbi/stripe/services/billing_portal_service.rbi +0 -10
  573. data/rbi/stripe/services/billing_service.rbi +0 -15
  574. data/rbi/stripe/services/charge_service.rbi +0 -448
  575. data/rbi/stripe/services/checkout/session_line_item_service.rbi +0 -33
  576. data/rbi/stripe/services/checkout/session_service.rbi +0 -2697
  577. data/rbi/stripe/services/checkout_service.rbi +0 -9
  578. data/rbi/stripe/services/climate/order_service.rbi +0 -142
  579. data/rbi/stripe/services/climate/product_service.rbi +0 -46
  580. data/rbi/stripe/services/climate_service.rbi +0 -11
  581. data/rbi/stripe/services/confirmation_token_service.rbi +0 -20
  582. data/rbi/stripe/services/country_spec_service.rbi +0 -44
  583. data/rbi/stripe/services/coupon_service.rbi +0 -194
  584. data/rbi/stripe/services/credit_note_preview_lines_service.rbi +0 -167
  585. data/rbi/stripe/services/credit_note_service.rbi +0 -415
  586. data/rbi/stripe/services/customer_balance_transaction_service.rbi +0 -92
  587. data/rbi/stripe/services/customer_cash_balance_service.rbi +0 -45
  588. data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +0 -44
  589. data/rbi/stripe/services/customer_funding_instructions_service.rbi +0 -59
  590. data/rbi/stripe/services/customer_payment_method_service.rbi +0 -57
  591. data/rbi/stripe/services/customer_payment_source_service.rbi +0 -232
  592. data/rbi/stripe/services/customer_service.rbi +0 -635
  593. data/rbi/stripe/services/customer_session_service.rbi +0 -116
  594. data/rbi/stripe/services/customer_tax_id_service.rbi +0 -70
  595. data/rbi/stripe/services/dispute_service.rbi +0 -424
  596. data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +0 -55
  597. data/rbi/stripe/services/entitlements/feature_service.rbi +0 -107
  598. data/rbi/stripe/services/entitlements_service.rbi +0 -10
  599. data/rbi/stripe/services/ephemeral_key_service.rbi +0 -53
  600. data/rbi/stripe/services/event_service.rbi +0 -83
  601. data/rbi/stripe/services/exchange_rate_service.rbi +0 -44
  602. data/rbi/stripe/services/file_link_service.rbi +0 -124
  603. data/rbi/stripe/services/file_service.rbi +0 -116
  604. data/rbi/stripe/services/financial_connections/account_owner_service.rbi +0 -42
  605. data/rbi/stripe/services/financial_connections/account_service.rbi +0 -133
  606. data/rbi/stripe/services/financial_connections/session_service.rbi +0 -88
  607. data/rbi/stripe/services/financial_connections/transaction_service.rbi +0 -92
  608. data/rbi/stripe/services/financial_connections_service.rbi +0 -11
  609. data/rbi/stripe/services/forwarding/request_service.rbi +0 -134
  610. data/rbi/stripe/services/forwarding_service.rbi +0 -9
  611. data/rbi/stripe/services/identity/verification_report_service.rbi +0 -87
  612. data/rbi/stripe/services/identity/verification_session_service.rbi +0 -339
  613. data/rbi/stripe/services/identity_service.rbi +0 -10
  614. data/rbi/stripe/services/invoice_item_service.rbi +0 -366
  615. data/rbi/stripe/services/invoice_line_item_service.rbi +0 -259
  616. data/rbi/stripe/services/invoice_payment_service.rbi +0 -71
  617. data/rbi/stripe/services/invoice_rendering_template_service.rbi +0 -82
  618. data/rbi/stripe/services/invoice_service.rbi +0 -3073
  619. data/rbi/stripe/services/issuing/authorization_service.rbi +0 -146
  620. data/rbi/stripe/services/issuing/card_service.rbi +0 -503
  621. data/rbi/stripe/services/issuing/cardholder_service.rbi +0 -587
  622. data/rbi/stripe/services/issuing/dispute_service.rbi +0 -707
  623. data/rbi/stripe/services/issuing/personalization_design_service.rbi +0 -243
  624. data/rbi/stripe/services/issuing/physical_bundle_service.rbi +0 -59
  625. data/rbi/stripe/services/issuing/token_service.rbi +0 -99
  626. data/rbi/stripe/services/issuing/transaction_service.rbi +0 -105
  627. data/rbi/stripe/services/issuing_service.rbi +0 -16
  628. data/rbi/stripe/services/mandate_service.rbi +0 -20
  629. data/rbi/stripe/services/payment_intent_service.rbi +0 -8010
  630. data/rbi/stripe/services/payment_link_service.rbi +0 -1441
  631. data/rbi/stripe/services/payment_method_configuration_service.rbi +0 -2487
  632. data/rbi/stripe/services/payment_method_domain_service.rbi +0 -112
  633. data/rbi/stripe/services/payment_method_service.rbi +0 -781
  634. data/rbi/stripe/services/payout_service.rbi +0 -209
  635. data/rbi/stripe/services/plan_service.rbi +0 -282
  636. data/rbi/stripe/services/price_service.rbi +0 -546
  637. data/rbi/stripe/services/product_feature_service.rbi +0 -67
  638. data/rbi/stripe/services/product_service.rbi +0 -477
  639. data/rbi/stripe/services/promotion_code_service.rbi +0 -214
  640. data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +0 -31
  641. data/rbi/stripe/services/quote_service.rbi +0 -695
  642. data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +0 -85
  643. data/rbi/stripe/services/radar/value_list_item_service.rbi +0 -109
  644. data/rbi/stripe/services/radar/value_list_service.rbi +0 -141
  645. data/rbi/stripe/services/radar_service.rbi +0 -11
  646. data/rbi/stripe/services/refund_service.rbi +0 -185
  647. data/rbi/stripe/services/reporting/report_run_service.rbi +0 -135
  648. data/rbi/stripe/services/reporting/report_type_service.rbi +0 -35
  649. data/rbi/stripe/services/reporting_service.rbi +0 -10
  650. data/rbi/stripe/services/review_service.rbi +0 -84
  651. data/rbi/stripe/services/setup_attempt_service.rbi +0 -65
  652. data/rbi/stripe/services/setup_intent_service.rbi +0 -3709
  653. data/rbi/stripe/services/shipping_rate_service.rbi +0 -241
  654. data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +0 -46
  655. data/rbi/stripe/services/sigma_service.rbi +0 -9
  656. data/rbi/stripe/services/source_service.rbi +0 -663
  657. data/rbi/stripe/services/subscription_item_service.rbi +0 -350
  658. data/rbi/stripe/services/subscription_schedule_service.rbi +0 -1425
  659. data/rbi/stripe/services/subscription_service.rbi +0 -1768
  660. data/rbi/stripe/services/tax/calculation_service.rbi +0 -234
  661. data/rbi/stripe/services/tax/registration_service.rbi +0 -2278
  662. data/rbi/stripe/services/tax/settings_service.rbi +0 -93
  663. data/rbi/stripe/services/tax/transaction_service.rbi +0 -146
  664. data/rbi/stripe/services/tax_code_service.rbi +0 -44
  665. data/rbi/stripe/services/tax_id_service.rbi +0 -110
  666. data/rbi/stripe/services/tax_rate_service.rbi +0 -185
  667. data/rbi/stripe/services/tax_service.rbi +0 -12
  668. data/rbi/stripe/services/terminal/configuration_service.rbi +0 -1328
  669. data/rbi/stripe/services/terminal/connection_token_service.rbi +0 -25
  670. data/rbi/stripe/services/terminal/location_service.rbi +0 -182
  671. data/rbi/stripe/services/terminal/reader_service.rbi +0 -540
  672. data/rbi/stripe/services/terminal_service.rbi +0 -12
  673. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +0 -746
  674. data/rbi/stripe/services/test_helpers/customer_service.rbi +0 -33
  675. data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +0 -848
  676. data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +0 -76
  677. data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +0 -69
  678. data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +0 -711
  679. data/rbi/stripe/services/test_helpers/issuing_service.rbi +0 -14
  680. data/rbi/stripe/services/test_helpers/refund_service.rbi +0 -22
  681. data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +0 -117
  682. data/rbi/stripe/services/test_helpers/terminal_service.rbi +0 -11
  683. data/rbi/stripe/services/test_helpers/test_clock_service.rbi +0 -90
  684. data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +0 -64
  685. data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +0 -125
  686. data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +0 -125
  687. data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +0 -87
  688. data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +0 -87
  689. data/rbi/stripe/services/test_helpers/treasury_service.rbi +0 -15
  690. data/rbi/stripe/services/test_helpers_service.rbi +0 -15
  691. data/rbi/stripe/services/token_service.rbi +0 -1255
  692. data/rbi/stripe/services/topup_service.rbi +0 -176
  693. data/rbi/stripe/services/transfer_reversal_service.rbi +0 -101
  694. data/rbi/stripe/services/transfer_service.rbi +0 -152
  695. data/rbi/stripe/services/treasury/credit_reversal_service.rbi +0 -84
  696. data/rbi/stripe/services/treasury/debit_reversal_service.rbi +0 -88
  697. data/rbi/stripe/services/treasury/financial_account_features_service.rbi +0 -198
  698. data/rbi/stripe/services/treasury/financial_account_service.rbi +0 -566
  699. data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +0 -117
  700. data/rbi/stripe/services/treasury/outbound_payment_service.rbi +0 -304
  701. data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +0 -157
  702. data/rbi/stripe/services/treasury/received_credit_service.rbi +0 -72
  703. data/rbi/stripe/services/treasury/received_debit_service.rbi +0 -59
  704. data/rbi/stripe/services/treasury/transaction_entry_service.rbi +0 -111
  705. data/rbi/stripe/services/treasury/transaction_service.rbi +0 -122
  706. data/rbi/stripe/services/treasury_service.rbi +0 -18
  707. data/rbi/stripe/services/v1_services.rbi +0 -77
  708. data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +0 -39
  709. data/rbi/stripe/services/v2/billing/meter_event_service.rbi +0 -42
  710. data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +0 -18
  711. data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +0 -55
  712. data/rbi/stripe/services/v2/billing_service.rbi +0 -14
  713. data/rbi/stripe/services/v2/core/event_destination_service.rbi +0 -192
  714. data/rbi/stripe/services/v2/core/event_service.rbi +0 -36
  715. data/rbi/stripe/services/v2/core_service.rbi +0 -12
  716. data/rbi/stripe/services/v2_services.rbi +0 -10
  717. data/rbi/stripe/services/webhook_endpoint_service.rbi +0 -129
@@ -49,6 +49,25 @@ module Stripe
49
49
 
50
50
  nested_resource_class_methods :line, operations: %i[list]
51
51
 
52
+ class AmountsDue < Stripe::StripeObject
53
+ # Incremental amount due for this payment in cents (or local equivalent).
54
+ attr_reader :amount
55
+ # The amount in cents (or local equivalent) that was paid for this payment.
56
+ attr_reader :amount_paid
57
+ # The difference between the payment’s amount and amount_paid, in cents (or local equivalent).
58
+ attr_reader :amount_remaining
59
+ # Number of days from when invoice is finalized until the payment is due.
60
+ attr_reader :days_until_due
61
+ # An arbitrary string attached to the object. Often useful for displaying to users.
62
+ attr_reader :description
63
+ # Date on which a payment plan’s payment is due.
64
+ attr_reader :due_date
65
+ # Timestamp when the payment was paid.
66
+ attr_reader :paid_at
67
+ # The status of the payment, one of `open`, `paid`, or `past_due`
68
+ attr_reader :status
69
+ end
70
+
52
71
  class AutomaticTax < Stripe::StripeObject
53
72
  class Liability < Stripe::StripeObject
54
73
  # The connected account being referenced when `type` is `account`.
@@ -215,20 +234,35 @@ module Stripe
215
234
  end
216
235
 
217
236
  class Parent < Stripe::StripeObject
237
+ class BillingCadenceDetails < Stripe::StripeObject
238
+ # The billing cadence that generated this invoice
239
+ attr_reader :billing_cadence
240
+ end
241
+
218
242
  class QuoteDetails < Stripe::StripeObject
219
243
  # The quote that generated this invoice
220
244
  attr_reader :quote
221
245
  end
222
246
 
223
247
  class SubscriptionDetails < Stripe::StripeObject
248
+ class PauseCollection < Stripe::StripeObject
249
+ # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
250
+ attr_reader :behavior
251
+ # The time after which the subscription will resume collecting payments.
252
+ attr_reader :resumes_at
253
+ end
224
254
  # Set of [key-value pairs](https://stripe.com/docs/api/metadata) defined as subscription metadata when an invoice is created. Becomes an immutable snapshot of the subscription metadata at the time of invoice finalization.
225
255
  # *Note: This attribute is populated only for invoices created on or after June 29, 2023.*
226
256
  attr_reader :metadata
257
+ # 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).
258
+ attr_reader :pause_collection
227
259
  # The subscription that generated this invoice
228
260
  attr_reader :subscription
229
261
  # Only set for upcoming invoices that preview prorations. The time used to calculate prorations.
230
262
  attr_reader :subscription_proration_date
231
263
  end
264
+ # Details about the billing cadence that generated this invoice
265
+ attr_reader :billing_cadence_details
232
266
  # Details about the quote that generated this invoice
233
267
  attr_reader :quote_details
234
268
  # Details about the subscription that generated this invoice
@@ -283,14 +317,32 @@ module Stripe
283
317
  attr_reader :funding_type
284
318
  end
285
319
 
320
+ class IdBankTransfer < Stripe::StripeObject; end
286
321
  class Konbini < Stripe::StripeObject; end
287
322
  class SepaDebit < Stripe::StripeObject; end
288
323
 
324
+ class Upi < Stripe::StripeObject
325
+ class MandateOptions < Stripe::StripeObject
326
+ # Amount to be charged for future payments.
327
+ attr_reader :amount
328
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
329
+ attr_reader :amount_type
330
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
331
+ attr_reader :description
332
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
333
+ attr_reader :end_date
334
+ end
335
+ # Attribute for field mandate_options
336
+ attr_reader :mandate_options
337
+ end
338
+
289
339
  class UsBankAccount < Stripe::StripeObject
290
340
  class FinancialConnections < Stripe::StripeObject
291
341
  class Filters < Stripe::StripeObject
292
342
  # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
293
343
  attr_reader :account_subcategories
344
+ # The institution to use to filter for possible accounts to link.
345
+ attr_reader :institution
294
346
  end
295
347
  # Attribute for field filters
296
348
  attr_reader :filters
@@ -312,10 +364,14 @@ module Stripe
312
364
  attr_reader :card
313
365
  # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
314
366
  attr_reader :customer_balance
367
+ # 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.
368
+ attr_reader :id_bank_transfer
315
369
  # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
316
370
  attr_reader :konbini
317
371
  # 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.
318
372
  attr_reader :sepa_debit
373
+ # If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice’s PaymentIntent.
374
+ attr_reader :upi
319
375
  # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
320
376
  attr_reader :us_bank_account
321
377
  end
@@ -425,6 +481,13 @@ module Stripe
425
481
  attr_reader :discount
426
482
  end
427
483
 
484
+ class TotalMarginAmount < Stripe::StripeObject
485
+ # The amount, in cents (or local equivalent), of the reduction in line item amount.
486
+ attr_reader :amount
487
+ # The margin that was applied to get this margin amount.
488
+ attr_reader :margin
489
+ end
490
+
428
491
  class TotalPretaxCreditAmount < Stripe::StripeObject
429
492
  # The amount, in cents (or local equivalent), of the pretax credit amount.
430
493
  attr_reader :amount
@@ -432,6 +495,8 @@ module Stripe
432
495
  attr_reader :credit_balance_transaction
433
496
  # The discount that was applied to get this pretax credit amount.
434
497
  attr_reader :discount
498
+ # The margin that was applied to get this pretax credit amount.
499
+ attr_reader :margin
435
500
  # Type of the pretax credit amount referenced.
436
501
  attr_reader :type
437
502
  end
@@ -458,6 +523,24 @@ module Stripe
458
523
  class DeleteParams < Stripe::RequestParams; end
459
524
 
460
525
  class UpdateParams < Stripe::RequestParams
526
+ class AmountsDue < Stripe::RequestParams
527
+ # The amount in cents (or local equivalent).
528
+ attr_accessor :amount
529
+ # Number of days from when invoice is finalized until the payment is due.
530
+ attr_accessor :days_until_due
531
+ # An arbitrary string attached to the object. Often useful for displaying to users.
532
+ attr_accessor :description
533
+ # Date on which a payment plan’s payment is due.
534
+ attr_accessor :due_date
535
+
536
+ def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil)
537
+ @amount = amount
538
+ @days_until_due = days_until_due
539
+ @description = description
540
+ @due_date = due_date
541
+ end
542
+ end
543
+
461
544
  class AutomaticTax < Stripe::RequestParams
462
545
  class Liability < Stripe::RequestParams
463
546
  # The connected account being referenced when `type` is `account`.
@@ -494,16 +577,44 @@ module Stripe
494
577
  end
495
578
 
496
579
  class Discount < Stripe::RequestParams
580
+ class DiscountEnd < Stripe::RequestParams
581
+ class Duration < Stripe::RequestParams
582
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
583
+ attr_accessor :interval
584
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
585
+ attr_accessor :interval_count
586
+
587
+ def initialize(interval: nil, interval_count: nil)
588
+ @interval = interval
589
+ @interval_count = interval_count
590
+ end
591
+ end
592
+ # Time span for the redeemed discount.
593
+ attr_accessor :duration
594
+ # A precise Unix timestamp for the discount to end. Must be in the future.
595
+ attr_accessor :timestamp
596
+ # The type of calculation made to determine when the discount ends.
597
+ attr_accessor :type
598
+
599
+ def initialize(duration: nil, timestamp: nil, type: nil)
600
+ @duration = duration
601
+ @timestamp = timestamp
602
+ @type = type
603
+ end
604
+ end
497
605
  # ID of the coupon to create a new discount for.
498
606
  attr_accessor :coupon
499
607
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
500
608
  attr_accessor :discount
609
+ # Details to determine how long the discount should be applied for.
610
+ attr_accessor :discount_end
501
611
  # ID of the promotion code to create a new discount for.
502
612
  attr_accessor :promotion_code
503
613
 
504
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
614
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
505
615
  @coupon = coupon
506
616
  @discount = discount
617
+ @discount_end = discount_end
507
618
  @promotion_code = promotion_code
508
619
  end
509
620
  end
@@ -623,17 +734,47 @@ module Stripe
623
734
  end
624
735
  end
625
736
 
737
+ class IdBankTransfer < Stripe::RequestParams; end
626
738
  class Konbini < Stripe::RequestParams; end
627
739
  class SepaDebit < Stripe::RequestParams; end
628
740
 
741
+ class Upi < Stripe::RequestParams
742
+ class MandateOptions < Stripe::RequestParams
743
+ # Amount to be charged for future payments.
744
+ attr_accessor :amount
745
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
746
+ attr_accessor :amount_type
747
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
748
+ attr_accessor :description
749
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
750
+ attr_accessor :end_date
751
+
752
+ def initialize(amount: nil, amount_type: nil, description: nil, end_date: nil)
753
+ @amount = amount
754
+ @amount_type = amount_type
755
+ @description = description
756
+ @end_date = end_date
757
+ end
758
+ end
759
+ # Configuration options for setting up an eMandate
760
+ attr_accessor :mandate_options
761
+
762
+ def initialize(mandate_options: nil)
763
+ @mandate_options = mandate_options
764
+ end
765
+ end
766
+
629
767
  class UsBankAccount < Stripe::RequestParams
630
768
  class FinancialConnections < Stripe::RequestParams
631
769
  class Filters < Stripe::RequestParams
632
770
  # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
633
771
  attr_accessor :account_subcategories
772
+ # ID of the institution to use to filter for selectable accounts.
773
+ attr_accessor :institution
634
774
 
635
- def initialize(account_subcategories: nil)
775
+ def initialize(account_subcategories: nil, institution: nil)
636
776
  @account_subcategories = account_subcategories
777
+ @institution = institution
637
778
  end
638
779
  end
639
780
  # Provide filters for the linked accounts that the customer can select for the payment method.
@@ -667,10 +808,14 @@ module Stripe
667
808
  attr_accessor :card
668
809
  # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
669
810
  attr_accessor :customer_balance
811
+ # 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.
812
+ attr_accessor :id_bank_transfer
670
813
  # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
671
814
  attr_accessor :konbini
672
815
  # 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.
673
816
  attr_accessor :sepa_debit
817
+ # If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice’s PaymentIntent.
818
+ attr_accessor :upi
674
819
  # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
675
820
  attr_accessor :us_bank_account
676
821
 
@@ -679,16 +824,20 @@ module Stripe
679
824
  bancontact: nil,
680
825
  card: nil,
681
826
  customer_balance: nil,
827
+ id_bank_transfer: nil,
682
828
  konbini: nil,
683
829
  sepa_debit: nil,
830
+ upi: nil,
684
831
  us_bank_account: nil
685
832
  )
686
833
  @acss_debit = acss_debit
687
834
  @bancontact = bancontact
688
835
  @card = card
689
836
  @customer_balance = customer_balance
837
+ @id_bank_transfer = id_bank_transfer
690
838
  @konbini = konbini
691
839
  @sepa_debit = sepa_debit
840
+ @upi = upi
692
841
  @us_bank_account = us_bank_account
693
842
  end
694
843
  end
@@ -898,6 +1047,8 @@ module Stripe
898
1047
  end
899
1048
  # The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
900
1049
  attr_accessor :account_tax_ids
1050
+ # List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
1051
+ attr_accessor :amounts_due
901
1052
  # 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).
902
1053
  attr_accessor :application_fee_amount
903
1054
  # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice.
@@ -912,6 +1063,8 @@ module Stripe
912
1063
  attr_accessor :custom_fields
913
1064
  # 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.
914
1065
  attr_accessor :days_until_due
1066
+ # The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
1067
+ attr_accessor :default_margins
915
1068
  # 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.
916
1069
  attr_accessor :default_payment_method
917
1070
  # 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.
@@ -953,6 +1106,7 @@ module Stripe
953
1106
 
954
1107
  def initialize(
955
1108
  account_tax_ids: nil,
1109
+ amounts_due: nil,
956
1110
  application_fee_amount: nil,
957
1111
  auto_advance: nil,
958
1112
  automatic_tax: nil,
@@ -960,6 +1114,7 @@ module Stripe
960
1114
  collection_method: nil,
961
1115
  custom_fields: nil,
962
1116
  days_until_due: nil,
1117
+ default_margins: nil,
963
1118
  default_payment_method: nil,
964
1119
  default_source: nil,
965
1120
  default_tax_rates: nil,
@@ -981,6 +1136,7 @@ module Stripe
981
1136
  transfer_data: nil
982
1137
  )
983
1138
  @account_tax_ids = account_tax_ids
1139
+ @amounts_due = amounts_due
984
1140
  @application_fee_amount = application_fee_amount
985
1141
  @auto_advance = auto_advance
986
1142
  @automatic_tax = automatic_tax
@@ -988,6 +1144,7 @@ module Stripe
988
1144
  @collection_method = collection_method
989
1145
  @custom_fields = custom_fields
990
1146
  @days_until_due = days_until_due
1147
+ @default_margins = default_margins
991
1148
  @default_payment_method = default_payment_method
992
1149
  @default_source = default_source
993
1150
  @default_tax_rates = default_tax_rates
@@ -1052,6 +1209,8 @@ module Stripe
1052
1209
  attr_accessor :created
1053
1210
  # Only return invoices for the customer specified by this customer ID.
1054
1211
  attr_accessor :customer
1212
+ # Only return invoices for the account specified by this account ID.
1213
+ attr_accessor :customer_account
1055
1214
  # Attribute for param field due_date
1056
1215
  attr_accessor :due_date
1057
1216
  # 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.
@@ -1071,6 +1230,7 @@ module Stripe
1071
1230
  collection_method: nil,
1072
1231
  created: nil,
1073
1232
  customer: nil,
1233
+ customer_account: nil,
1074
1234
  due_date: nil,
1075
1235
  ending_before: nil,
1076
1236
  expand: nil,
@@ -1082,6 +1242,7 @@ module Stripe
1082
1242
  @collection_method = collection_method
1083
1243
  @created = created
1084
1244
  @customer = customer
1245
+ @customer_account = customer_account
1085
1246
  @due_date = due_date
1086
1247
  @ending_before = ending_before
1087
1248
  @expand = expand
@@ -1093,6 +1254,24 @@ module Stripe
1093
1254
  end
1094
1255
 
1095
1256
  class CreateParams < Stripe::RequestParams
1257
+ class AmountsDue < Stripe::RequestParams
1258
+ # The amount in cents (or local equivalent).
1259
+ attr_accessor :amount
1260
+ # Number of days from when invoice is finalized until the payment is due.
1261
+ attr_accessor :days_until_due
1262
+ # An arbitrary string attached to the object. Often useful for displaying to users.
1263
+ attr_accessor :description
1264
+ # Date on which a payment plan’s payment is due.
1265
+ attr_accessor :due_date
1266
+
1267
+ def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil)
1268
+ @amount = amount
1269
+ @days_until_due = days_until_due
1270
+ @description = description
1271
+ @due_date = due_date
1272
+ end
1273
+ end
1274
+
1096
1275
  class AutomaticTax < Stripe::RequestParams
1097
1276
  class Liability < Stripe::RequestParams
1098
1277
  # The connected account being referenced when `type` is `account`.
@@ -1129,16 +1308,44 @@ module Stripe
1129
1308
  end
1130
1309
 
1131
1310
  class Discount < Stripe::RequestParams
1311
+ class DiscountEnd < Stripe::RequestParams
1312
+ class Duration < Stripe::RequestParams
1313
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1314
+ attr_accessor :interval
1315
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1316
+ attr_accessor :interval_count
1317
+
1318
+ def initialize(interval: nil, interval_count: nil)
1319
+ @interval = interval
1320
+ @interval_count = interval_count
1321
+ end
1322
+ end
1323
+ # Time span for the redeemed discount.
1324
+ attr_accessor :duration
1325
+ # A precise Unix timestamp for the discount to end. Must be in the future.
1326
+ attr_accessor :timestamp
1327
+ # The type of calculation made to determine when the discount ends.
1328
+ attr_accessor :type
1329
+
1330
+ def initialize(duration: nil, timestamp: nil, type: nil)
1331
+ @duration = duration
1332
+ @timestamp = timestamp
1333
+ @type = type
1334
+ end
1335
+ end
1132
1336
  # ID of the coupon to create a new discount for.
1133
1337
  attr_accessor :coupon
1134
1338
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
1135
1339
  attr_accessor :discount
1340
+ # Details to determine how long the discount should be applied for.
1341
+ attr_accessor :discount_end
1136
1342
  # ID of the promotion code to create a new discount for.
1137
1343
  attr_accessor :promotion_code
1138
1344
 
1139
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
1345
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1140
1346
  @coupon = coupon
1141
1347
  @discount = discount
1348
+ @discount_end = discount_end
1142
1349
  @promotion_code = promotion_code
1143
1350
  end
1144
1351
  end
@@ -1270,17 +1477,47 @@ module Stripe
1270
1477
  end
1271
1478
  end
1272
1479
 
1480
+ class IdBankTransfer < Stripe::RequestParams; end
1273
1481
  class Konbini < Stripe::RequestParams; end
1274
1482
  class SepaDebit < Stripe::RequestParams; end
1275
1483
 
1484
+ class Upi < Stripe::RequestParams
1485
+ class MandateOptions < Stripe::RequestParams
1486
+ # Amount to be charged for future payments.
1487
+ attr_accessor :amount
1488
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
1489
+ attr_accessor :amount_type
1490
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
1491
+ attr_accessor :description
1492
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
1493
+ attr_accessor :end_date
1494
+
1495
+ def initialize(amount: nil, amount_type: nil, description: nil, end_date: nil)
1496
+ @amount = amount
1497
+ @amount_type = amount_type
1498
+ @description = description
1499
+ @end_date = end_date
1500
+ end
1501
+ end
1502
+ # Configuration options for setting up an eMandate
1503
+ attr_accessor :mandate_options
1504
+
1505
+ def initialize(mandate_options: nil)
1506
+ @mandate_options = mandate_options
1507
+ end
1508
+ end
1509
+
1276
1510
  class UsBankAccount < Stripe::RequestParams
1277
1511
  class FinancialConnections < Stripe::RequestParams
1278
1512
  class Filters < Stripe::RequestParams
1279
1513
  # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
1280
1514
  attr_accessor :account_subcategories
1515
+ # ID of the institution to use to filter for selectable accounts.
1516
+ attr_accessor :institution
1281
1517
 
1282
- def initialize(account_subcategories: nil)
1518
+ def initialize(account_subcategories: nil, institution: nil)
1283
1519
  @account_subcategories = account_subcategories
1520
+ @institution = institution
1284
1521
  end
1285
1522
  end
1286
1523
  # Provide filters for the linked accounts that the customer can select for the payment method.
@@ -1314,10 +1551,14 @@ module Stripe
1314
1551
  attr_accessor :card
1315
1552
  # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
1316
1553
  attr_accessor :customer_balance
1554
+ # 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.
1555
+ attr_accessor :id_bank_transfer
1317
1556
  # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
1318
1557
  attr_accessor :konbini
1319
1558
  # 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.
1320
1559
  attr_accessor :sepa_debit
1560
+ # If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice’s PaymentIntent.
1561
+ attr_accessor :upi
1321
1562
  # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
1322
1563
  attr_accessor :us_bank_account
1323
1564
 
@@ -1326,16 +1567,20 @@ module Stripe
1326
1567
  bancontact: nil,
1327
1568
  card: nil,
1328
1569
  customer_balance: nil,
1570
+ id_bank_transfer: nil,
1329
1571
  konbini: nil,
1330
1572
  sepa_debit: nil,
1573
+ upi: nil,
1331
1574
  us_bank_account: nil
1332
1575
  )
1333
1576
  @acss_debit = acss_debit
1334
1577
  @bancontact = bancontact
1335
1578
  @card = card
1336
1579
  @customer_balance = customer_balance
1580
+ @id_bank_transfer = id_bank_transfer
1337
1581
  @konbini = konbini
1338
1582
  @sepa_debit = sepa_debit
1583
+ @upi = upi
1339
1584
  @us_bank_account = us_bank_account
1340
1585
  end
1341
1586
  end
@@ -1545,6 +1790,8 @@ module Stripe
1545
1790
  end
1546
1791
  # The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
1547
1792
  attr_accessor :account_tax_ids
1793
+ # List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
1794
+ attr_accessor :amounts_due
1548
1795
  # 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).
1549
1796
  attr_accessor :application_fee_amount
1550
1797
  # 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. Defaults to false.
@@ -1561,8 +1808,12 @@ module Stripe
1561
1808
  attr_accessor :custom_fields
1562
1809
  # The ID of the customer who will be billed.
1563
1810
  attr_accessor :customer
1811
+ # The ID of the account who will be billed.
1812
+ attr_accessor :customer_account
1564
1813
  # The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.
1565
1814
  attr_accessor :days_until_due
1815
+ # The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
1816
+ attr_accessor :default_margins
1566
1817
  # 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.
1567
1818
  attr_accessor :default_payment_method
1568
1819
  # 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.
@@ -1610,6 +1861,7 @@ module Stripe
1610
1861
 
1611
1862
  def initialize(
1612
1863
  account_tax_ids: nil,
1864
+ amounts_due: nil,
1613
1865
  application_fee_amount: nil,
1614
1866
  auto_advance: nil,
1615
1867
  automatic_tax: nil,
@@ -1618,7 +1870,9 @@ module Stripe
1618
1870
  currency: nil,
1619
1871
  custom_fields: nil,
1620
1872
  customer: nil,
1873
+ customer_account: nil,
1621
1874
  days_until_due: nil,
1875
+ default_margins: nil,
1622
1876
  default_payment_method: nil,
1623
1877
  default_source: nil,
1624
1878
  default_tax_rates: nil,
@@ -1643,6 +1897,7 @@ module Stripe
1643
1897
  transfer_data: nil
1644
1898
  )
1645
1899
  @account_tax_ids = account_tax_ids
1900
+ @amounts_due = amounts_due
1646
1901
  @application_fee_amount = application_fee_amount
1647
1902
  @auto_advance = auto_advance
1648
1903
  @automatic_tax = automatic_tax
@@ -1651,7 +1906,9 @@ module Stripe
1651
1906
  @currency = currency
1652
1907
  @custom_fields = custom_fields
1653
1908
  @customer = customer
1909
+ @customer_account = customer_account
1654
1910
  @days_until_due = days_until_due
1911
+ @default_margins = default_margins
1655
1912
  @default_payment_method = default_payment_method
1656
1913
  @default_source = default_source
1657
1914
  @default_tax_rates = default_tax_rates
@@ -1698,16 +1955,44 @@ module Stripe
1698
1955
  class AddLinesParams < Stripe::RequestParams
1699
1956
  class Line < Stripe::RequestParams
1700
1957
  class Discount < Stripe::RequestParams
1958
+ class DiscountEnd < Stripe::RequestParams
1959
+ class Duration < Stripe::RequestParams
1960
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1961
+ attr_accessor :interval
1962
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1963
+ attr_accessor :interval_count
1964
+
1965
+ def initialize(interval: nil, interval_count: nil)
1966
+ @interval = interval
1967
+ @interval_count = interval_count
1968
+ end
1969
+ end
1970
+ # Time span for the redeemed discount.
1971
+ attr_accessor :duration
1972
+ # A precise Unix timestamp for the discount to end. Must be in the future.
1973
+ attr_accessor :timestamp
1974
+ # The type of calculation made to determine when the discount ends.
1975
+ attr_accessor :type
1976
+
1977
+ def initialize(duration: nil, timestamp: nil, type: nil)
1978
+ @duration = duration
1979
+ @timestamp = timestamp
1980
+ @type = type
1981
+ end
1982
+ end
1701
1983
  # ID of the coupon to create a new discount for.
1702
1984
  attr_accessor :coupon
1703
1985
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
1704
1986
  attr_accessor :discount
1987
+ # Details to determine how long the discount should be applied for.
1988
+ attr_accessor :discount_end
1705
1989
  # ID of the promotion code to create a new discount for.
1706
1990
  attr_accessor :promotion_code
1707
1991
 
1708
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
1992
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1709
1993
  @coupon = coupon
1710
1994
  @discount = discount
1995
+ @discount_end = discount_end
1711
1996
  @promotion_code = promotion_code
1712
1997
  end
1713
1998
  end
@@ -1860,6 +2145,8 @@ module Stripe
1860
2145
  attr_accessor :discounts
1861
2146
  # ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created.
1862
2147
  attr_accessor :invoice_item
2148
+ # 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.
2149
+ attr_accessor :margins
1863
2150
  # 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`.
1864
2151
  attr_accessor :metadata
1865
2152
  # 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.
@@ -1881,6 +2168,7 @@ module Stripe
1881
2168
  discountable: nil,
1882
2169
  discounts: nil,
1883
2170
  invoice_item: nil,
2171
+ margins: nil,
1884
2172
  metadata: nil,
1885
2173
  period: nil,
1886
2174
  price_data: nil,
@@ -1894,6 +2182,7 @@ module Stripe
1894
2182
  @discountable = discountable
1895
2183
  @discounts = discounts
1896
2184
  @invoice_item = invoice_item
2185
+ @margins = margins
1897
2186
  @metadata = metadata
1898
2187
  @period = period
1899
2188
  @price_data = price_data
@@ -1918,14 +2207,59 @@ module Stripe
1918
2207
  end
1919
2208
 
1920
2209
  class AttachPaymentParams < Stripe::RequestParams
2210
+ class PaymentRecordData < Stripe::RequestParams
2211
+ # The amount that was paid out of band.
2212
+ attr_accessor :amount
2213
+ # The currency that was paid out of band.
2214
+ attr_accessor :currency
2215
+ # 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`.
2216
+ attr_accessor :metadata
2217
+ # The type of money movement for this out of band payment record.
2218
+ attr_accessor :money_movement_type
2219
+ # The timestamp when this out of band payment was paid.
2220
+ attr_accessor :paid_at
2221
+ # The reference for this out of band payment record.
2222
+ attr_accessor :payment_reference
2223
+
2224
+ def initialize(
2225
+ amount: nil,
2226
+ currency: nil,
2227
+ metadata: nil,
2228
+ money_movement_type: nil,
2229
+ paid_at: nil,
2230
+ payment_reference: nil
2231
+ )
2232
+ @amount = amount
2233
+ @currency = currency
2234
+ @metadata = metadata
2235
+ @money_movement_type = money_movement_type
2236
+ @paid_at = paid_at
2237
+ @payment_reference = payment_reference
2238
+ end
2239
+ end
2240
+ # The portion of the `amount` on the PaymentIntent or out of band payment to apply to this invoice. It defaults to the entire amount.
2241
+ attr_accessor :amount_requested
1921
2242
  # Specifies which fields in the response should be expanded.
1922
2243
  attr_accessor :expand
1923
2244
  # The ID of the PaymentIntent to attach to the invoice.
1924
2245
  attr_accessor :payment_intent
2246
+ # The ID of the PaymentRecord to attach to the invoice.
2247
+ attr_accessor :payment_record
2248
+ # The PaymentRecord data for attaching an out of band payment to the invoice.
2249
+ attr_accessor :payment_record_data
1925
2250
 
1926
- def initialize(expand: nil, payment_intent: nil)
2251
+ def initialize(
2252
+ amount_requested: nil,
2253
+ expand: nil,
2254
+ payment_intent: nil,
2255
+ payment_record: nil,
2256
+ payment_record_data: nil
2257
+ )
2258
+ @amount_requested = amount_requested
1927
2259
  @expand = expand
1928
2260
  @payment_intent = payment_intent
2261
+ @payment_record = payment_record
2262
+ @payment_record_data = payment_record_data
1929
2263
  end
1930
2264
  end
1931
2265
 
@@ -2025,16 +2359,44 @@ module Stripe
2025
2359
  class UpdateLinesParams < Stripe::RequestParams
2026
2360
  class Line < Stripe::RequestParams
2027
2361
  class Discount < Stripe::RequestParams
2362
+ class DiscountEnd < Stripe::RequestParams
2363
+ class Duration < Stripe::RequestParams
2364
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2365
+ attr_accessor :interval
2366
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2367
+ attr_accessor :interval_count
2368
+
2369
+ def initialize(interval: nil, interval_count: nil)
2370
+ @interval = interval
2371
+ @interval_count = interval_count
2372
+ end
2373
+ end
2374
+ # Time span for the redeemed discount.
2375
+ attr_accessor :duration
2376
+ # A precise Unix timestamp for the discount to end. Must be in the future.
2377
+ attr_accessor :timestamp
2378
+ # The type of calculation made to determine when the discount ends.
2379
+ attr_accessor :type
2380
+
2381
+ def initialize(duration: nil, timestamp: nil, type: nil)
2382
+ @duration = duration
2383
+ @timestamp = timestamp
2384
+ @type = type
2385
+ end
2386
+ end
2028
2387
  # ID of the coupon to create a new discount for.
2029
2388
  attr_accessor :coupon
2030
2389
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
2031
2390
  attr_accessor :discount
2391
+ # Details to determine how long the discount should be applied for.
2392
+ attr_accessor :discount_end
2032
2393
  # ID of the promotion code to create a new discount for.
2033
2394
  attr_accessor :promotion_code
2034
2395
 
2035
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
2396
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
2036
2397
  @coupon = coupon
2037
2398
  @discount = discount
2399
+ @discount_end = discount_end
2038
2400
  @promotion_code = promotion_code
2039
2401
  end
2040
2402
  end
@@ -2187,6 +2549,8 @@ module Stripe
2187
2549
  attr_accessor :discounts
2188
2550
  # ID of an existing line item on the invoice.
2189
2551
  attr_accessor :id
2552
+ # 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.
2553
+ attr_accessor :margins
2190
2554
  # 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.
2191
2555
  attr_accessor :metadata
2192
2556
  # 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.
@@ -2208,6 +2572,7 @@ module Stripe
2208
2572
  discountable: nil,
2209
2573
  discounts: nil,
2210
2574
  id: nil,
2575
+ margins: nil,
2211
2576
  metadata: nil,
2212
2577
  period: nil,
2213
2578
  price_data: nil,
@@ -2221,6 +2586,7 @@ module Stripe
2221
2586
  @discountable = discountable
2222
2587
  @discounts = discounts
2223
2588
  @id = id
2589
+ @margins = margins
2224
2590
  @metadata = metadata
2225
2591
  @period = period
2226
2592
  @price_data = price_data
@@ -2395,32 +2761,88 @@ module Stripe
2395
2761
  end
2396
2762
 
2397
2763
  class Discount < Stripe::RequestParams
2764
+ class DiscountEnd < Stripe::RequestParams
2765
+ class Duration < Stripe::RequestParams
2766
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2767
+ attr_accessor :interval
2768
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2769
+ attr_accessor :interval_count
2770
+
2771
+ def initialize(interval: nil, interval_count: nil)
2772
+ @interval = interval
2773
+ @interval_count = interval_count
2774
+ end
2775
+ end
2776
+ # Time span for the redeemed discount.
2777
+ attr_accessor :duration
2778
+ # A precise Unix timestamp for the discount to end. Must be in the future.
2779
+ attr_accessor :timestamp
2780
+ # The type of calculation made to determine when the discount ends.
2781
+ attr_accessor :type
2782
+
2783
+ def initialize(duration: nil, timestamp: nil, type: nil)
2784
+ @duration = duration
2785
+ @timestamp = timestamp
2786
+ @type = type
2787
+ end
2788
+ end
2398
2789
  # ID of the coupon to create a new discount for.
2399
2790
  attr_accessor :coupon
2400
2791
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
2401
2792
  attr_accessor :discount
2793
+ # Details to determine how long the discount should be applied for.
2794
+ attr_accessor :discount_end
2402
2795
  # ID of the promotion code to create a new discount for.
2403
2796
  attr_accessor :promotion_code
2404
2797
 
2405
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
2798
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
2406
2799
  @coupon = coupon
2407
2800
  @discount = discount
2801
+ @discount_end = discount_end
2408
2802
  @promotion_code = promotion_code
2409
2803
  end
2410
2804
  end
2411
2805
 
2412
2806
  class InvoiceItem < Stripe::RequestParams
2413
2807
  class Discount < Stripe::RequestParams
2808
+ class DiscountEnd < Stripe::RequestParams
2809
+ class Duration < Stripe::RequestParams
2810
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2811
+ attr_accessor :interval
2812
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2813
+ attr_accessor :interval_count
2814
+
2815
+ def initialize(interval: nil, interval_count: nil)
2816
+ @interval = interval
2817
+ @interval_count = interval_count
2818
+ end
2819
+ end
2820
+ # Time span for the redeemed discount.
2821
+ attr_accessor :duration
2822
+ # A precise Unix timestamp for the discount to end. Must be in the future.
2823
+ attr_accessor :timestamp
2824
+ # The type of calculation made to determine when the discount ends.
2825
+ attr_accessor :type
2826
+
2827
+ def initialize(duration: nil, timestamp: nil, type: nil)
2828
+ @duration = duration
2829
+ @timestamp = timestamp
2830
+ @type = type
2831
+ end
2832
+ end
2414
2833
  # ID of the coupon to create a new discount for.
2415
2834
  attr_accessor :coupon
2416
2835
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
2417
2836
  attr_accessor :discount
2837
+ # Details to determine how long the discount should be applied for.
2838
+ attr_accessor :discount_end
2418
2839
  # ID of the promotion code to create a new discount for.
2419
2840
  attr_accessor :promotion_code
2420
2841
 
2421
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
2842
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
2422
2843
  @coupon = coupon
2423
2844
  @discount = discount
2845
+ @discount_end = discount_end
2424
2846
  @promotion_code = promotion_code
2425
2847
  end
2426
2848
  end
@@ -2546,6 +2968,458 @@ module Stripe
2546
2968
  end
2547
2969
 
2548
2970
  class ScheduleDetails < Stripe::RequestParams
2971
+ class Amendment < Stripe::RequestParams
2972
+ class AmendmentEnd < Stripe::RequestParams
2973
+ class DiscountEnd < Stripe::RequestParams
2974
+ # The ID of a specific discount.
2975
+ attr_accessor :discount
2976
+
2977
+ def initialize(discount: nil)
2978
+ @discount = discount
2979
+ end
2980
+ end
2981
+
2982
+ class Duration < Stripe::RequestParams
2983
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2984
+ attr_accessor :interval
2985
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2986
+ attr_accessor :interval_count
2987
+
2988
+ def initialize(interval: nil, interval_count: nil)
2989
+ @interval = interval
2990
+ @interval_count = interval_count
2991
+ end
2992
+ end
2993
+ # Use the `end` time of a given discount.
2994
+ attr_accessor :discount_end
2995
+ # Time span for the amendment starting from the `amendment_start`.
2996
+ attr_accessor :duration
2997
+ # A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
2998
+ attr_accessor :timestamp
2999
+ # Select one of three ways to pass the `amendment_end`.
3000
+ attr_accessor :type
3001
+
3002
+ def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
3003
+ @discount_end = discount_end
3004
+ @duration = duration
3005
+ @timestamp = timestamp
3006
+ @type = type
3007
+ end
3008
+ end
3009
+
3010
+ class AmendmentStart < Stripe::RequestParams
3011
+ class AmendmentEnd < Stripe::RequestParams
3012
+ # 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.
3013
+ attr_accessor :index
3014
+
3015
+ def initialize(index: nil)
3016
+ @index = index
3017
+ end
3018
+ end
3019
+
3020
+ class DiscountEnd < Stripe::RequestParams
3021
+ # The ID of a specific discount.
3022
+ attr_accessor :discount
3023
+
3024
+ def initialize(discount: nil)
3025
+ @discount = discount
3026
+ end
3027
+ end
3028
+ # Details of another amendment in the same array, immediately after which this amendment should begin.
3029
+ attr_accessor :amendment_end
3030
+ # Use the `end` time of a given discount.
3031
+ attr_accessor :discount_end
3032
+ # A precise Unix timestamp for the amendment to start.
3033
+ attr_accessor :timestamp
3034
+ # Select one of three ways to pass the `amendment_start`.
3035
+ attr_accessor :type
3036
+
3037
+ def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
3038
+ @amendment_end = amendment_end
3039
+ @discount_end = discount_end
3040
+ @timestamp = timestamp
3041
+ @type = type
3042
+ end
3043
+ end
3044
+
3045
+ class DiscountAction < Stripe::RequestParams
3046
+ class Add < Stripe::RequestParams
3047
+ class DiscountEnd < Stripe::RequestParams
3048
+ # The type of calculation made to determine when the discount ends.
3049
+ attr_accessor :type
3050
+
3051
+ def initialize(type: nil)
3052
+ @type = type
3053
+ end
3054
+ end
3055
+ # The coupon code to redeem.
3056
+ attr_accessor :coupon
3057
+ # An ID of an existing discount for a coupon that was already redeemed.
3058
+ attr_accessor :discount
3059
+ # Details to determine how long the discount should be applied for.
3060
+ attr_accessor :discount_end
3061
+ # 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.
3062
+ attr_accessor :index
3063
+ # The promotion code to redeem.
3064
+ attr_accessor :promotion_code
3065
+
3066
+ def initialize(
3067
+ coupon: nil,
3068
+ discount: nil,
3069
+ discount_end: nil,
3070
+ index: nil,
3071
+ promotion_code: nil
3072
+ )
3073
+ @coupon = coupon
3074
+ @discount = discount
3075
+ @discount_end = discount_end
3076
+ @index = index
3077
+ @promotion_code = promotion_code
3078
+ end
3079
+ end
3080
+
3081
+ class Remove < Stripe::RequestParams
3082
+ # The coupon code to remove from the `discounts` array.
3083
+ attr_accessor :coupon
3084
+ # The ID of a discount to remove from the `discounts` array.
3085
+ attr_accessor :discount
3086
+ # The ID of a promotion code to remove from the `discounts` array.
3087
+ attr_accessor :promotion_code
3088
+
3089
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
3090
+ @coupon = coupon
3091
+ @discount = discount
3092
+ @promotion_code = promotion_code
3093
+ end
3094
+ end
3095
+
3096
+ class Set < Stripe::RequestParams
3097
+ # The coupon code to replace the `discounts` array with.
3098
+ attr_accessor :coupon
3099
+ # An ID of an existing discount to replace the `discounts` array with.
3100
+ attr_accessor :discount
3101
+ # An ID of an existing promotion code to replace the `discounts` array with.
3102
+ attr_accessor :promotion_code
3103
+
3104
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
3105
+ @coupon = coupon
3106
+ @discount = discount
3107
+ @promotion_code = promotion_code
3108
+ end
3109
+ end
3110
+ # Details of the discount to add.
3111
+ attr_accessor :add
3112
+ # Details of the discount to remove.
3113
+ attr_accessor :remove
3114
+ # Details of the discount to replace the existing discounts with.
3115
+ attr_accessor :set
3116
+ # Determines the type of discount action.
3117
+ attr_accessor :type
3118
+
3119
+ def initialize(add: nil, remove: nil, set: nil, type: nil)
3120
+ @add = add
3121
+ @remove = remove
3122
+ @set = set
3123
+ @type = type
3124
+ end
3125
+ end
3126
+
3127
+ class ItemAction < Stripe::RequestParams
3128
+ class Add < Stripe::RequestParams
3129
+ class Discount < Stripe::RequestParams
3130
+ class DiscountEnd < Stripe::RequestParams
3131
+ class Duration < Stripe::RequestParams
3132
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3133
+ attr_accessor :interval
3134
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3135
+ attr_accessor :interval_count
3136
+
3137
+ def initialize(interval: nil, interval_count: nil)
3138
+ @interval = interval
3139
+ @interval_count = interval_count
3140
+ end
3141
+ end
3142
+ # Time span for the redeemed discount.
3143
+ attr_accessor :duration
3144
+ # A precise Unix timestamp for the discount to end. Must be in the future.
3145
+ attr_accessor :timestamp
3146
+ # The type of calculation made to determine when the discount ends.
3147
+ attr_accessor :type
3148
+
3149
+ def initialize(duration: nil, timestamp: nil, type: nil)
3150
+ @duration = duration
3151
+ @timestamp = timestamp
3152
+ @type = type
3153
+ end
3154
+ end
3155
+ # ID of the coupon to create a new discount for.
3156
+ attr_accessor :coupon
3157
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
3158
+ attr_accessor :discount
3159
+ # Details to determine how long the discount should be applied for.
3160
+ attr_accessor :discount_end
3161
+ # ID of the promotion code to create a new discount for.
3162
+ attr_accessor :promotion_code
3163
+
3164
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
3165
+ @coupon = coupon
3166
+ @discount = discount
3167
+ @discount_end = discount_end
3168
+ @promotion_code = promotion_code
3169
+ end
3170
+ end
3171
+
3172
+ class Trial < Stripe::RequestParams
3173
+ # 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.
3174
+ attr_accessor :converts_to
3175
+ # Determines the type of trial for this item.
3176
+ attr_accessor :type
3177
+
3178
+ def initialize(converts_to: nil, type: nil)
3179
+ @converts_to = converts_to
3180
+ @type = type
3181
+ end
3182
+ end
3183
+ # The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
3184
+ attr_accessor :discounts
3185
+ # 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`.
3186
+ attr_accessor :metadata
3187
+ # The ID of the price object.
3188
+ attr_accessor :price
3189
+ # Quantity for this item.
3190
+ attr_accessor :quantity
3191
+ # 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`.
3192
+ attr_accessor :tax_rates
3193
+ # Options that configure the trial on the subscription item.
3194
+ attr_accessor :trial
3195
+
3196
+ def initialize(
3197
+ discounts: nil,
3198
+ metadata: nil,
3199
+ price: nil,
3200
+ quantity: nil,
3201
+ tax_rates: nil,
3202
+ trial: nil
3203
+ )
3204
+ @discounts = discounts
3205
+ @metadata = metadata
3206
+ @price = price
3207
+ @quantity = quantity
3208
+ @tax_rates = tax_rates
3209
+ @trial = trial
3210
+ end
3211
+ end
3212
+
3213
+ class Remove < Stripe::RequestParams
3214
+ # ID of a price to remove.
3215
+ attr_accessor :price
3216
+
3217
+ def initialize(price: nil)
3218
+ @price = price
3219
+ end
3220
+ end
3221
+
3222
+ class Set < Stripe::RequestParams
3223
+ class Discount < Stripe::RequestParams
3224
+ class DiscountEnd < Stripe::RequestParams
3225
+ class Duration < Stripe::RequestParams
3226
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3227
+ attr_accessor :interval
3228
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3229
+ attr_accessor :interval_count
3230
+
3231
+ def initialize(interval: nil, interval_count: nil)
3232
+ @interval = interval
3233
+ @interval_count = interval_count
3234
+ end
3235
+ end
3236
+ # Time span for the redeemed discount.
3237
+ attr_accessor :duration
3238
+ # A precise Unix timestamp for the discount to end. Must be in the future.
3239
+ attr_accessor :timestamp
3240
+ # The type of calculation made to determine when the discount ends.
3241
+ attr_accessor :type
3242
+
3243
+ def initialize(duration: nil, timestamp: nil, type: nil)
3244
+ @duration = duration
3245
+ @timestamp = timestamp
3246
+ @type = type
3247
+ end
3248
+ end
3249
+ # ID of the coupon to create a new discount for.
3250
+ attr_accessor :coupon
3251
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
3252
+ attr_accessor :discount
3253
+ # Details to determine how long the discount should be applied for.
3254
+ attr_accessor :discount_end
3255
+ # ID of the promotion code to create a new discount for.
3256
+ attr_accessor :promotion_code
3257
+
3258
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
3259
+ @coupon = coupon
3260
+ @discount = discount
3261
+ @discount_end = discount_end
3262
+ @promotion_code = promotion_code
3263
+ end
3264
+ end
3265
+
3266
+ class Trial < Stripe::RequestParams
3267
+ # 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.
3268
+ attr_accessor :converts_to
3269
+ # Determines the type of trial for this item.
3270
+ attr_accessor :type
3271
+
3272
+ def initialize(converts_to: nil, type: nil)
3273
+ @converts_to = converts_to
3274
+ @type = type
3275
+ end
3276
+ end
3277
+ # 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`.
3278
+ attr_accessor :discounts
3279
+ # 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`.
3280
+ attr_accessor :metadata
3281
+ # The ID of the price object.
3282
+ attr_accessor :price
3283
+ # 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`.
3284
+ attr_accessor :quantity
3285
+ # 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`.
3286
+ attr_accessor :tax_rates
3287
+ # 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`.
3288
+ attr_accessor :trial
3289
+
3290
+ def initialize(
3291
+ discounts: nil,
3292
+ metadata: nil,
3293
+ price: nil,
3294
+ quantity: nil,
3295
+ tax_rates: nil,
3296
+ trial: nil
3297
+ )
3298
+ @discounts = discounts
3299
+ @metadata = metadata
3300
+ @price = price
3301
+ @quantity = quantity
3302
+ @tax_rates = tax_rates
3303
+ @trial = trial
3304
+ end
3305
+ end
3306
+ # 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.
3307
+ attr_accessor :add
3308
+ # Details of the subscription item to remove.
3309
+ attr_accessor :remove
3310
+ # 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.
3311
+ attr_accessor :set
3312
+ # Determines the type of item action.
3313
+ attr_accessor :type
3314
+
3315
+ def initialize(add: nil, remove: nil, set: nil, type: nil)
3316
+ @add = add
3317
+ @remove = remove
3318
+ @set = set
3319
+ @type = type
3320
+ end
3321
+ end
3322
+
3323
+ class MetadataAction < Stripe::RequestParams
3324
+ # Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
3325
+ attr_accessor :add
3326
+ # Keys to remove from schedule phase metadata.
3327
+ attr_accessor :remove
3328
+ # Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
3329
+ attr_accessor :set
3330
+ # Select one of three ways to update phase-level `metadata` on subscription schedules.
3331
+ attr_accessor :type
3332
+
3333
+ def initialize(add: nil, remove: nil, set: nil, type: nil)
3334
+ @add = add
3335
+ @remove = remove
3336
+ @set = set
3337
+ @type = type
3338
+ end
3339
+ end
3340
+
3341
+ class SetPauseCollection < Stripe::RequestParams
3342
+ class Set < Stripe::RequestParams
3343
+ # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
3344
+ attr_accessor :behavior
3345
+
3346
+ def initialize(behavior: nil)
3347
+ @behavior = behavior
3348
+ end
3349
+ end
3350
+ # Details of the pause_collection behavior to apply to the amendment.
3351
+ attr_accessor :set
3352
+ # Determines the type of the pause_collection amendment.
3353
+ attr_accessor :type
3354
+
3355
+ def initialize(set: nil, type: nil)
3356
+ @set = set
3357
+ @type = type
3358
+ end
3359
+ end
3360
+
3361
+ class TrialSettings < Stripe::RequestParams
3362
+ class EndBehavior < Stripe::RequestParams
3363
+ # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
3364
+ attr_accessor :prorate_up_front
3365
+
3366
+ def initialize(prorate_up_front: nil)
3367
+ @prorate_up_front = prorate_up_front
3368
+ end
3369
+ end
3370
+ # Defines how the subscription should behave when a trial ends.
3371
+ attr_accessor :end_behavior
3372
+
3373
+ def initialize(end_behavior: nil)
3374
+ @end_behavior = end_behavior
3375
+ end
3376
+ end
3377
+ # 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.
3378
+ attr_accessor :amendment_end
3379
+ # Details to identify the earliest timestamp where the proposed change should take effect.
3380
+ attr_accessor :amendment_start
3381
+ # 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.
3382
+ attr_accessor :billing_cycle_anchor
3383
+ # Changes to the coupons being redeemed or discounts being applied during the amendment time span.
3384
+ attr_accessor :discount_actions
3385
+ # Changes to the subscription items during the amendment time span.
3386
+ attr_accessor :item_actions
3387
+ # Instructions for how to modify phase metadata
3388
+ attr_accessor :metadata_actions
3389
+ # 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`.
3390
+ attr_accessor :proration_behavior
3391
+ # Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
3392
+ attr_accessor :set_pause_collection
3393
+ # Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
3394
+ attr_accessor :set_schedule_end
3395
+ # Settings related to subscription trials.
3396
+ attr_accessor :trial_settings
3397
+
3398
+ def initialize(
3399
+ amendment_end: nil,
3400
+ amendment_start: nil,
3401
+ billing_cycle_anchor: nil,
3402
+ discount_actions: nil,
3403
+ item_actions: nil,
3404
+ metadata_actions: nil,
3405
+ proration_behavior: nil,
3406
+ set_pause_collection: nil,
3407
+ set_schedule_end: nil,
3408
+ trial_settings: nil
3409
+ )
3410
+ @amendment_end = amendment_end
3411
+ @amendment_start = amendment_start
3412
+ @billing_cycle_anchor = billing_cycle_anchor
3413
+ @discount_actions = discount_actions
3414
+ @item_actions = item_actions
3415
+ @metadata_actions = metadata_actions
3416
+ @proration_behavior = proration_behavior
3417
+ @set_pause_collection = set_pause_collection
3418
+ @set_schedule_end = set_schedule_end
3419
+ @trial_settings = trial_settings
3420
+ end
3421
+ end
3422
+
2549
3423
  class BillingMode < Stripe::RequestParams
2550
3424
  # Controls the calculation and orchestration of prorations and invoices for subscriptions.
2551
3425
  attr_accessor :type
@@ -2558,16 +3432,44 @@ module Stripe
2558
3432
  class Phase < Stripe::RequestParams
2559
3433
  class AddInvoiceItem < Stripe::RequestParams
2560
3434
  class Discount < Stripe::RequestParams
3435
+ class DiscountEnd < Stripe::RequestParams
3436
+ class Duration < Stripe::RequestParams
3437
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3438
+ attr_accessor :interval
3439
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3440
+ attr_accessor :interval_count
3441
+
3442
+ def initialize(interval: nil, interval_count: nil)
3443
+ @interval = interval
3444
+ @interval_count = interval_count
3445
+ end
3446
+ end
3447
+ # Time span for the redeemed discount.
3448
+ attr_accessor :duration
3449
+ # A precise Unix timestamp for the discount to end. Must be in the future.
3450
+ attr_accessor :timestamp
3451
+ # The type of calculation made to determine when the discount ends.
3452
+ attr_accessor :type
3453
+
3454
+ def initialize(duration: nil, timestamp: nil, type: nil)
3455
+ @duration = duration
3456
+ @timestamp = timestamp
3457
+ @type = type
3458
+ end
3459
+ end
2561
3460
  # ID of the coupon to create a new discount for.
2562
3461
  attr_accessor :coupon
2563
3462
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
2564
3463
  attr_accessor :discount
3464
+ # Details to determine how long the discount should be applied for.
3465
+ attr_accessor :discount_end
2565
3466
  # ID of the promotion code to create a new discount for.
2566
3467
  attr_accessor :promotion_code
2567
3468
 
2568
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
3469
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
2569
3470
  @coupon = coupon
2570
3471
  @discount = discount
3472
+ @discount_end = discount_end
2571
3473
  @promotion_code = promotion_code
2572
3474
  end
2573
3475
  end
@@ -2703,16 +3605,44 @@ module Stripe
2703
3605
  end
2704
3606
 
2705
3607
  class Discount < Stripe::RequestParams
3608
+ class DiscountEnd < Stripe::RequestParams
3609
+ class Duration < Stripe::RequestParams
3610
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3611
+ attr_accessor :interval
3612
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3613
+ attr_accessor :interval_count
3614
+
3615
+ def initialize(interval: nil, interval_count: nil)
3616
+ @interval = interval
3617
+ @interval_count = interval_count
3618
+ end
3619
+ end
3620
+ # Time span for the redeemed discount.
3621
+ attr_accessor :duration
3622
+ # A precise Unix timestamp for the discount to end. Must be in the future.
3623
+ attr_accessor :timestamp
3624
+ # The type of calculation made to determine when the discount ends.
3625
+ attr_accessor :type
3626
+
3627
+ def initialize(duration: nil, timestamp: nil, type: nil)
3628
+ @duration = duration
3629
+ @timestamp = timestamp
3630
+ @type = type
3631
+ end
3632
+ end
2706
3633
  # ID of the coupon to create a new discount for.
2707
3634
  attr_accessor :coupon
2708
3635
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
2709
3636
  attr_accessor :discount
3637
+ # Details to determine how long the discount should be applied for.
3638
+ attr_accessor :discount_end
2710
3639
  # ID of the promotion code to create a new discount for.
2711
3640
  attr_accessor :promotion_code
2712
3641
 
2713
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
3642
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
2714
3643
  @coupon = coupon
2715
3644
  @discount = discount
3645
+ @discount_end = discount_end
2716
3646
  @promotion_code = promotion_code
2717
3647
  end
2718
3648
  end
@@ -2766,16 +3696,44 @@ module Stripe
2766
3696
  end
2767
3697
 
2768
3698
  class Discount < Stripe::RequestParams
3699
+ class DiscountEnd < Stripe::RequestParams
3700
+ class Duration < Stripe::RequestParams
3701
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3702
+ attr_accessor :interval
3703
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3704
+ attr_accessor :interval_count
3705
+
3706
+ def initialize(interval: nil, interval_count: nil)
3707
+ @interval = interval
3708
+ @interval_count = interval_count
3709
+ end
3710
+ end
3711
+ # Time span for the redeemed discount.
3712
+ attr_accessor :duration
3713
+ # A precise Unix timestamp for the discount to end. Must be in the future.
3714
+ attr_accessor :timestamp
3715
+ # The type of calculation made to determine when the discount ends.
3716
+ attr_accessor :type
3717
+
3718
+ def initialize(duration: nil, timestamp: nil, type: nil)
3719
+ @duration = duration
3720
+ @timestamp = timestamp
3721
+ @type = type
3722
+ end
3723
+ end
2769
3724
  # ID of the coupon to create a new discount for.
2770
3725
  attr_accessor :coupon
2771
3726
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
2772
3727
  attr_accessor :discount
3728
+ # Details to determine how long the discount should be applied for.
3729
+ attr_accessor :discount_end
2773
3730
  # ID of the promotion code to create a new discount for.
2774
3731
  attr_accessor :promotion_code
2775
3732
 
2776
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
3733
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
2777
3734
  @coupon = coupon
2778
3735
  @discount = discount
3736
+ @discount_end = discount_end
2779
3737
  @promotion_code = promotion_code
2780
3738
  end
2781
3739
  end
@@ -2821,6 +3779,18 @@ module Stripe
2821
3779
  @unit_amount_decimal = unit_amount_decimal
2822
3780
  end
2823
3781
  end
3782
+
3783
+ class Trial < Stripe::RequestParams
3784
+ # 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.
3785
+ attr_accessor :converts_to
3786
+ # Determines the type of trial for this item.
3787
+ attr_accessor :type
3788
+
3789
+ def initialize(converts_to: nil, type: nil)
3790
+ @converts_to = converts_to
3791
+ @type = type
3792
+ end
3793
+ end
2824
3794
  # 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.
2825
3795
  attr_accessor :billing_thresholds
2826
3796
  # The coupons to redeem into discounts for the subscription item.
@@ -2837,6 +3807,8 @@ module Stripe
2837
3807
  attr_accessor :quantity
2838
3808
  # 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.
2839
3809
  attr_accessor :tax_rates
3810
+ # Options that configure the trial on the subscription item.
3811
+ attr_accessor :trial
2840
3812
 
2841
3813
  def initialize(
2842
3814
  billing_thresholds: nil,
@@ -2846,7 +3818,8 @@ module Stripe
2846
3818
  price: nil,
2847
3819
  price_data: nil,
2848
3820
  quantity: nil,
2849
- tax_rates: nil
3821
+ tax_rates: nil,
3822
+ trial: nil
2850
3823
  )
2851
3824
  @billing_thresholds = billing_thresholds
2852
3825
  @discounts = discounts
@@ -2856,6 +3829,16 @@ module Stripe
2856
3829
  @price_data = price_data
2857
3830
  @quantity = quantity
2858
3831
  @tax_rates = tax_rates
3832
+ @trial = trial
3833
+ end
3834
+ end
3835
+
3836
+ class PauseCollection < Stripe::RequestParams
3837
+ # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
3838
+ attr_accessor :behavior
3839
+
3840
+ def initialize(behavior: nil)
3841
+ @behavior = behavior
2859
3842
  end
2860
3843
  end
2861
3844
 
@@ -2870,6 +3853,23 @@ module Stripe
2870
3853
  @destination = destination
2871
3854
  end
2872
3855
  end
3856
+
3857
+ class TrialSettings < Stripe::RequestParams
3858
+ class EndBehavior < Stripe::RequestParams
3859
+ # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
3860
+ attr_accessor :prorate_up_front
3861
+
3862
+ def initialize(prorate_up_front: nil)
3863
+ @prorate_up_front = prorate_up_front
3864
+ end
3865
+ end
3866
+ # Defines how the subscription should behave when a trial ends.
3867
+ attr_accessor :end_behavior
3868
+
3869
+ def initialize(end_behavior: nil)
3870
+ @end_behavior = end_behavior
3871
+ end
3872
+ end
2873
3873
  # 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.
2874
3874
  attr_accessor :add_invoice_items
2875
3875
  # 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).
@@ -2906,6 +3906,8 @@ module Stripe
2906
3906
  attr_accessor :metadata
2907
3907
  # The account on behalf of which to charge, for each of the associated subscription's invoices.
2908
3908
  attr_accessor :on_behalf_of
3909
+ # 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).
3910
+ attr_accessor :pause_collection
2909
3911
  # 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.
2910
3912
  attr_accessor :proration_behavior
2911
3913
  # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
@@ -2914,8 +3916,12 @@ module Stripe
2914
3916
  attr_accessor :transfer_data
2915
3917
  # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
2916
3918
  attr_accessor :trial
3919
+ # Specify trial behavior when crossing phase boundaries
3920
+ attr_accessor :trial_continuation
2917
3921
  # 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`
2918
3922
  attr_accessor :trial_end
3923
+ # Settings related to subscription trials.
3924
+ attr_accessor :trial_settings
2919
3925
 
2920
3926
  def initialize(
2921
3927
  add_invoice_items: nil,
@@ -2936,11 +3942,14 @@ module Stripe
2936
3942
  iterations: nil,
2937
3943
  metadata: nil,
2938
3944
  on_behalf_of: nil,
3945
+ pause_collection: nil,
2939
3946
  proration_behavior: nil,
2940
3947
  start_date: nil,
2941
3948
  transfer_data: nil,
2942
3949
  trial: nil,
2943
- trial_end: nil
3950
+ trial_continuation: nil,
3951
+ trial_end: nil,
3952
+ trial_settings: nil
2944
3953
  )
2945
3954
  @add_invoice_items = add_invoice_items
2946
3955
  @application_fee_percent = application_fee_percent
@@ -2960,26 +3969,95 @@ module Stripe
2960
3969
  @iterations = iterations
2961
3970
  @metadata = metadata
2962
3971
  @on_behalf_of = on_behalf_of
3972
+ @pause_collection = pause_collection
2963
3973
  @proration_behavior = proration_behavior
2964
3974
  @start_date = start_date
2965
3975
  @transfer_data = transfer_data
2966
3976
  @trial = trial
3977
+ @trial_continuation = trial_continuation
2967
3978
  @trial_end = trial_end
3979
+ @trial_settings = trial_settings
3980
+ end
3981
+ end
3982
+
3983
+ class Prebilling < Stripe::RequestParams
3984
+ class BillUntil < Stripe::RequestParams
3985
+ class AmendmentEnd < Stripe::RequestParams
3986
+ # 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.
3987
+ attr_accessor :index
3988
+
3989
+ def initialize(index: nil)
3990
+ @index = index
3991
+ end
3992
+ end
3993
+
3994
+ class Duration < Stripe::RequestParams
3995
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3996
+ attr_accessor :interval
3997
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3998
+ attr_accessor :interval_count
3999
+
4000
+ def initialize(interval: nil, interval_count: nil)
4001
+ @interval = interval
4002
+ @interval_count = interval_count
4003
+ end
4004
+ end
4005
+ # End the prebilled period when a specified amendment ends.
4006
+ attr_accessor :amendment_end
4007
+ # Time span for prebilling, starting from `bill_from`.
4008
+ attr_accessor :duration
4009
+ # End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
4010
+ attr_accessor :timestamp
4011
+ # Select one of several ways to pass the `bill_until` value.
4012
+ attr_accessor :type
4013
+
4014
+ def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
4015
+ @amendment_end = amendment_end
4016
+ @duration = duration
4017
+ @timestamp = timestamp
4018
+ @type = type
4019
+ end
4020
+ end
4021
+ # The end of the prebilled time period.
4022
+ attr_accessor :bill_until
4023
+ # This is used to determine the number of billing cycles to prebill.
4024
+ attr_accessor :iterations
4025
+
4026
+ def initialize(bill_until: nil, iterations: nil)
4027
+ @bill_until = bill_until
4028
+ @iterations = iterations
2968
4029
  end
2969
4030
  end
4031
+ # Changes to apply to the phases of the subscription schedule, in the order provided.
4032
+ attr_accessor :amendments
4033
+ # 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.
4034
+ attr_accessor :billing_behavior
2970
4035
  # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
2971
4036
  attr_accessor :billing_mode
2972
4037
  # 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.
2973
4038
  attr_accessor :end_behavior
2974
4039
  # 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.
2975
4040
  attr_accessor :phases
4041
+ # Provide any time periods to bill in advance.
4042
+ attr_accessor :prebilling
2976
4043
  # In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
2977
4044
  attr_accessor :proration_behavior
2978
4045
 
2979
- def initialize(billing_mode: nil, end_behavior: nil, phases: nil, proration_behavior: nil)
4046
+ def initialize(
4047
+ amendments: nil,
4048
+ billing_behavior: nil,
4049
+ billing_mode: nil,
4050
+ end_behavior: nil,
4051
+ phases: nil,
4052
+ prebilling: nil,
4053
+ proration_behavior: nil
4054
+ )
4055
+ @amendments = amendments
4056
+ @billing_behavior = billing_behavior
2980
4057
  @billing_mode = billing_mode
2981
4058
  @end_behavior = end_behavior
2982
4059
  @phases = phases
4060
+ @prebilling = prebilling
2983
4061
  @proration_behavior = proration_behavior
2984
4062
  end
2985
4063
  end
@@ -3005,16 +4083,44 @@ module Stripe
3005
4083
  end
3006
4084
 
3007
4085
  class Discount < Stripe::RequestParams
4086
+ class DiscountEnd < Stripe::RequestParams
4087
+ class Duration < Stripe::RequestParams
4088
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
4089
+ attr_accessor :interval
4090
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
4091
+ attr_accessor :interval_count
4092
+
4093
+ def initialize(interval: nil, interval_count: nil)
4094
+ @interval = interval
4095
+ @interval_count = interval_count
4096
+ end
4097
+ end
4098
+ # Time span for the redeemed discount.
4099
+ attr_accessor :duration
4100
+ # A precise Unix timestamp for the discount to end. Must be in the future.
4101
+ attr_accessor :timestamp
4102
+ # The type of calculation made to determine when the discount ends.
4103
+ attr_accessor :type
4104
+
4105
+ def initialize(duration: nil, timestamp: nil, type: nil)
4106
+ @duration = duration
4107
+ @timestamp = timestamp
4108
+ @type = type
4109
+ end
4110
+ end
3008
4111
  # ID of the coupon to create a new discount for.
3009
4112
  attr_accessor :coupon
3010
4113
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
3011
4114
  attr_accessor :discount
4115
+ # Details to determine how long the discount should be applied for.
4116
+ attr_accessor :discount_end
3012
4117
  # ID of the promotion code to create a new discount for.
3013
4118
  attr_accessor :promotion_code
3014
4119
 
3015
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
4120
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
3016
4121
  @coupon = coupon
3017
4122
  @discount = discount
4123
+ @discount_end = discount_end
3018
4124
  @promotion_code = promotion_code
3019
4125
  end
3020
4126
  end
@@ -3109,6 +4215,15 @@ module Stripe
3109
4215
  @tax_rates = tax_rates
3110
4216
  end
3111
4217
  end
4218
+
4219
+ class Prebilling < Stripe::RequestParams
4220
+ # This is used to determine the number of billing cycles to prebill.
4221
+ attr_accessor :iterations
4222
+
4223
+ def initialize(iterations: nil)
4224
+ @iterations = iterations
4225
+ end
4226
+ end
3112
4227
  # 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`.
3113
4228
  attr_accessor :billing_cycle_anchor
3114
4229
  # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
@@ -3123,6 +4238,8 @@ module Stripe
3123
4238
  attr_accessor :default_tax_rates
3124
4239
  # A list of up to 20 subscription items, each with an attached price.
3125
4240
  attr_accessor :items
4241
+ # The pre-billing to apply to the subscription as a preview.
4242
+ attr_accessor :prebilling
3126
4243
  # 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`.
3127
4244
  attr_accessor :proration_behavior
3128
4245
  # 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'.
@@ -3142,6 +4259,7 @@ module Stripe
3142
4259
  cancel_now: nil,
3143
4260
  default_tax_rates: nil,
3144
4261
  items: nil,
4262
+ prebilling: nil,
3145
4263
  proration_behavior: nil,
3146
4264
  proration_date: nil,
3147
4265
  resume_at: nil,
@@ -3155,6 +4273,7 @@ module Stripe
3155
4273
  @cancel_now = cancel_now
3156
4274
  @default_tax_rates = default_tax_rates
3157
4275
  @items = items
4276
+ @prebilling = prebilling
3158
4277
  @proration_behavior = proration_behavior
3159
4278
  @proration_date = proration_date
3160
4279
  @resume_at = resume_at
@@ -3164,10 +4283,14 @@ module Stripe
3164
4283
  end
3165
4284
  # Settings for automatic tax lookup for this invoice preview.
3166
4285
  attr_accessor :automatic_tax
4286
+ # The identifier of the billing cadence for which you’d like to retrieve the upcoming invoice.Cannot be provided when `subscription`, `schedule`, `subscription_details` or `schedule_details` are provided.
4287
+ attr_accessor :billing_cadence
3167
4288
  # The currency to preview this invoice in. Defaults to that of `customer` if not specified.
3168
4289
  attr_accessor :currency
3169
4290
  # 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.
3170
4291
  attr_accessor :customer
4292
+ # 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.
4293
+ attr_accessor :customer_account
3171
4294
  # 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.
3172
4295
  attr_accessor :customer_details
3173
4296
  # 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.
@@ -3193,8 +4316,10 @@ module Stripe
3193
4316
 
3194
4317
  def initialize(
3195
4318
  automatic_tax: nil,
4319
+ billing_cadence: nil,
3196
4320
  currency: nil,
3197
4321
  customer: nil,
4322
+ customer_account: nil,
3198
4323
  customer_details: nil,
3199
4324
  discounts: nil,
3200
4325
  expand: nil,
@@ -3208,8 +4333,10 @@ module Stripe
3208
4333
  subscription_details: nil
3209
4334
  )
3210
4335
  @automatic_tax = automatic_tax
4336
+ @billing_cadence = billing_cadence
3211
4337
  @currency = currency
3212
4338
  @customer = customer
4339
+ @customer_account = customer_account
3213
4340
  @customer_details = customer_details
3214
4341
  @discounts = discounts
3215
4342
  @expand = expand
@@ -3239,6 +4366,8 @@ module Stripe
3239
4366
  attr_reader :amount_remaining
3240
4367
  # This is the sum of all the shipping amounts.
3241
4368
  attr_reader :amount_shipping
4369
+ # List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically.
4370
+ attr_reader :amounts_due
3242
4371
  # ID of the Connect Application that created the invoice.
3243
4372
  attr_reader :application
3244
4373
  # Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained.
@@ -3273,6 +4402,8 @@ module Stripe
3273
4402
  attr_reader :custom_fields
3274
4403
  # The ID of the customer who will be billed.
3275
4404
  attr_reader :customer
4405
+ # The ID of the account who will be billed.
4406
+ attr_reader :customer_account
3276
4407
  # The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated.
3277
4408
  attr_reader :customer_address
3278
4409
  # The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated.
@@ -3287,6 +4418,8 @@ module Stripe
3287
4418
  attr_reader :customer_tax_exempt
3288
4419
  # The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated.
3289
4420
  attr_reader :customer_tax_ids
4421
+ # The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin.
4422
+ attr_reader :default_margins
3290
4423
  # 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.
3291
4424
  attr_reader :default_payment_method
3292
4425
  # 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.
@@ -3377,6 +4510,8 @@ module Stripe
3377
4510
  attr_reader :total_discount_amounts
3378
4511
  # The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax.
3379
4512
  attr_reader :total_excluding_tax
4513
+ # The aggregate amounts calculated per margin across all line items.
4514
+ attr_reader :total_margin_amounts
3380
4515
  # Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items.
3381
4516
  attr_reader :total_pretax_credit_amounts
3382
4517
  # The aggregate tax information of all line items.