stripe 15.5.0 → 15.6.0.pre.beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (598) hide show
  1. checksums.yaml +4 -4
  2. data/API_VERSION +1 -1
  3. data/CHANGELOG.md +1670 -659
  4. data/README.md +4 -6
  5. data/VERSION +1 -1
  6. data/lib/stripe/api_requestor.rb +32 -0
  7. data/lib/stripe/api_version.rb +1 -2
  8. data/lib/stripe/errors.rb +60 -0
  9. data/lib/stripe/event_types.rb +102 -0
  10. data/lib/stripe/events/v2_core_account_closed_event.rb +21 -0
  11. data/lib/stripe/events/v2_core_account_created_event.rb +21 -0
  12. data/lib/stripe/events/v2_core_account_including_configuration_customer_capability_status_updated_event.rb +23 -0
  13. data/lib/stripe/events/v2_core_account_including_configuration_customer_updated_event.rb +21 -0
  14. data/lib/stripe/events/v2_core_account_including_configuration_merchant_capability_status_updated_event.rb +23 -0
  15. data/lib/stripe/events/v2_core_account_including_configuration_merchant_updated_event.rb +21 -0
  16. data/lib/stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event.rb +23 -0
  17. data/lib/stripe/events/v2_core_account_including_configuration_recipient_updated_event.rb +21 -0
  18. data/lib/stripe/events/v2_core_account_including_configuration_storer_capability_status_updated_event.rb +23 -0
  19. data/lib/stripe/events/v2_core_account_including_configuration_storer_updated_event.rb +21 -0
  20. data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +21 -0
  21. data/lib/stripe/events/v2_core_account_including_identity_updated_event.rb +21 -0
  22. data/lib/stripe/events/v2_core_account_including_requirements_updated_event.rb +21 -0
  23. data/lib/stripe/events/v2_core_account_link_returned_event.rb +13 -0
  24. data/lib/stripe/events/v2_core_account_person_created_event.rb +23 -0
  25. data/lib/stripe/events/v2_core_account_person_deleted_event.rb +23 -0
  26. data/lib/stripe/events/v2_core_account_person_updated_event.rb +23 -0
  27. data/lib/stripe/events/v2_core_account_updated_event.rb +21 -0
  28. data/lib/stripe/events/v2_money_management_adjustment_created_event.rb +21 -0
  29. data/lib/stripe/events/v2_money_management_financial_account_created_event.rb +21 -0
  30. data/lib/stripe/events/v2_money_management_financial_account_updated_event.rb +21 -0
  31. data/lib/stripe/events/v2_money_management_financial_address_activated_event.rb +21 -0
  32. data/lib/stripe/events/v2_money_management_financial_address_failed_event.rb +21 -0
  33. data/lib/stripe/events/v2_money_management_inbound_transfer_available_event.rb +23 -0
  34. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +21 -0
  35. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +21 -0
  36. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +21 -0
  37. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +21 -0
  38. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +21 -0
  39. data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +21 -0
  40. data/lib/stripe/events/v2_money_management_outbound_payment_created_event.rb +21 -0
  41. data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +21 -0
  42. data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +21 -0
  43. data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +21 -0
  44. data/lib/stripe/events/v2_money_management_outbound_payment_updated_event.rb +21 -0
  45. data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +21 -0
  46. data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +21 -0
  47. data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +21 -0
  48. data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +21 -0
  49. data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +21 -0
  50. data/lib/stripe/events/v2_money_management_outbound_transfer_updated_event.rb +21 -0
  51. data/lib/stripe/events/v2_money_management_payout_method_updated_event.rb +21 -0
  52. data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +23 -0
  53. data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +21 -0
  54. data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +21 -0
  55. data/lib/stripe/events/v2_money_management_received_credit_succeeded_event.rb +21 -0
  56. data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +21 -0
  57. data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +21 -0
  58. data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +21 -0
  59. data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +21 -0
  60. data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +21 -0
  61. data/lib/stripe/events/v2_money_management_transaction_created_event.rb +21 -0
  62. data/lib/stripe/events/v2_money_management_transaction_updated_event.rb +21 -0
  63. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_failed_event.rb +21 -0
  64. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb +22 -0
  65. data/lib/stripe/events/v2_payments_off_session_payment_canceled_event.rb +21 -0
  66. data/lib/stripe/events/v2_payments_off_session_payment_created_event.rb +21 -0
  67. data/lib/stripe/events/v2_payments_off_session_payment_failed_event.rb +21 -0
  68. data/lib/stripe/events/v2_payments_off_session_payment_succeeded_event.rb +21 -0
  69. data/lib/stripe/object_types.rb +53 -0
  70. data/lib/stripe/resources/account.rb +653 -1
  71. data/lib/stripe/resources/account_notice.rb +123 -0
  72. data/lib/stripe/resources/account_session.rb +256 -1
  73. data/lib/stripe/resources/balance_settings.rb +112 -0
  74. data/lib/stripe/resources/billing/credit_balance_summary.rb +2 -0
  75. data/lib/stripe/resources/billing/credit_balance_transaction.rb +4 -0
  76. data/lib/stripe/resources/billing/credit_grant.rb +10 -0
  77. data/lib/stripe/resources/billing/meter_usage.rb +23 -0
  78. data/lib/stripe/resources/billing/meter_usage_row.rb +28 -0
  79. data/lib/stripe/resources/billing_portal/session.rb +6 -0
  80. data/lib/stripe/resources/capital/financing_offer.rb +179 -0
  81. data/lib/stripe/resources/capital/financing_summary.rb +55 -0
  82. data/lib/stripe/resources/capital/financing_transaction.rb +114 -0
  83. data/lib/stripe/resources/card.rb +2 -0
  84. data/lib/stripe/resources/cash_balance.rb +2 -0
  85. data/lib/stripe/resources/charge.rb +1540 -0
  86. data/lib/stripe/resources/checkout/session.rb +495 -4
  87. data/lib/stripe/resources/confirmation_token.rb +170 -0
  88. data/lib/stripe/resources/coupon.rb +30 -1
  89. data/lib/stripe/resources/credit_note.rb +6 -0
  90. data/lib/stripe/resources/credit_note_line_item.rb +9 -0
  91. data/lib/stripe/resources/customer.rb +2 -0
  92. data/lib/stripe/resources/customer_balance_transaction.rb +2 -0
  93. data/lib/stripe/resources/customer_cash_balance_transaction.rb +2 -0
  94. data/lib/stripe/resources/customer_session.rb +6 -1
  95. data/lib/stripe/resources/discount.rb +2 -0
  96. data/lib/stripe/resources/dispute.rb +11 -0
  97. data/lib/stripe/resources/event.rb +31 -0
  98. data/lib/stripe/resources/financial_connections/account.rb +22 -1
  99. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +27 -0
  100. data/lib/stripe/resources/financial_connections/institution.rb +92 -0
  101. data/lib/stripe/resources/financial_connections/session.rb +62 -2
  102. data/lib/stripe/resources/fx_quote.rb +186 -0
  103. data/lib/stripe/resources/identity/verification_session.rb +10 -0
  104. data/lib/stripe/resources/invoice.rb +1140 -16
  105. data/lib/stripe/resources/invoice_item.rb +78 -2
  106. data/lib/stripe/resources/invoice_line_item.rb +55 -1
  107. data/lib/stripe/resources/invoice_payment.rb +6 -1
  108. data/lib/stripe/resources/issuing/cardholder.rb +2 -1
  109. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +602 -0
  110. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +82 -0
  111. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +86 -0
  112. data/lib/stripe/resources/issuing/settlement.rb +53 -0
  113. data/lib/stripe/resources/issuing/transaction.rb +6 -0
  114. data/lib/stripe/resources/line_item.rb +37 -0
  115. data/lib/stripe/resources/mandate.rb +89 -1
  116. data/lib/stripe/resources/margin.rb +115 -0
  117. data/lib/stripe/resources/order.rb +2958 -0
  118. data/lib/stripe/resources/payment_attempt_record.rb +1181 -0
  119. data/lib/stripe/resources/payment_intent.rb +6448 -545
  120. data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +72 -0
  121. data/lib/stripe/resources/payment_method.rb +194 -1
  122. data/lib/stripe/resources/payment_method_configuration.rb +295 -0
  123. data/lib/stripe/resources/payment_record.rb +1727 -0
  124. data/lib/stripe/resources/price.rb +30 -0
  125. data/lib/stripe/resources/privacy/redaction_job.rb +298 -0
  126. data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +33 -0
  127. data/lib/stripe/resources/promotion_code.rb +10 -0
  128. data/lib/stripe/resources/quote.rb +2038 -7
  129. data/lib/stripe/resources/quote_line.rb +274 -0
  130. data/lib/stripe/resources/quote_preview_invoice.rb +680 -0
  131. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +395 -0
  132. data/lib/stripe/resources/refund.rb +9 -0
  133. data/lib/stripe/resources/setup_attempt.rb +24 -0
  134. data/lib/stripe/resources/setup_intent.rb +771 -9
  135. data/lib/stripe/resources/source.rb +29 -0
  136. data/lib/stripe/resources/subscription.rb +365 -9
  137. data/lib/stripe/resources/subscription_item.rb +84 -3
  138. data/lib/stripe/resources/subscription_schedule.rb +1007 -10
  139. data/lib/stripe/resources/tax/association.rb +66 -0
  140. data/lib/stripe/resources/tax/form.rb +211 -0
  141. data/lib/stripe/resources/tax_id.rb +12 -2
  142. data/lib/stripe/resources/terminal/configuration.rb +33 -0
  143. data/lib/stripe/resources/terminal/onboarding_link.rb +84 -0
  144. data/lib/stripe/resources/terminal/reader.rb +8 -0
  145. data/lib/stripe/resources/terminal/reader_collected_data.rb +31 -0
  146. data/lib/stripe/resources/transfer.rb +6 -0
  147. data/lib/stripe/resources/treasury/financial_account.rb +22 -3
  148. data/lib/stripe/resources/treasury/financial_account_features.rb +2 -0
  149. data/lib/stripe/resources/treasury/outbound_transfer.rb +37 -0
  150. data/lib/stripe/resources/treasury/received_credit.rb +38 -1
  151. data/lib/stripe/resources/treasury/received_debit.rb +40 -1
  152. data/lib/stripe/resources/v2/core/account.rb +1938 -0
  153. data/lib/stripe/resources/v2/core/account_link.rb +72 -0
  154. data/lib/stripe/resources/v2/core/person.rb +276 -0
  155. data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +74 -0
  156. data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +39 -0
  157. data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +20 -0
  158. data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +22 -0
  159. data/lib/stripe/resources/v2/money_management/adjustment.rb +51 -0
  160. data/lib/stripe/resources/v2/money_management/financial_account.rb +79 -0
  161. data/lib/stripe/resources/v2/money_management/financial_address.rb +68 -0
  162. data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +94 -0
  163. data/lib/stripe/resources/v2/money_management/outbound_payment.rb +129 -0
  164. data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +82 -0
  165. data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +45 -0
  166. data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +117 -0
  167. data/lib/stripe/resources/v2/money_management/payout_method.rb +77 -0
  168. data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +49 -0
  169. data/lib/stripe/resources/v2/money_management/received_credit.rb +122 -0
  170. data/lib/stripe/resources/v2/money_management/received_debit.rb +84 -0
  171. data/lib/stripe/resources/v2/money_management/transaction.rb +80 -0
  172. data/lib/stripe/resources/v2/money_management/transaction_entry.rb +70 -0
  173. data/lib/stripe/resources/v2/payments/off_session_payment.rb +89 -0
  174. data/lib/stripe/resources.rb +109 -0
  175. data/lib/stripe/services/account_notice_service.rb +101 -0
  176. data/lib/stripe/services/account_service.rb +562 -1
  177. data/lib/stripe/services/account_session_service.rb +226 -1
  178. data/lib/stripe/services/balance_settings_service.rb +99 -0
  179. data/lib/stripe/services/billing/credit_balance_summary_service.rb +4 -1
  180. data/lib/stripe/services/billing/credit_balance_transaction_service.rb +4 -0
  181. data/lib/stripe/services/billing/credit_grant_service.rb +8 -0
  182. data/lib/stripe/services/billing/meter_usage_service.rb +76 -0
  183. data/lib/stripe/services/billing_portal/session_service.rb +4 -0
  184. data/lib/stripe/services/billing_service.rb +2 -1
  185. data/lib/stripe/services/capital/financing_offer_service.rb +112 -0
  186. data/lib/stripe/services/capital/financing_summary_service.rb +28 -0
  187. data/lib/stripe/services/capital/financing_transaction_service.rb +79 -0
  188. data/lib/stripe/services/capital_service.rb +15 -0
  189. data/lib/stripe/services/charge_service.rb +1418 -0
  190. data/lib/stripe/services/checkout/session_service.rb +392 -4
  191. data/lib/stripe/services/coupon_service.rb +17 -1
  192. data/lib/stripe/services/credit_note_service.rb +4 -0
  193. data/lib/stripe/services/customer_session_service.rb +4 -1
  194. data/{rbi/stripe/services/account_external_account_service.rbi → lib/stripe/services/external_account_service.rb} +135 -122
  195. data/{rbi/stripe/services/tax/transaction_line_item_service.rbi → lib/stripe/services/financial_connections/account_inferred_balance_service.rb} +21 -17
  196. data/lib/stripe/services/financial_connections/account_service.rb +7 -2
  197. data/{rbi/stripe/services/climate/supplier_service.rbi → lib/stripe/services/financial_connections/institution_service.rb} +36 -25
  198. data/lib/stripe/services/financial_connections/session_service.rb +34 -2
  199. data/lib/stripe/services/financial_connections_service.rb +2 -1
  200. data/lib/stripe/services/fx_quote_service.rb +123 -0
  201. data/lib/stripe/services/identity/verification_session_service.rb +8 -0
  202. data/lib/stripe/services/invoice_item_service.rb +74 -2
  203. data/lib/stripe/services/invoice_line_item_service.rb +33 -1
  204. data/lib/stripe/services/invoice_payment_service.rb +4 -1
  205. data/lib/stripe/services/invoice_service.rb +1074 -16
  206. data/lib/stripe/services/issuing/cardholder_service.rb +2 -1
  207. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +504 -0
  208. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +66 -0
  209. data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +83 -0
  210. data/lib/stripe/services/issuing/transaction_service.rb +4 -0
  211. data/lib/stripe/services/issuing_service.rb +5 -1
  212. data/lib/stripe/services/mandate_service.rb +40 -0
  213. data/lib/stripe/services/margin_service.rb +119 -0
  214. data/{rbi/stripe/services/source_transaction_service.rbi → lib/stripe/services/order_line_item_service.rb} +20 -16
  215. data/lib/stripe/services/order_service.rb +2388 -0
  216. data/lib/stripe/services/payment_attempt_record_service.rb +52 -0
  217. data/{rbi/stripe/services/quote_line_item_service.rbi → lib/stripe/services/payment_intent_amount_details_line_item_service.rb} +20 -16
  218. data/lib/stripe/services/payment_intent_service.rb +7630 -2215
  219. data/lib/stripe/services/payment_method_configuration_service.rb +210 -0
  220. data/lib/stripe/services/payment_method_service.rb +120 -1
  221. data/lib/stripe/services/payment_record_service.rb +562 -0
  222. data/lib/stripe/services/price_service.rb +19 -0
  223. data/lib/stripe/services/privacy/redaction_job_service.rb +240 -0
  224. data/{rbi/stripe/services/tax/calculation_line_item_service.rbi → lib/stripe/services/privacy/redaction_job_validation_error_service.rb} +21 -17
  225. data/lib/stripe/services/privacy_service.rb +13 -0
  226. data/lib/stripe/services/promotion_code_service.rb +8 -0
  227. data/{rbi/stripe/services/credit_note_line_item_service.rbi → lib/stripe/services/quote_line_service.rb} +20 -16
  228. data/{rbi/stripe/services/payment_link_line_item_service.rbi → lib/stripe/services/quote_preview_invoice_service.rb} +20 -16
  229. data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +35 -0
  230. data/lib/stripe/services/quote_service.rb +1723 -8
  231. data/lib/stripe/services/setup_intent_service.rb +691 -9
  232. data/lib/stripe/services/subscription_item_service.rb +75 -3
  233. data/lib/stripe/services/subscription_schedule_service.rb +911 -10
  234. data/lib/stripe/services/subscription_service.rb +309 -9
  235. data/lib/stripe/services/tax/association_service.rb +31 -0
  236. data/lib/stripe/services/tax/form_service.rb +100 -0
  237. data/lib/stripe/services/tax_id_service.rb +8 -2
  238. data/lib/stripe/services/tax_service.rb +3 -1
  239. data/lib/stripe/services/terminal/configuration_service.rb +26 -0
  240. data/lib/stripe/services/terminal/onboarding_link_service.rb +56 -0
  241. data/lib/stripe/services/terminal/reader_collected_data_service.rb +28 -0
  242. data/lib/stripe/services/terminal_service.rb +3 -1
  243. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +97 -0
  244. data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +25 -1
  245. data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +25 -1
  246. data/lib/stripe/services/transfer_service.rb +4 -0
  247. data/lib/stripe/services/treasury/financial_account_features_service.rb +4 -1
  248. data/lib/stripe/services/treasury/financial_account_service.rb +16 -2
  249. data/lib/stripe/services/treasury/outbound_transfer_service.rb +24 -0
  250. data/lib/stripe/services/v1_services.rb +11 -1
  251. data/lib/stripe/services/v2/core/account_link_service.rb +114 -0
  252. data/lib/stripe/services/v2/core/account_service.rb +4536 -0
  253. data/lib/stripe/services/v2/core/accounts/person_service.rb +1045 -0
  254. data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +130 -0
  255. data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +107 -0
  256. data/lib/stripe/services/v2/core/vault_service.rb +18 -0
  257. data/lib/stripe/services/v2/core_service.rb +4 -1
  258. data/lib/stripe/services/v2/money_management/adjustment_service.rb +74 -0
  259. data/lib/stripe/services/v2/money_management/financial_account_service.rb +119 -0
  260. data/lib/stripe/services/v2/money_management/financial_address_service.rb +82 -0
  261. data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +125 -0
  262. data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +95 -0
  263. data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +199 -0
  264. data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +235 -0
  265. data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +172 -0
  266. data/lib/stripe/services/v2/money_management/payout_method_service.rb +90 -0
  267. data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +32 -0
  268. data/lib/stripe/services/v2/money_management/received_credit_service.rb +70 -0
  269. data/lib/stripe/services/v2/money_management/received_debit_service.rb +43 -0
  270. data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +69 -0
  271. data/lib/stripe/services/v2/money_management/transaction_service.rb +73 -0
  272. data/lib/stripe/services/v2/money_management_service.rb +31 -0
  273. data/lib/stripe/services/v2/payment_service.rb +15 -0
  274. data/lib/stripe/services/v2/payments/off_session_payment_service.rb +152 -0
  275. data/lib/stripe/services/v2/test_helper_service.rb +15 -0
  276. data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +53 -0
  277. data/lib/stripe/services/v2_services.rb +4 -1
  278. data/lib/stripe/services.rb +55 -0
  279. data/lib/stripe/stripe_configuration.rb +3 -1
  280. data/lib/stripe/stripe_object.rb +1 -1
  281. data/lib/stripe/util.rb +7 -1
  282. data/lib/stripe/version.rb +1 -1
  283. data/lib/stripe.rb +53 -0
  284. data/rbi/stripe.rbi +201354 -0
  285. data/stripe.gemspec +4 -1
  286. metadata +168 -323
  287. data/rbi/stripe/resources/account.rbi +0 -4991
  288. data/rbi/stripe/resources/account_link.rbi +0 -76
  289. data/rbi/stripe/resources/account_session.rbi +0 -1173
  290. data/rbi/stripe/resources/apple_pay_domain.rbi +0 -88
  291. data/rbi/stripe/resources/application.rbi +0 -20
  292. data/rbi/stripe/resources/application_fee.rbi +0 -118
  293. data/rbi/stripe/resources/application_fee_refund.rbi +0 -37
  294. data/rbi/stripe/resources/apps/secret.rbi +0 -195
  295. data/rbi/stripe/resources/balance.rbi +0 -230
  296. data/rbi/stripe/resources/balance_transaction.rbi +0 -147
  297. data/rbi/stripe/resources/bank_account.rbi +0 -127
  298. data/rbi/stripe/resources/billing/alert.rbi +0 -201
  299. data/rbi/stripe/resources/billing/alert_triggered.rbi +0 -28
  300. data/rbi/stripe/resources/billing/credit_balance_summary.rbi +0 -63
  301. data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +0 -147
  302. data/rbi/stripe/resources/billing/credit_grant.rbi +0 -291
  303. data/rbi/stripe/resources/billing/meter.rbi +0 -226
  304. data/rbi/stripe/resources/billing/meter_event.rbi +0 -64
  305. data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +0 -64
  306. data/rbi/stripe/resources/billing/meter_event_summary.rbi +0 -35
  307. data/rbi/stripe/resources/billing_portal/configuration.rbi +0 -712
  308. data/rbi/stripe/resources/billing_portal/session.rbi +0 -345
  309. data/rbi/stripe/resources/capability.rbi +0 -125
  310. data/rbi/stripe/resources/card.rbi +0 -125
  311. data/rbi/stripe/resources/cash_balance.rbi +0 -32
  312. data/rbi/stripe/resources/charge.rbi +0 -2136
  313. data/rbi/stripe/resources/checkout/session.rbi +0 -4105
  314. data/rbi/stripe/resources/climate/order.rbi +0 -245
  315. data/rbi/stripe/resources/climate/product.rbi +0 -75
  316. data/rbi/stripe/resources/climate/supplier.rbi +0 -72
  317. data/rbi/stripe/resources/confirmation_token.rbi +0 -1818
  318. data/rbi/stripe/resources/connect_collection_transfer.rbi +0 -26
  319. data/rbi/stripe/resources/country_spec.rbi +0 -85
  320. data/rbi/stripe/resources/coupon.rbi +0 -250
  321. data/rbi/stripe/resources/credit_note.rbi +0 -752
  322. data/rbi/stripe/resources/credit_note_line_item.rbi +0 -101
  323. data/rbi/stripe/resources/customer.rbi +0 -993
  324. data/rbi/stripe/resources/customer_balance_transaction.rbi +0 -56
  325. data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +0 -151
  326. data/rbi/stripe/resources/customer_session.rbi +0 -200
  327. data/rbi/stripe/resources/discount.rbi +0 -53
  328. data/rbi/stripe/resources/dispute.rbi +0 -761
  329. data/rbi/stripe/resources/entitlements/active_entitlement.rbi +0 -58
  330. data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +0 -23
  331. data/rbi/stripe/resources/entitlements/feature.rbi +0 -117
  332. data/rbi/stripe/resources/ephemeral_key.rbi +0 -44
  333. data/rbi/stripe/resources/event.rbi +0 -137
  334. data/rbi/stripe/resources/exchange_rate.rbi +0 -66
  335. data/rbi/stripe/resources/file.rbi +0 -143
  336. data/rbi/stripe/resources/file_link.rbi +0 -141
  337. data/rbi/stripe/resources/financial_connections/account.rbi +0 -339
  338. data/rbi/stripe/resources/financial_connections/account_owner.rbi +0 -35
  339. data/rbi/stripe/resources/financial_connections/account_ownership.rbi +0 -23
  340. data/rbi/stripe/resources/financial_connections/session.rbi +0 -123
  341. data/rbi/stripe/resources/financial_connections/transaction.rbi +0 -124
  342. data/rbi/stripe/resources/forwarding/request.rbi +0 -216
  343. data/rbi/stripe/resources/funding_instructions.rbi +0 -437
  344. data/rbi/stripe/resources/identity/verification_report.rbi +0 -360
  345. data/rbi/stripe/resources/identity/verification_session.rbi +0 -564
  346. data/rbi/stripe/resources/invoice.rbi +0 -3894
  347. data/rbi/stripe/resources/invoice_item.rbi +0 -470
  348. data/rbi/stripe/resources/invoice_line_item.rbi +0 -432
  349. data/rbi/stripe/resources/invoice_payment.rbi +0 -121
  350. data/rbi/stripe/resources/invoice_rendering_template.rbi +0 -104
  351. data/rbi/stripe/resources/issuing/authorization.rbi +0 -1283
  352. data/rbi/stripe/resources/issuing/card.rbi +0 -749
  353. data/rbi/stripe/resources/issuing/cardholder.rbi +0 -744
  354. data/rbi/stripe/resources/issuing/dispute.rbi +0 -913
  355. data/rbi/stripe/resources/issuing/personalization_design.rbi +0 -338
  356. data/rbi/stripe/resources/issuing/physical_bundle.rbi +0 -79
  357. data/rbi/stripe/resources/issuing/token.rbi +0 -226
  358. data/rbi/stripe/resources/issuing/transaction.rbi +0 -1061
  359. data/rbi/stripe/resources/line_item.rbi +0 -72
  360. data/rbi/stripe/resources/login_link.rbi +0 -19
  361. data/rbi/stripe/resources/mandate.rbi +0 -191
  362. data/rbi/stripe/resources/payment_intent.rbi +0 -10011
  363. data/rbi/stripe/resources/payment_link.rbi +0 -1891
  364. data/rbi/stripe/resources/payment_method.rbi +0 -1770
  365. data/rbi/stripe/resources/payment_method_configuration.rbi +0 -3550
  366. data/rbi/stripe/resources/payment_method_domain.rbi +0 -228
  367. data/rbi/stripe/resources/payout.rbi +0 -307
  368. data/rbi/stripe/resources/person.rbi +0 -401
  369. data/rbi/stripe/resources/plan.rbi +0 -371
  370. data/rbi/stripe/resources/price.rbi +0 -694
  371. data/rbi/stripe/resources/product.rbi +0 -553
  372. data/rbi/stripe/resources/product_feature.rbi +0 -26
  373. data/rbi/stripe/resources/promotion_code.rbi +0 -264
  374. data/rbi/stripe/resources/quote.rbi +0 -1137
  375. data/rbi/stripe/resources/radar/early_fraud_warning.rbi +0 -98
  376. data/rbi/stripe/resources/radar/value_list.rbi +0 -168
  377. data/rbi/stripe/resources/radar/value_list_item.rbi +0 -129
  378. data/rbi/stripe/resources/refund.rbi +0 -523
  379. data/rbi/stripe/resources/reporting/report_run.rbi +0 -191
  380. data/rbi/stripe/resources/reporting/report_type.rbi +0 -57
  381. data/rbi/stripe/resources/reserve_transaction.rbi +0 -23
  382. data/rbi/stripe/resources/reversal.rbi +0 -51
  383. data/rbi/stripe/resources/review.rbi +0 -154
  384. data/rbi/stripe/resources/setup_attempt.rbi +0 -477
  385. data/rbi/stripe/resources/setup_intent.rbi +0 -3974
  386. data/rbi/stripe/resources/shipping_rate.rbi +0 -305
  387. data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +0 -75
  388. data/rbi/stripe/resources/source.rbi +0 -1496
  389. data/rbi/stripe/resources/source_mandate_notification.rbi +0 -77
  390. data/rbi/stripe/resources/source_transaction.rbi +0 -127
  391. data/rbi/stripe/resources/subscription.rbi +0 -2154
  392. data/rbi/stripe/resources/subscription_item.rbi +0 -404
  393. data/rbi/stripe/resources/subscription_schedule.rbi +0 -1795
  394. data/rbi/stripe/resources/tax/calculation.rbi +0 -478
  395. data/rbi/stripe/resources/tax/calculation_line_item.rbi +0 -91
  396. data/rbi/stripe/resources/tax/registration.rbi +0 -3216
  397. data/rbi/stripe/resources/tax/settings.rbi +0 -141
  398. data/rbi/stripe/resources/tax/transaction.rbi +0 -351
  399. data/rbi/stripe/resources/tax/transaction_line_item.rbi +0 -54
  400. data/rbi/stripe/resources/tax_code.rbi +0 -44
  401. data/rbi/stripe/resources/tax_deducted_at_source.rbi +0 -23
  402. data/rbi/stripe/resources/tax_id.rbi +0 -165
  403. data/rbi/stripe/resources/tax_rate.rbi +0 -239
  404. data/rbi/stripe/resources/terminal/configuration.rbi +0 -1647
  405. data/rbi/stripe/resources/terminal/connection_token.rbi +0 -37
  406. data/rbi/stripe/resources/terminal/location.rbi +0 -222
  407. data/rbi/stripe/resources/terminal/reader.rbi +0 -1016
  408. data/rbi/stripe/resources/test_helpers/test_clock.rbi +0 -132
  409. data/rbi/stripe/resources/token.rbi +0 -1281
  410. data/rbi/stripe/resources/topup.rbi +0 -222
  411. data/rbi/stripe/resources/transfer.rbi +0 -199
  412. data/rbi/stripe/resources/treasury/credit_reversal.rbi +0 -119
  413. data/rbi/stripe/resources/treasury/debit_reversal.rbi +0 -131
  414. data/rbi/stripe/resources/treasury/financial_account.rbi +0 -869
  415. data/rbi/stripe/resources/treasury/financial_account_features.rbi +0 -260
  416. data/rbi/stripe/resources/treasury/inbound_transfer.rbi +0 -295
  417. data/rbi/stripe/resources/treasury/outbound_payment.rbi +0 -592
  418. data/rbi/stripe/resources/treasury/outbound_transfer.rbi +0 -431
  419. data/rbi/stripe/resources/treasury/received_credit.rbi +0 -302
  420. data/rbi/stripe/resources/treasury/received_debit.rbi +0 -256
  421. data/rbi/stripe/resources/treasury/transaction.rbi +0 -215
  422. data/rbi/stripe/resources/treasury/transaction_entry.rbi +0 -192
  423. data/rbi/stripe/resources/v2/amount.rbi +0 -14
  424. data/rbi/stripe/resources/v2/billing/meter_event.rbi +0 -37
  425. data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +0 -41
  426. data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +0 -31
  427. data/rbi/stripe/resources/v2/event.rbi +0 -48
  428. data/rbi/stripe/resources/v2/event_destination.rbi +0 -91
  429. data/rbi/stripe/resources/webhook_endpoint.rbi +0 -168
  430. data/rbi/stripe/services/account_capability_service.rbi +0 -51
  431. data/rbi/stripe/services/account_link_service.rbi +0 -60
  432. data/rbi/stripe/services/account_login_link_service.rbi +0 -22
  433. data/rbi/stripe/services/account_person_service.rbi +0 -1007
  434. data/rbi/stripe/services/account_service.rbi +0 -4281
  435. data/rbi/stripe/services/account_session_service.rbi +0 -748
  436. data/rbi/stripe/services/apple_pay_domain_service.rbi +0 -76
  437. data/rbi/stripe/services/application_fee_refund_service.rbi +0 -93
  438. data/rbi/stripe/services/application_fee_service.rbi +0 -78
  439. data/rbi/stripe/services/apps/secret_service.rbi +0 -151
  440. data/rbi/stripe/services/apps_service.rbi +0 -9
  441. data/rbi/stripe/services/balance_service.rbi +0 -21
  442. data/rbi/stripe/services/balance_transaction_service.rbi +0 -93
  443. data/rbi/stripe/services/billing/alert_service.rbi +0 -152
  444. data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +0 -68
  445. data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +0 -59
  446. data/rbi/stripe/services/billing/credit_grant_service.rbi +0 -211
  447. data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +0 -42
  448. data/rbi/stripe/services/billing/meter_event_service.rbi +0 -42
  449. data/rbi/stripe/services/billing/meter_event_summary_service.rbi +0 -54
  450. data/rbi/stripe/services/billing/meter_service.rbi +0 -163
  451. data/rbi/stripe/services/billing_portal/configuration_service.rbi +0 -561
  452. data/rbi/stripe/services/billing_portal/session_service.rbi +0 -204
  453. data/rbi/stripe/services/billing_portal_service.rbi +0 -10
  454. data/rbi/stripe/services/billing_service.rbi +0 -15
  455. data/rbi/stripe/services/charge_service.rbi +0 -448
  456. data/rbi/stripe/services/checkout/session_line_item_service.rbi +0 -33
  457. data/rbi/stripe/services/checkout/session_service.rbi +0 -2697
  458. data/rbi/stripe/services/checkout_service.rbi +0 -9
  459. data/rbi/stripe/services/climate/order_service.rbi +0 -142
  460. data/rbi/stripe/services/climate/product_service.rbi +0 -46
  461. data/rbi/stripe/services/climate_service.rbi +0 -11
  462. data/rbi/stripe/services/confirmation_token_service.rbi +0 -20
  463. data/rbi/stripe/services/country_spec_service.rbi +0 -44
  464. data/rbi/stripe/services/coupon_service.rbi +0 -194
  465. data/rbi/stripe/services/credit_note_preview_lines_service.rbi +0 -167
  466. data/rbi/stripe/services/credit_note_service.rbi +0 -415
  467. data/rbi/stripe/services/customer_balance_transaction_service.rbi +0 -92
  468. data/rbi/stripe/services/customer_cash_balance_service.rbi +0 -45
  469. data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +0 -44
  470. data/rbi/stripe/services/customer_funding_instructions_service.rbi +0 -59
  471. data/rbi/stripe/services/customer_payment_method_service.rbi +0 -57
  472. data/rbi/stripe/services/customer_payment_source_service.rbi +0 -232
  473. data/rbi/stripe/services/customer_service.rbi +0 -635
  474. data/rbi/stripe/services/customer_session_service.rbi +0 -116
  475. data/rbi/stripe/services/customer_tax_id_service.rbi +0 -70
  476. data/rbi/stripe/services/dispute_service.rbi +0 -424
  477. data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +0 -55
  478. data/rbi/stripe/services/entitlements/feature_service.rbi +0 -107
  479. data/rbi/stripe/services/entitlements_service.rbi +0 -10
  480. data/rbi/stripe/services/ephemeral_key_service.rbi +0 -53
  481. data/rbi/stripe/services/event_service.rbi +0 -83
  482. data/rbi/stripe/services/exchange_rate_service.rbi +0 -44
  483. data/rbi/stripe/services/file_link_service.rbi +0 -124
  484. data/rbi/stripe/services/file_service.rbi +0 -116
  485. data/rbi/stripe/services/financial_connections/account_owner_service.rbi +0 -42
  486. data/rbi/stripe/services/financial_connections/account_service.rbi +0 -133
  487. data/rbi/stripe/services/financial_connections/session_service.rbi +0 -88
  488. data/rbi/stripe/services/financial_connections/transaction_service.rbi +0 -92
  489. data/rbi/stripe/services/financial_connections_service.rbi +0 -11
  490. data/rbi/stripe/services/forwarding/request_service.rbi +0 -134
  491. data/rbi/stripe/services/forwarding_service.rbi +0 -9
  492. data/rbi/stripe/services/identity/verification_report_service.rbi +0 -87
  493. data/rbi/stripe/services/identity/verification_session_service.rbi +0 -339
  494. data/rbi/stripe/services/identity_service.rbi +0 -10
  495. data/rbi/stripe/services/invoice_item_service.rbi +0 -366
  496. data/rbi/stripe/services/invoice_line_item_service.rbi +0 -259
  497. data/rbi/stripe/services/invoice_payment_service.rbi +0 -71
  498. data/rbi/stripe/services/invoice_rendering_template_service.rbi +0 -82
  499. data/rbi/stripe/services/invoice_service.rbi +0 -3073
  500. data/rbi/stripe/services/issuing/authorization_service.rbi +0 -146
  501. data/rbi/stripe/services/issuing/card_service.rbi +0 -503
  502. data/rbi/stripe/services/issuing/cardholder_service.rbi +0 -587
  503. data/rbi/stripe/services/issuing/dispute_service.rbi +0 -707
  504. data/rbi/stripe/services/issuing/personalization_design_service.rbi +0 -243
  505. data/rbi/stripe/services/issuing/physical_bundle_service.rbi +0 -59
  506. data/rbi/stripe/services/issuing/token_service.rbi +0 -99
  507. data/rbi/stripe/services/issuing/transaction_service.rbi +0 -105
  508. data/rbi/stripe/services/issuing_service.rbi +0 -16
  509. data/rbi/stripe/services/mandate_service.rbi +0 -20
  510. data/rbi/stripe/services/payment_intent_service.rbi +0 -8010
  511. data/rbi/stripe/services/payment_link_service.rbi +0 -1441
  512. data/rbi/stripe/services/payment_method_configuration_service.rbi +0 -2487
  513. data/rbi/stripe/services/payment_method_domain_service.rbi +0 -112
  514. data/rbi/stripe/services/payment_method_service.rbi +0 -781
  515. data/rbi/stripe/services/payout_service.rbi +0 -209
  516. data/rbi/stripe/services/plan_service.rbi +0 -282
  517. data/rbi/stripe/services/price_service.rbi +0 -546
  518. data/rbi/stripe/services/product_feature_service.rbi +0 -67
  519. data/rbi/stripe/services/product_service.rbi +0 -477
  520. data/rbi/stripe/services/promotion_code_service.rbi +0 -214
  521. data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +0 -31
  522. data/rbi/stripe/services/quote_service.rbi +0 -695
  523. data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +0 -85
  524. data/rbi/stripe/services/radar/value_list_item_service.rbi +0 -109
  525. data/rbi/stripe/services/radar/value_list_service.rbi +0 -141
  526. data/rbi/stripe/services/radar_service.rbi +0 -11
  527. data/rbi/stripe/services/refund_service.rbi +0 -185
  528. data/rbi/stripe/services/reporting/report_run_service.rbi +0 -135
  529. data/rbi/stripe/services/reporting/report_type_service.rbi +0 -35
  530. data/rbi/stripe/services/reporting_service.rbi +0 -10
  531. data/rbi/stripe/services/review_service.rbi +0 -84
  532. data/rbi/stripe/services/setup_attempt_service.rbi +0 -65
  533. data/rbi/stripe/services/setup_intent_service.rbi +0 -3709
  534. data/rbi/stripe/services/shipping_rate_service.rbi +0 -241
  535. data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +0 -46
  536. data/rbi/stripe/services/sigma_service.rbi +0 -9
  537. data/rbi/stripe/services/source_service.rbi +0 -663
  538. data/rbi/stripe/services/subscription_item_service.rbi +0 -350
  539. data/rbi/stripe/services/subscription_schedule_service.rbi +0 -1425
  540. data/rbi/stripe/services/subscription_service.rbi +0 -1768
  541. data/rbi/stripe/services/tax/calculation_service.rbi +0 -234
  542. data/rbi/stripe/services/tax/registration_service.rbi +0 -2278
  543. data/rbi/stripe/services/tax/settings_service.rbi +0 -93
  544. data/rbi/stripe/services/tax/transaction_service.rbi +0 -146
  545. data/rbi/stripe/services/tax_code_service.rbi +0 -44
  546. data/rbi/stripe/services/tax_id_service.rbi +0 -110
  547. data/rbi/stripe/services/tax_rate_service.rbi +0 -185
  548. data/rbi/stripe/services/tax_service.rbi +0 -12
  549. data/rbi/stripe/services/terminal/configuration_service.rbi +0 -1328
  550. data/rbi/stripe/services/terminal/connection_token_service.rbi +0 -25
  551. data/rbi/stripe/services/terminal/location_service.rbi +0 -182
  552. data/rbi/stripe/services/terminal/reader_service.rbi +0 -540
  553. data/rbi/stripe/services/terminal_service.rbi +0 -12
  554. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +0 -746
  555. data/rbi/stripe/services/test_helpers/customer_service.rbi +0 -33
  556. data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +0 -848
  557. data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +0 -76
  558. data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +0 -69
  559. data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +0 -711
  560. data/rbi/stripe/services/test_helpers/issuing_service.rbi +0 -14
  561. data/rbi/stripe/services/test_helpers/refund_service.rbi +0 -22
  562. data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +0 -117
  563. data/rbi/stripe/services/test_helpers/terminal_service.rbi +0 -11
  564. data/rbi/stripe/services/test_helpers/test_clock_service.rbi +0 -90
  565. data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +0 -64
  566. data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +0 -125
  567. data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +0 -125
  568. data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +0 -87
  569. data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +0 -87
  570. data/rbi/stripe/services/test_helpers/treasury_service.rbi +0 -15
  571. data/rbi/stripe/services/test_helpers_service.rbi +0 -15
  572. data/rbi/stripe/services/token_service.rbi +0 -1255
  573. data/rbi/stripe/services/topup_service.rbi +0 -176
  574. data/rbi/stripe/services/transfer_reversal_service.rbi +0 -101
  575. data/rbi/stripe/services/transfer_service.rbi +0 -152
  576. data/rbi/stripe/services/treasury/credit_reversal_service.rbi +0 -84
  577. data/rbi/stripe/services/treasury/debit_reversal_service.rbi +0 -88
  578. data/rbi/stripe/services/treasury/financial_account_features_service.rbi +0 -198
  579. data/rbi/stripe/services/treasury/financial_account_service.rbi +0 -566
  580. data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +0 -117
  581. data/rbi/stripe/services/treasury/outbound_payment_service.rbi +0 -304
  582. data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +0 -157
  583. data/rbi/stripe/services/treasury/received_credit_service.rbi +0 -72
  584. data/rbi/stripe/services/treasury/received_debit_service.rbi +0 -59
  585. data/rbi/stripe/services/treasury/transaction_entry_service.rbi +0 -111
  586. data/rbi/stripe/services/treasury/transaction_service.rbi +0 -122
  587. data/rbi/stripe/services/treasury_service.rbi +0 -18
  588. data/rbi/stripe/services/v1_services.rbi +0 -77
  589. data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +0 -39
  590. data/rbi/stripe/services/v2/billing/meter_event_service.rbi +0 -42
  591. data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +0 -18
  592. data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +0 -55
  593. data/rbi/stripe/services/v2/billing_service.rbi +0 -14
  594. data/rbi/stripe/services/v2/core/event_destination_service.rbi +0 -192
  595. data/rbi/stripe/services/v2/core/event_service.rbi +0 -36
  596. data/rbi/stripe/services/v2/core_service.rbi +0 -12
  597. data/rbi/stripe/services/v2_services.rbi +0 -10
  598. data/rbi/stripe/services/webhook_endpoint_service.rbi +0 -129
@@ -1,1795 +0,0 @@
1
- # File generated from our OpenAPI spec
2
- # frozen_string_literal: true
3
-
4
- # typed: true
5
- module Stripe
6
- # A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes.
7
- #
8
- # Related guide: [Subscription schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules)
9
- class SubscriptionSchedule < APIResource
10
- class BillingMode < Stripe::StripeObject
11
- # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
12
- sig { returns(String) }
13
- attr_reader :type
14
- # Details on when the current billing_mode was adopted.
15
- sig { returns(Integer) }
16
- attr_reader :updated_at
17
- end
18
- class CurrentPhase < Stripe::StripeObject
19
- # The end of this phase of the subscription schedule.
20
- sig { returns(Integer) }
21
- attr_reader :end_date
22
- # The start of this phase of the subscription schedule.
23
- sig { returns(Integer) }
24
- attr_reader :start_date
25
- end
26
- class DefaultSettings < Stripe::StripeObject
27
- class AutomaticTax < Stripe::StripeObject
28
- class Liability < Stripe::StripeObject
29
- # The connected account being referenced when `type` is `account`.
30
- sig { returns(T.any(String, Stripe::Account)) }
31
- attr_reader :account
32
- # Type of the account referenced.
33
- sig { returns(String) }
34
- attr_reader :type
35
- end
36
- # If Stripe disabled automatic tax, this enum describes why.
37
- sig { returns(T.nilable(String)) }
38
- attr_reader :disabled_reason
39
- # Whether Stripe automatically computes tax on invoices created during this phase.
40
- sig { returns(T::Boolean) }
41
- attr_reader :enabled
42
- # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
43
- sig { returns(T.nilable(Liability)) }
44
- attr_reader :liability
45
- end
46
- class BillingThresholds < Stripe::StripeObject
47
- # Monetary threshold that triggers the subscription to create an invoice
48
- sig { returns(T.nilable(Integer)) }
49
- attr_reader :amount_gte
50
- # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`.
51
- sig { returns(T.nilable(T::Boolean)) }
52
- attr_reader :reset_billing_cycle_anchor
53
- end
54
- class InvoiceSettings < Stripe::StripeObject
55
- class Issuer < Stripe::StripeObject
56
- # The connected account being referenced when `type` is `account`.
57
- sig { returns(T.any(String, Stripe::Account)) }
58
- attr_reader :account
59
- # Type of the account referenced.
60
- sig { returns(String) }
61
- attr_reader :type
62
- end
63
- # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule.
64
- sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) }
65
- attr_reader :account_tax_ids
66
- # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
67
- sig { returns(T.nilable(Integer)) }
68
- attr_reader :days_until_due
69
- # Attribute for field issuer
70
- sig { returns(Issuer) }
71
- attr_reader :issuer
72
- end
73
- class TransferData < Stripe::StripeObject
74
- # 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 destination account. By default, the entire amount is transferred to the destination.
75
- sig { returns(T.nilable(Float)) }
76
- attr_reader :amount_percent
77
- # The account where funds from the payment will be transferred to upon payment success.
78
- sig { returns(T.any(String, Stripe::Account)) }
79
- attr_reader :destination
80
- end
81
- # 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 during this phase of the schedule.
82
- sig { returns(T.nilable(Float)) }
83
- attr_reader :application_fee_percent
84
- # Attribute for field automatic_tax
85
- sig { returns(AutomaticTax) }
86
- attr_reader :automatic_tax
87
- # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
88
- sig { returns(String) }
89
- attr_reader :billing_cycle_anchor
90
- # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
91
- sig { returns(T.nilable(BillingThresholds)) }
92
- attr_reader :billing_thresholds
93
- # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.
94
- sig { returns(T.nilable(String)) }
95
- attr_reader :collection_method
96
- # ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
97
- sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) }
98
- attr_reader :default_payment_method
99
- # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
100
- sig { returns(T.nilable(String)) }
101
- attr_reader :description
102
- # Attribute for field invoice_settings
103
- sig { returns(InvoiceSettings) }
104
- attr_reader :invoice_settings
105
- # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details.
106
- sig { returns(T.nilable(T.any(String, Stripe::Account))) }
107
- attr_reader :on_behalf_of
108
- # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
109
- sig { returns(T.nilable(TransferData)) }
110
- attr_reader :transfer_data
111
- end
112
- class Phase < Stripe::StripeObject
113
- class AddInvoiceItem < Stripe::StripeObject
114
- class Discount < Stripe::StripeObject
115
- # ID of the coupon to create a new discount for.
116
- sig { returns(T.nilable(T.any(String, Stripe::Coupon))) }
117
- attr_reader :coupon
118
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
119
- sig { returns(T.nilable(T.any(String, Stripe::Discount))) }
120
- attr_reader :discount
121
- # ID of the promotion code to create a new discount for.
122
- sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) }
123
- attr_reader :promotion_code
124
- end
125
- class Period < Stripe::StripeObject
126
- class End < Stripe::StripeObject
127
- # A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
128
- sig { returns(Integer) }
129
- attr_reader :timestamp
130
- # Select how to calculate the end of the invoice item period.
131
- sig { returns(String) }
132
- attr_reader :type
133
- end
134
- class Start < Stripe::StripeObject
135
- # A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
136
- sig { returns(Integer) }
137
- attr_reader :timestamp
138
- # Select how to calculate the start of the invoice item period.
139
- sig { returns(String) }
140
- attr_reader :type
141
- end
142
- # Attribute for field end
143
- sig { returns(End) }
144
- attr_reader :end
145
- # Attribute for field start
146
- sig { returns(Start) }
147
- attr_reader :start
148
- end
149
- # The stackable discounts that will be applied to the item.
150
- sig { returns(T::Array[Discount]) }
151
- attr_reader :discounts
152
- # 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.
153
- sig { returns(T.nilable(T::Hash[String, String])) }
154
- attr_reader :metadata
155
- # Attribute for field period
156
- sig { returns(Period) }
157
- attr_reader :period
158
- # ID of the price used to generate the invoice item.
159
- sig { returns(T.any(String, Stripe::Price)) }
160
- attr_reader :price
161
- # The quantity of the invoice item.
162
- sig { returns(T.nilable(Integer)) }
163
- attr_reader :quantity
164
- # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
165
- sig { returns(T.nilable(T::Array[Stripe::TaxRate])) }
166
- attr_reader :tax_rates
167
- end
168
- class AutomaticTax < Stripe::StripeObject
169
- class Liability < Stripe::StripeObject
170
- # The connected account being referenced when `type` is `account`.
171
- sig { returns(T.any(String, Stripe::Account)) }
172
- attr_reader :account
173
- # Type of the account referenced.
174
- sig { returns(String) }
175
- attr_reader :type
176
- end
177
- # If Stripe disabled automatic tax, this enum describes why.
178
- sig { returns(T.nilable(String)) }
179
- attr_reader :disabled_reason
180
- # Whether Stripe automatically computes tax on invoices created during this phase.
181
- sig { returns(T::Boolean) }
182
- attr_reader :enabled
183
- # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
184
- sig { returns(T.nilable(Liability)) }
185
- attr_reader :liability
186
- end
187
- class BillingThresholds < Stripe::StripeObject
188
- # Monetary threshold that triggers the subscription to create an invoice
189
- sig { returns(T.nilable(Integer)) }
190
- attr_reader :amount_gte
191
- # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`.
192
- sig { returns(T.nilable(T::Boolean)) }
193
- attr_reader :reset_billing_cycle_anchor
194
- end
195
- class Discount < Stripe::StripeObject
196
- # ID of the coupon to create a new discount for.
197
- sig { returns(T.nilable(T.any(String, Stripe::Coupon))) }
198
- attr_reader :coupon
199
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
200
- sig { returns(T.nilable(T.any(String, Stripe::Discount))) }
201
- attr_reader :discount
202
- # ID of the promotion code to create a new discount for.
203
- sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) }
204
- attr_reader :promotion_code
205
- end
206
- class InvoiceSettings < Stripe::StripeObject
207
- class Issuer < Stripe::StripeObject
208
- # The connected account being referenced when `type` is `account`.
209
- sig { returns(T.any(String, Stripe::Account)) }
210
- attr_reader :account
211
- # Type of the account referenced.
212
- sig { returns(String) }
213
- attr_reader :type
214
- end
215
- # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
216
- sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) }
217
- attr_reader :account_tax_ids
218
- # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
219
- sig { returns(T.nilable(Integer)) }
220
- attr_reader :days_until_due
221
- # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
222
- sig { returns(T.nilable(Issuer)) }
223
- attr_reader :issuer
224
- end
225
- class Item < Stripe::StripeObject
226
- class BillingThresholds < Stripe::StripeObject
227
- # Usage threshold that triggers the subscription to create an invoice
228
- sig { returns(T.nilable(Integer)) }
229
- attr_reader :usage_gte
230
- end
231
- class Discount < Stripe::StripeObject
232
- # ID of the coupon to create a new discount for.
233
- sig { returns(T.nilable(T.any(String, Stripe::Coupon))) }
234
- attr_reader :coupon
235
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
236
- sig { returns(T.nilable(T.any(String, Stripe::Discount))) }
237
- attr_reader :discount
238
- # ID of the promotion code to create a new discount for.
239
- sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) }
240
- attr_reader :promotion_code
241
- end
242
- # Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period
243
- sig { returns(T.nilable(BillingThresholds)) }
244
- attr_reader :billing_thresholds
245
- # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.
246
- sig { returns(T::Array[Discount]) }
247
- attr_reader :discounts
248
- # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered.
249
- sig { returns(T.nilable(T::Hash[String, String])) }
250
- attr_reader :metadata
251
- # ID of the plan to which the customer should be subscribed.
252
- sig { returns(T.any(String, Stripe::Plan)) }
253
- attr_reader :plan
254
- # ID of the price to which the customer should be subscribed.
255
- sig { returns(T.any(String, Stripe::Price)) }
256
- attr_reader :price
257
- # Quantity of the plan to which the customer should be subscribed.
258
- sig { returns(Integer) }
259
- attr_reader :quantity
260
- # The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`.
261
- sig { returns(T.nilable(T::Array[Stripe::TaxRate])) }
262
- attr_reader :tax_rates
263
- end
264
- class TransferData < Stripe::StripeObject
265
- # 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 destination account. By default, the entire amount is transferred to the destination.
266
- sig { returns(T.nilable(Float)) }
267
- attr_reader :amount_percent
268
- # The account where funds from the payment will be transferred to upon payment success.
269
- sig { returns(T.any(String, Stripe::Account)) }
270
- attr_reader :destination
271
- end
272
- # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase.
273
- sig { returns(T::Array[AddInvoiceItem]) }
274
- attr_reader :add_invoice_items
275
- # 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 during this phase of the schedule.
276
- sig { returns(T.nilable(Float)) }
277
- attr_reader :application_fee_percent
278
- # Attribute for field automatic_tax
279
- sig { returns(AutomaticTax) }
280
- attr_reader :automatic_tax
281
- # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
282
- sig { returns(T.nilable(String)) }
283
- attr_reader :billing_cycle_anchor
284
- # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
285
- sig { returns(T.nilable(BillingThresholds)) }
286
- attr_reader :billing_thresholds
287
- # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.
288
- sig { returns(T.nilable(String)) }
289
- attr_reader :collection_method
290
- # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
291
- sig { returns(String) }
292
- attr_reader :currency
293
- # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
294
- sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) }
295
- attr_reader :default_payment_method
296
- # The default tax rates to apply to the subscription during this phase of the subscription schedule.
297
- sig { returns(T.nilable(T::Array[Stripe::TaxRate])) }
298
- attr_reader :default_tax_rates
299
- # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
300
- sig { returns(T.nilable(String)) }
301
- attr_reader :description
302
- # The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts.
303
- sig { returns(T::Array[Discount]) }
304
- attr_reader :discounts
305
- # The end of this phase of the subscription schedule.
306
- sig { returns(Integer) }
307
- attr_reader :end_date
308
- # The invoice settings applicable during this phase.
309
- sig { returns(T.nilable(InvoiceSettings)) }
310
- attr_reader :invoice_settings
311
- # Subscription items to configure the subscription to during this phase of the subscription schedule.
312
- sig { returns(T::Array[Item]) }
313
- attr_reader :items
314
- # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`.
315
- sig { returns(T.nilable(T::Hash[String, String])) }
316
- attr_reader :metadata
317
- # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details.
318
- sig { returns(T.nilable(T.any(String, Stripe::Account))) }
319
- attr_reader :on_behalf_of
320
- # When transitioning phases, controls how prorations are handled (if any). Possible values are `create_prorations`, `none`, and `always_invoice`.
321
- sig { returns(String) }
322
- attr_reader :proration_behavior
323
- # The start of this phase of the subscription schedule.
324
- sig { returns(Integer) }
325
- attr_reader :start_date
326
- # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
327
- sig { returns(T.nilable(TransferData)) }
328
- attr_reader :transfer_data
329
- # When the trial ends within the phase.
330
- sig { returns(T.nilable(Integer)) }
331
- attr_reader :trial_end
332
- end
333
- # ID of the Connect Application that created the schedule.
334
- sig { returns(T.nilable(T.any(String, Stripe::Application))) }
335
- attr_reader :application
336
- # The billing mode of the subscription.
337
- sig { returns(BillingMode) }
338
- attr_reader :billing_mode
339
- # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.
340
- sig { returns(T.nilable(Integer)) }
341
- attr_reader :canceled_at
342
- # Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch.
343
- sig { returns(T.nilable(Integer)) }
344
- attr_reader :completed_at
345
- # Time at which the object was created. Measured in seconds since the Unix epoch.
346
- sig { returns(Integer) }
347
- attr_reader :created
348
- # Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`.
349
- sig { returns(T.nilable(CurrentPhase)) }
350
- attr_reader :current_phase
351
- # ID of the customer who owns the subscription schedule.
352
- sig { returns(T.any(String, Stripe::Customer)) }
353
- attr_reader :customer
354
- # Attribute for field default_settings
355
- sig { returns(DefaultSettings) }
356
- attr_reader :default_settings
357
- # 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.
358
- sig { returns(String) }
359
- attr_reader :end_behavior
360
- # Unique identifier for the object.
361
- sig { returns(String) }
362
- attr_reader :id
363
- # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
364
- sig { returns(T::Boolean) }
365
- attr_reader :livemode
366
- # 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.
367
- sig { returns(T.nilable(T::Hash[String, String])) }
368
- attr_reader :metadata
369
- # String representing the object's type. Objects of the same type share the same value.
370
- sig { returns(String) }
371
- attr_reader :object
372
- # Configuration for the subscription schedule's phases.
373
- sig { returns(T::Array[Phase]) }
374
- attr_reader :phases
375
- # Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.
376
- sig { returns(T.nilable(Integer)) }
377
- attr_reader :released_at
378
- # ID of the subscription once managed by the subscription schedule (if it is released).
379
- sig { returns(T.nilable(String)) }
380
- attr_reader :released_subscription
381
- # The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules).
382
- sig { returns(String) }
383
- attr_reader :status
384
- # ID of the subscription managed by the subscription schedule.
385
- sig { returns(T.nilable(T.any(String, Stripe::Subscription))) }
386
- attr_reader :subscription
387
- # ID of the test clock this subscription schedule belongs to.
388
- sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) }
389
- attr_reader :test_clock
390
- class ListParams < Stripe::RequestParams
391
- class CanceledAt < Stripe::RequestParams
392
- # Minimum value to filter by (exclusive)
393
- sig { returns(T.nilable(Integer)) }
394
- attr_accessor :gt
395
- # Minimum value to filter by (inclusive)
396
- sig { returns(T.nilable(Integer)) }
397
- attr_accessor :gte
398
- # Maximum value to filter by (exclusive)
399
- sig { returns(T.nilable(Integer)) }
400
- attr_accessor :lt
401
- # Maximum value to filter by (inclusive)
402
- sig { returns(T.nilable(Integer)) }
403
- attr_accessor :lte
404
- sig {
405
- params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
406
- }
407
- def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
408
- end
409
- class CompletedAt < Stripe::RequestParams
410
- # Minimum value to filter by (exclusive)
411
- sig { returns(T.nilable(Integer)) }
412
- attr_accessor :gt
413
- # Minimum value to filter by (inclusive)
414
- sig { returns(T.nilable(Integer)) }
415
- attr_accessor :gte
416
- # Maximum value to filter by (exclusive)
417
- sig { returns(T.nilable(Integer)) }
418
- attr_accessor :lt
419
- # Maximum value to filter by (inclusive)
420
- sig { returns(T.nilable(Integer)) }
421
- attr_accessor :lte
422
- sig {
423
- params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
424
- }
425
- def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
426
- end
427
- class Created < Stripe::RequestParams
428
- # Minimum value to filter by (exclusive)
429
- sig { returns(T.nilable(Integer)) }
430
- attr_accessor :gt
431
- # Minimum value to filter by (inclusive)
432
- sig { returns(T.nilable(Integer)) }
433
- attr_accessor :gte
434
- # Maximum value to filter by (exclusive)
435
- sig { returns(T.nilable(Integer)) }
436
- attr_accessor :lt
437
- # Maximum value to filter by (inclusive)
438
- sig { returns(T.nilable(Integer)) }
439
- attr_accessor :lte
440
- sig {
441
- params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
442
- }
443
- def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
444
- end
445
- class ReleasedAt < Stripe::RequestParams
446
- # Minimum value to filter by (exclusive)
447
- sig { returns(T.nilable(Integer)) }
448
- attr_accessor :gt
449
- # Minimum value to filter by (inclusive)
450
- sig { returns(T.nilable(Integer)) }
451
- attr_accessor :gte
452
- # Maximum value to filter by (exclusive)
453
- sig { returns(T.nilable(Integer)) }
454
- attr_accessor :lt
455
- # Maximum value to filter by (inclusive)
456
- sig { returns(T.nilable(Integer)) }
457
- attr_accessor :lte
458
- sig {
459
- params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
460
- }
461
- def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
462
- end
463
- # Only return subscription schedules that were created canceled the given date interval.
464
- sig {
465
- returns(T.nilable(T.any(::Stripe::SubscriptionSchedule::ListParams::CanceledAt, Integer)))
466
- }
467
- attr_accessor :canceled_at
468
- # Only return subscription schedules that completed during the given date interval.
469
- sig {
470
- returns(T.nilable(T.any(::Stripe::SubscriptionSchedule::ListParams::CompletedAt, Integer)))
471
- }
472
- attr_accessor :completed_at
473
- # Only return subscription schedules that were created during the given date interval.
474
- sig {
475
- returns(T.nilable(T.any(::Stripe::SubscriptionSchedule::ListParams::Created, Integer)))
476
- }
477
- attr_accessor :created
478
- # Only return subscription schedules for the given customer.
479
- sig { returns(T.nilable(String)) }
480
- attr_accessor :customer
481
- # 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.
482
- sig { returns(T.nilable(String)) }
483
- attr_accessor :ending_before
484
- # Specifies which fields in the response should be expanded.
485
- sig { returns(T.nilable(T::Array[String])) }
486
- attr_accessor :expand
487
- # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
488
- sig { returns(T.nilable(Integer)) }
489
- attr_accessor :limit
490
- # Only return subscription schedules that were released during the given date interval.
491
- sig {
492
- returns(T.nilable(T.any(::Stripe::SubscriptionSchedule::ListParams::ReleasedAt, Integer)))
493
- }
494
- attr_accessor :released_at
495
- # Only return subscription schedules that have not started yet.
496
- sig { returns(T.nilable(T::Boolean)) }
497
- attr_accessor :scheduled
498
- # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
499
- sig { returns(T.nilable(String)) }
500
- attr_accessor :starting_after
501
- sig {
502
- params(canceled_at: T.nilable(T.any(::Stripe::SubscriptionSchedule::ListParams::CanceledAt, Integer)), completed_at: T.nilable(T.any(::Stripe::SubscriptionSchedule::ListParams::CompletedAt, Integer)), created: T.nilable(T.any(::Stripe::SubscriptionSchedule::ListParams::Created, Integer)), customer: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), released_at: T.nilable(T.any(::Stripe::SubscriptionSchedule::ListParams::ReleasedAt, Integer)), scheduled: T.nilable(T::Boolean), starting_after: T.nilable(String)).void
503
- }
504
- def initialize(
505
- canceled_at: nil,
506
- completed_at: nil,
507
- created: nil,
508
- customer: nil,
509
- ending_before: nil,
510
- expand: nil,
511
- limit: nil,
512
- released_at: nil,
513
- scheduled: nil,
514
- starting_after: nil
515
- ); end
516
- end
517
- class CreateParams < Stripe::RequestParams
518
- class BillingMode < Stripe::RequestParams
519
- # Controls the calculation and orchestration of prorations and invoices for subscriptions.
520
- sig { returns(String) }
521
- attr_accessor :type
522
- sig { params(type: String).void }
523
- def initialize(type: nil); end
524
- end
525
- class DefaultSettings < Stripe::RequestParams
526
- class AutomaticTax < Stripe::RequestParams
527
- class Liability < Stripe::RequestParams
528
- # The connected account being referenced when `type` is `account`.
529
- sig { returns(T.nilable(String)) }
530
- attr_accessor :account
531
- # Type of the account referenced in the request.
532
- sig { returns(String) }
533
- attr_accessor :type
534
- sig { params(account: T.nilable(String), type: String).void }
535
- def initialize(account: nil, type: nil); end
536
- end
537
- # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
538
- sig { returns(T::Boolean) }
539
- attr_accessor :enabled
540
- # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
541
- sig {
542
- returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::AutomaticTax::Liability))
543
- }
544
- attr_accessor :liability
545
- sig {
546
- params(enabled: T::Boolean, liability: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::AutomaticTax::Liability)).void
547
- }
548
- def initialize(enabled: nil, liability: nil); end
549
- end
550
- class BillingThresholds < Stripe::RequestParams
551
- # Monetary threshold that triggers the subscription to advance to a new billing period
552
- sig { returns(T.nilable(Integer)) }
553
- attr_accessor :amount_gte
554
- # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
555
- sig { returns(T.nilable(T::Boolean)) }
556
- attr_accessor :reset_billing_cycle_anchor
557
- sig {
558
- params(amount_gte: T.nilable(Integer), reset_billing_cycle_anchor: T.nilable(T::Boolean)).void
559
- }
560
- def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
561
- end
562
- class InvoiceSettings < Stripe::RequestParams
563
- class Issuer < Stripe::RequestParams
564
- # The connected account being referenced when `type` is `account`.
565
- sig { returns(T.nilable(String)) }
566
- attr_accessor :account
567
- # Type of the account referenced in the request.
568
- sig { returns(String) }
569
- attr_accessor :type
570
- sig { params(account: T.nilable(String), type: String).void }
571
- def initialize(account: nil, type: nil); end
572
- end
573
- # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule.
574
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
575
- attr_accessor :account_tax_ids
576
- # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`.
577
- sig { returns(T.nilable(Integer)) }
578
- attr_accessor :days_until_due
579
- # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
580
- sig {
581
- returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::InvoiceSettings::Issuer))
582
- }
583
- attr_accessor :issuer
584
- sig {
585
- params(account_tax_ids: T.nilable(T.any(String, T::Array[String])), days_until_due: T.nilable(Integer), issuer: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::InvoiceSettings::Issuer)).void
586
- }
587
- def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
588
- end
589
- class TransferData < Stripe::RequestParams
590
- # 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 destination account. By default, the entire amount is transferred to the destination.
591
- sig { returns(T.nilable(Float)) }
592
- attr_accessor :amount_percent
593
- # ID of an existing, connected Stripe account.
594
- sig { returns(String) }
595
- attr_accessor :destination
596
- sig { params(amount_percent: T.nilable(Float), destination: String).void }
597
- def initialize(amount_percent: nil, destination: nil); end
598
- end
599
- # 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).
600
- sig { returns(T.nilable(Float)) }
601
- attr_accessor :application_fee_percent
602
- # Default settings for automatic tax computation.
603
- sig {
604
- returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::AutomaticTax))
605
- }
606
- attr_accessor :automatic_tax
607
- # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
608
- sig { returns(T.nilable(String)) }
609
- attr_accessor :billing_cycle_anchor
610
- # 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.
611
- sig {
612
- returns(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::BillingThresholds)))
613
- }
614
- attr_accessor :billing_thresholds
615
- # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
616
- sig { returns(T.nilable(String)) }
617
- attr_accessor :collection_method
618
- # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
619
- sig { returns(T.nilable(String)) }
620
- attr_accessor :default_payment_method
621
- # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
622
- sig { returns(T.nilable(String)) }
623
- attr_accessor :description
624
- # All invoices will be billed using the specified settings.
625
- sig {
626
- returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::InvoiceSettings))
627
- }
628
- attr_accessor :invoice_settings
629
- # The account on behalf of which to charge, for each of the associated subscription's invoices.
630
- sig { returns(T.nilable(String)) }
631
- attr_accessor :on_behalf_of
632
- # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
633
- sig {
634
- returns(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::TransferData)))
635
- }
636
- attr_accessor :transfer_data
637
- sig {
638
- params(application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::AutomaticTax), billing_cycle_anchor: T.nilable(String), billing_thresholds: T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::BillingThresholds)), collection_method: T.nilable(String), default_payment_method: T.nilable(String), description: T.nilable(String), invoice_settings: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::InvoiceSettings), on_behalf_of: T.nilable(String), transfer_data: T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::TransferData))).void
639
- }
640
- def initialize(
641
- application_fee_percent: nil,
642
- automatic_tax: nil,
643
- billing_cycle_anchor: nil,
644
- billing_thresholds: nil,
645
- collection_method: nil,
646
- default_payment_method: nil,
647
- description: nil,
648
- invoice_settings: nil,
649
- on_behalf_of: nil,
650
- transfer_data: nil
651
- ); end
652
- end
653
- class Phase < Stripe::RequestParams
654
- class AddInvoiceItem < Stripe::RequestParams
655
- class Discount < Stripe::RequestParams
656
- # ID of the coupon to create a new discount for.
657
- sig { returns(T.nilable(String)) }
658
- attr_accessor :coupon
659
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
660
- sig { returns(T.nilable(String)) }
661
- attr_accessor :discount
662
- # ID of the promotion code to create a new discount for.
663
- sig { returns(T.nilable(String)) }
664
- attr_accessor :promotion_code
665
- sig {
666
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
667
- }
668
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
669
- end
670
- class Period < Stripe::RequestParams
671
- class End < Stripe::RequestParams
672
- # A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
673
- sig { returns(T.nilable(Integer)) }
674
- attr_accessor :timestamp
675
- # Select how to calculate the end of the invoice item period.
676
- sig { returns(String) }
677
- attr_accessor :type
678
- sig { params(timestamp: T.nilable(Integer), type: String).void }
679
- def initialize(timestamp: nil, type: nil); end
680
- end
681
- class Start < Stripe::RequestParams
682
- # A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
683
- sig { returns(T.nilable(Integer)) }
684
- attr_accessor :timestamp
685
- # Select how to calculate the start of the invoice item period.
686
- sig { returns(String) }
687
- attr_accessor :type
688
- sig { params(timestamp: T.nilable(Integer), type: String).void }
689
- def initialize(timestamp: nil, type: nil); end
690
- end
691
- # End of the invoice item period.
692
- sig {
693
- returns(::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem::Period::End)
694
- }
695
- attr_accessor :end
696
- # Start of the invoice item period.
697
- sig {
698
- returns(::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem::Period::Start)
699
- }
700
- attr_accessor :start
701
- sig {
702
- params(end_: ::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem::Period::End, start: ::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem::Period::Start).void
703
- }
704
- def initialize(end_: nil, start: nil); end
705
- end
706
- class PriceData < Stripe::RequestParams
707
- # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
708
- sig { returns(String) }
709
- attr_accessor :currency
710
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
711
- sig { returns(String) }
712
- attr_accessor :product
713
- # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
714
- sig { returns(T.nilable(String)) }
715
- attr_accessor :tax_behavior
716
- # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
717
- sig { returns(T.nilable(Integer)) }
718
- attr_accessor :unit_amount
719
- # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
720
- sig { returns(T.nilable(String)) }
721
- attr_accessor :unit_amount_decimal
722
- sig {
723
- params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
724
- }
725
- def initialize(
726
- currency: nil,
727
- product: nil,
728
- tax_behavior: nil,
729
- unit_amount: nil,
730
- unit_amount_decimal: nil
731
- ); end
732
- end
733
- # The coupons to redeem into discounts for the item.
734
- sig {
735
- returns(T.nilable(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem::Discount]))
736
- }
737
- attr_accessor :discounts
738
- # 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`.
739
- sig { returns(T.nilable(T::Hash[String, String])) }
740
- attr_accessor :metadata
741
- # The period associated with this invoice item. Defaults to the period of the underlying subscription that surrounds the start of the phase.
742
- sig {
743
- returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem::Period))
744
- }
745
- attr_accessor :period
746
- # The ID of the price object. One of `price` or `price_data` is required.
747
- sig { returns(T.nilable(String)) }
748
- attr_accessor :price
749
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
750
- sig {
751
- returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem::PriceData))
752
- }
753
- attr_accessor :price_data
754
- # Quantity for this item. Defaults to 1.
755
- sig { returns(T.nilable(Integer)) }
756
- attr_accessor :quantity
757
- # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
758
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
759
- attr_accessor :tax_rates
760
- sig {
761
- params(discounts: T.nilable(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem::Discount]), metadata: T.nilable(T::Hash[String, String]), period: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem::Period), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.any(String, T::Array[String]))).void
762
- }
763
- def initialize(
764
- discounts: nil,
765
- metadata: nil,
766
- period: nil,
767
- price: nil,
768
- price_data: nil,
769
- quantity: nil,
770
- tax_rates: nil
771
- ); end
772
- end
773
- class AutomaticTax < Stripe::RequestParams
774
- class Liability < Stripe::RequestParams
775
- # The connected account being referenced when `type` is `account`.
776
- sig { returns(T.nilable(String)) }
777
- attr_accessor :account
778
- # Type of the account referenced in the request.
779
- sig { returns(String) }
780
- attr_accessor :type
781
- sig { params(account: T.nilable(String), type: String).void }
782
- def initialize(account: nil, type: nil); end
783
- end
784
- # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
785
- sig { returns(T::Boolean) }
786
- attr_accessor :enabled
787
- # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
788
- sig {
789
- returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::AutomaticTax::Liability))
790
- }
791
- attr_accessor :liability
792
- sig {
793
- params(enabled: T::Boolean, liability: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::AutomaticTax::Liability)).void
794
- }
795
- def initialize(enabled: nil, liability: nil); end
796
- end
797
- class BillingThresholds < Stripe::RequestParams
798
- # Monetary threshold that triggers the subscription to advance to a new billing period
799
- sig { returns(T.nilable(Integer)) }
800
- attr_accessor :amount_gte
801
- # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
802
- sig { returns(T.nilable(T::Boolean)) }
803
- attr_accessor :reset_billing_cycle_anchor
804
- sig {
805
- params(amount_gte: T.nilable(Integer), reset_billing_cycle_anchor: T.nilable(T::Boolean)).void
806
- }
807
- def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
808
- end
809
- class Discount < Stripe::RequestParams
810
- # ID of the coupon to create a new discount for.
811
- sig { returns(T.nilable(String)) }
812
- attr_accessor :coupon
813
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
814
- sig { returns(T.nilable(String)) }
815
- attr_accessor :discount
816
- # ID of the promotion code to create a new discount for.
817
- sig { returns(T.nilable(String)) }
818
- attr_accessor :promotion_code
819
- sig {
820
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
821
- }
822
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
823
- end
824
- class Duration < Stripe::RequestParams
825
- # Specifies phase duration. Either `day`, `week`, `month` or `year`.
826
- sig { returns(String) }
827
- attr_accessor :interval
828
- # The multiplier applied to the interval.
829
- sig { returns(T.nilable(Integer)) }
830
- attr_accessor :interval_count
831
- sig { params(interval: String, interval_count: T.nilable(Integer)).void }
832
- def initialize(interval: nil, interval_count: nil); end
833
- end
834
- class InvoiceSettings < Stripe::RequestParams
835
- class Issuer < Stripe::RequestParams
836
- # The connected account being referenced when `type` is `account`.
837
- sig { returns(T.nilable(String)) }
838
- attr_accessor :account
839
- # Type of the account referenced in the request.
840
- sig { returns(String) }
841
- attr_accessor :type
842
- sig { params(account: T.nilable(String), type: String).void }
843
- def initialize(account: nil, type: nil); end
844
- end
845
- # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
846
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
847
- attr_accessor :account_tax_ids
848
- # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
849
- sig { returns(T.nilable(Integer)) }
850
- attr_accessor :days_until_due
851
- # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
852
- sig {
853
- returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::InvoiceSettings::Issuer))
854
- }
855
- attr_accessor :issuer
856
- sig {
857
- params(account_tax_ids: T.nilable(T.any(String, T::Array[String])), days_until_due: T.nilable(Integer), issuer: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::InvoiceSettings::Issuer)).void
858
- }
859
- def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
860
- end
861
- class Item < Stripe::RequestParams
862
- class BillingThresholds < Stripe::RequestParams
863
- # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
864
- sig { returns(Integer) }
865
- attr_accessor :usage_gte
866
- sig { params(usage_gte: Integer).void }
867
- def initialize(usage_gte: nil); end
868
- end
869
- class Discount < Stripe::RequestParams
870
- # ID of the coupon to create a new discount for.
871
- sig { returns(T.nilable(String)) }
872
- attr_accessor :coupon
873
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
874
- sig { returns(T.nilable(String)) }
875
- attr_accessor :discount
876
- # ID of the promotion code to create a new discount for.
877
- sig { returns(T.nilable(String)) }
878
- attr_accessor :promotion_code
879
- sig {
880
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
881
- }
882
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
883
- end
884
- class PriceData < Stripe::RequestParams
885
- class Recurring < Stripe::RequestParams
886
- # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
887
- sig { returns(String) }
888
- attr_accessor :interval
889
- # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
890
- sig { returns(T.nilable(Integer)) }
891
- attr_accessor :interval_count
892
- sig { params(interval: String, interval_count: T.nilable(Integer)).void }
893
- def initialize(interval: nil, interval_count: nil); end
894
- end
895
- # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
896
- sig { returns(String) }
897
- attr_accessor :currency
898
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
899
- sig { returns(String) }
900
- attr_accessor :product
901
- # The recurring components of a price such as `interval` and `interval_count`.
902
- sig {
903
- returns(::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::PriceData::Recurring)
904
- }
905
- attr_accessor :recurring
906
- # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
907
- sig { returns(T.nilable(String)) }
908
- attr_accessor :tax_behavior
909
- # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
910
- sig { returns(T.nilable(Integer)) }
911
- attr_accessor :unit_amount
912
- # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
913
- sig { returns(T.nilable(String)) }
914
- attr_accessor :unit_amount_decimal
915
- sig {
916
- params(currency: String, product: String, recurring: ::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
917
- }
918
- def initialize(
919
- currency: nil,
920
- product: nil,
921
- recurring: nil,
922
- tax_behavior: nil,
923
- unit_amount: nil,
924
- unit_amount_decimal: nil
925
- ); end
926
- end
927
- # 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.
928
- sig {
929
- returns(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::BillingThresholds)))
930
- }
931
- attr_accessor :billing_thresholds
932
- # The coupons to redeem into discounts for the subscription item.
933
- sig {
934
- returns(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::Discount])))
935
- }
936
- attr_accessor :discounts
937
- # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
938
- sig { returns(T.nilable(T::Hash[String, String])) }
939
- attr_accessor :metadata
940
- # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
941
- sig { returns(T.nilable(String)) }
942
- attr_accessor :plan
943
- # The ID of the price object.
944
- sig { returns(T.nilable(String)) }
945
- attr_accessor :price
946
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
947
- sig {
948
- returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::PriceData))
949
- }
950
- attr_accessor :price_data
951
- # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
952
- sig { returns(T.nilable(Integer)) }
953
- attr_accessor :quantity
954
- # 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.
955
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
956
- attr_accessor :tax_rates
957
- sig {
958
- params(billing_thresholds: T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::BillingThresholds)), discounts: T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::Discount])), metadata: T.nilable(T::Hash[String, String]), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.any(String, T::Array[String]))).void
959
- }
960
- def initialize(
961
- billing_thresholds: nil,
962
- discounts: nil,
963
- metadata: nil,
964
- plan: nil,
965
- price: nil,
966
- price_data: nil,
967
- quantity: nil,
968
- tax_rates: nil
969
- ); end
970
- end
971
- class TransferData < Stripe::RequestParams
972
- # 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 destination account. By default, the entire amount is transferred to the destination.
973
- sig { returns(T.nilable(Float)) }
974
- attr_accessor :amount_percent
975
- # ID of an existing, connected Stripe account.
976
- sig { returns(String) }
977
- attr_accessor :destination
978
- sig { params(amount_percent: T.nilable(Float), destination: String).void }
979
- def initialize(amount_percent: nil, destination: nil); end
980
- end
981
- # 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.
982
- sig {
983
- returns(T.nilable(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem]))
984
- }
985
- attr_accessor :add_invoice_items
986
- # 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).
987
- sig { returns(T.nilable(Float)) }
988
- attr_accessor :application_fee_percent
989
- # Automatic tax settings for this phase.
990
- sig {
991
- returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::AutomaticTax))
992
- }
993
- attr_accessor :automatic_tax
994
- # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
995
- sig { returns(T.nilable(String)) }
996
- attr_accessor :billing_cycle_anchor
997
- # 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.
998
- sig {
999
- returns(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::Phase::BillingThresholds)))
1000
- }
1001
- attr_accessor :billing_thresholds
1002
- # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
1003
- sig { returns(T.nilable(String)) }
1004
- attr_accessor :collection_method
1005
- # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
1006
- sig { returns(T.nilable(String)) }
1007
- attr_accessor :currency
1008
- # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
1009
- sig { returns(T.nilable(String)) }
1010
- attr_accessor :default_payment_method
1011
- # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase.
1012
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
1013
- attr_accessor :default_tax_rates
1014
- # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
1015
- sig { returns(T.nilable(String)) }
1016
- attr_accessor :description
1017
- # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
1018
- sig {
1019
- returns(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Discount])))
1020
- }
1021
- attr_accessor :discounts
1022
- # The number of intervals the phase should last. If set, `end_date` must not be set.
1023
- sig { returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::Duration)) }
1024
- attr_accessor :duration
1025
- # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
1026
- sig { returns(T.nilable(Integer)) }
1027
- attr_accessor :end_date
1028
- # All invoices will be billed using the specified settings.
1029
- sig {
1030
- returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::InvoiceSettings))
1031
- }
1032
- attr_accessor :invoice_settings
1033
- # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
1034
- sig { returns(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Item]) }
1035
- attr_accessor :items
1036
- # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. This parameter is deprecated and will be removed in a future version. Use `duration` instead.
1037
- sig { returns(T.nilable(Integer)) }
1038
- attr_accessor :iterations
1039
- # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
1040
- sig { returns(T.nilable(T::Hash[String, String])) }
1041
- attr_accessor :metadata
1042
- # The account on behalf of which to charge, for each of the associated subscription's invoices.
1043
- sig { returns(T.nilable(String)) }
1044
- attr_accessor :on_behalf_of
1045
- # 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.
1046
- sig { returns(T.nilable(String)) }
1047
- attr_accessor :proration_behavior
1048
- # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
1049
- sig {
1050
- returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::TransferData))
1051
- }
1052
- attr_accessor :transfer_data
1053
- # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
1054
- sig { returns(T.nilable(T::Boolean)) }
1055
- attr_accessor :trial
1056
- # 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`
1057
- sig { returns(T.nilable(Integer)) }
1058
- attr_accessor :trial_end
1059
- sig {
1060
- params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem]), application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::AutomaticTax), billing_cycle_anchor: T.nilable(String), billing_thresholds: T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::Phase::BillingThresholds)), collection_method: T.nilable(String), currency: T.nilable(String), default_payment_method: T.nilable(String), default_tax_rates: T.nilable(T.any(String, T::Array[String])), description: T.nilable(String), discounts: T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Discount])), duration: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::Duration), end_date: T.nilable(Integer), invoice_settings: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::InvoiceSettings), items: T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Item], iterations: T.nilable(Integer), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::TransferData), trial: T.nilable(T::Boolean), trial_end: T.nilable(Integer)).void
1061
- }
1062
- def initialize(
1063
- add_invoice_items: nil,
1064
- application_fee_percent: nil,
1065
- automatic_tax: nil,
1066
- billing_cycle_anchor: nil,
1067
- billing_thresholds: nil,
1068
- collection_method: nil,
1069
- currency: nil,
1070
- default_payment_method: nil,
1071
- default_tax_rates: nil,
1072
- description: nil,
1073
- discounts: nil,
1074
- duration: nil,
1075
- end_date: nil,
1076
- invoice_settings: nil,
1077
- items: nil,
1078
- iterations: nil,
1079
- metadata: nil,
1080
- on_behalf_of: nil,
1081
- proration_behavior: nil,
1082
- transfer_data: nil,
1083
- trial: nil,
1084
- trial_end: nil
1085
- ); end
1086
- end
1087
- # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
1088
- sig { returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::BillingMode)) }
1089
- attr_accessor :billing_mode
1090
- # The identifier of the customer to create the subscription schedule for.
1091
- sig { returns(T.nilable(String)) }
1092
- attr_accessor :customer
1093
- # Object representing the subscription schedule's default settings.
1094
- sig { returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings)) }
1095
- attr_accessor :default_settings
1096
- # 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.
1097
- sig { returns(T.nilable(String)) }
1098
- attr_accessor :end_behavior
1099
- # Specifies which fields in the response should be expanded.
1100
- sig { returns(T.nilable(T::Array[String])) }
1101
- attr_accessor :expand
1102
- # Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls.
1103
- sig { returns(T.nilable(String)) }
1104
- attr_accessor :from_subscription
1105
- # 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`.
1106
- sig { returns(T.nilable(T.any(String, T::Hash[String, String]))) }
1107
- attr_accessor :metadata
1108
- # 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.
1109
- sig { returns(T.nilable(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase])) }
1110
- attr_accessor :phases
1111
- # When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on.
1112
- sig { returns(T.nilable(T.any(Integer, String))) }
1113
- attr_accessor :start_date
1114
- sig {
1115
- params(billing_mode: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::BillingMode), customer: T.nilable(String), default_settings: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings), end_behavior: T.nilable(String), expand: T.nilable(T::Array[String]), from_subscription: T.nilable(String), metadata: T.nilable(T.any(String, T::Hash[String, String])), phases: T.nilable(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase]), start_date: T.nilable(T.any(Integer, String))).void
1116
- }
1117
- def initialize(
1118
- billing_mode: nil,
1119
- customer: nil,
1120
- default_settings: nil,
1121
- end_behavior: nil,
1122
- expand: nil,
1123
- from_subscription: nil,
1124
- metadata: nil,
1125
- phases: nil,
1126
- start_date: nil
1127
- ); end
1128
- end
1129
- class UpdateParams < Stripe::RequestParams
1130
- class DefaultSettings < Stripe::RequestParams
1131
- class AutomaticTax < Stripe::RequestParams
1132
- class Liability < Stripe::RequestParams
1133
- # The connected account being referenced when `type` is `account`.
1134
- sig { returns(T.nilable(String)) }
1135
- attr_accessor :account
1136
- # Type of the account referenced in the request.
1137
- sig { returns(String) }
1138
- attr_accessor :type
1139
- sig { params(account: T.nilable(String), type: String).void }
1140
- def initialize(account: nil, type: nil); end
1141
- end
1142
- # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
1143
- sig { returns(T::Boolean) }
1144
- attr_accessor :enabled
1145
- # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
1146
- sig {
1147
- returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::AutomaticTax::Liability))
1148
- }
1149
- attr_accessor :liability
1150
- sig {
1151
- params(enabled: T::Boolean, liability: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::AutomaticTax::Liability)).void
1152
- }
1153
- def initialize(enabled: nil, liability: nil); end
1154
- end
1155
- class BillingThresholds < Stripe::RequestParams
1156
- # Monetary threshold that triggers the subscription to advance to a new billing period
1157
- sig { returns(T.nilable(Integer)) }
1158
- attr_accessor :amount_gte
1159
- # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
1160
- sig { returns(T.nilable(T::Boolean)) }
1161
- attr_accessor :reset_billing_cycle_anchor
1162
- sig {
1163
- params(amount_gte: T.nilable(Integer), reset_billing_cycle_anchor: T.nilable(T::Boolean)).void
1164
- }
1165
- def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
1166
- end
1167
- class InvoiceSettings < Stripe::RequestParams
1168
- class Issuer < Stripe::RequestParams
1169
- # The connected account being referenced when `type` is `account`.
1170
- sig { returns(T.nilable(String)) }
1171
- attr_accessor :account
1172
- # Type of the account referenced in the request.
1173
- sig { returns(String) }
1174
- attr_accessor :type
1175
- sig { params(account: T.nilable(String), type: String).void }
1176
- def initialize(account: nil, type: nil); end
1177
- end
1178
- # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule.
1179
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
1180
- attr_accessor :account_tax_ids
1181
- # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`.
1182
- sig { returns(T.nilable(Integer)) }
1183
- attr_accessor :days_until_due
1184
- # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
1185
- sig {
1186
- returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::InvoiceSettings::Issuer))
1187
- }
1188
- attr_accessor :issuer
1189
- sig {
1190
- params(account_tax_ids: T.nilable(T.any(String, T::Array[String])), days_until_due: T.nilable(Integer), issuer: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::InvoiceSettings::Issuer)).void
1191
- }
1192
- def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
1193
- end
1194
- class TransferData < Stripe::RequestParams
1195
- # 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 destination account. By default, the entire amount is transferred to the destination.
1196
- sig { returns(T.nilable(Float)) }
1197
- attr_accessor :amount_percent
1198
- # ID of an existing, connected Stripe account.
1199
- sig { returns(String) }
1200
- attr_accessor :destination
1201
- sig { params(amount_percent: T.nilable(Float), destination: String).void }
1202
- def initialize(amount_percent: nil, destination: nil); end
1203
- end
1204
- # 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).
1205
- sig { returns(T.nilable(Float)) }
1206
- attr_accessor :application_fee_percent
1207
- # Default settings for automatic tax computation.
1208
- sig {
1209
- returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::AutomaticTax))
1210
- }
1211
- attr_accessor :automatic_tax
1212
- # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
1213
- sig { returns(T.nilable(String)) }
1214
- attr_accessor :billing_cycle_anchor
1215
- # 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.
1216
- sig {
1217
- returns(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::BillingThresholds)))
1218
- }
1219
- attr_accessor :billing_thresholds
1220
- # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
1221
- sig { returns(T.nilable(String)) }
1222
- attr_accessor :collection_method
1223
- # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
1224
- sig { returns(T.nilable(String)) }
1225
- attr_accessor :default_payment_method
1226
- # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
1227
- sig { returns(T.nilable(String)) }
1228
- attr_accessor :description
1229
- # All invoices will be billed using the specified settings.
1230
- sig {
1231
- returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::InvoiceSettings))
1232
- }
1233
- attr_accessor :invoice_settings
1234
- # The account on behalf of which to charge, for each of the associated subscription's invoices.
1235
- sig { returns(T.nilable(String)) }
1236
- attr_accessor :on_behalf_of
1237
- # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
1238
- sig {
1239
- returns(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::TransferData)))
1240
- }
1241
- attr_accessor :transfer_data
1242
- sig {
1243
- params(application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::AutomaticTax), billing_cycle_anchor: T.nilable(String), billing_thresholds: T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::BillingThresholds)), collection_method: T.nilable(String), default_payment_method: T.nilable(String), description: T.nilable(String), invoice_settings: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::InvoiceSettings), on_behalf_of: T.nilable(String), transfer_data: T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::TransferData))).void
1244
- }
1245
- def initialize(
1246
- application_fee_percent: nil,
1247
- automatic_tax: nil,
1248
- billing_cycle_anchor: nil,
1249
- billing_thresholds: nil,
1250
- collection_method: nil,
1251
- default_payment_method: nil,
1252
- description: nil,
1253
- invoice_settings: nil,
1254
- on_behalf_of: nil,
1255
- transfer_data: nil
1256
- ); end
1257
- end
1258
- class Phase < Stripe::RequestParams
1259
- class AddInvoiceItem < Stripe::RequestParams
1260
- class Discount < Stripe::RequestParams
1261
- # ID of the coupon to create a new discount for.
1262
- sig { returns(T.nilable(String)) }
1263
- attr_accessor :coupon
1264
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1265
- sig { returns(T.nilable(String)) }
1266
- attr_accessor :discount
1267
- # ID of the promotion code to create a new discount for.
1268
- sig { returns(T.nilable(String)) }
1269
- attr_accessor :promotion_code
1270
- sig {
1271
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
1272
- }
1273
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
1274
- end
1275
- class Period < Stripe::RequestParams
1276
- class End < Stripe::RequestParams
1277
- # A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
1278
- sig { returns(T.nilable(Integer)) }
1279
- attr_accessor :timestamp
1280
- # Select how to calculate the end of the invoice item period.
1281
- sig { returns(String) }
1282
- attr_accessor :type
1283
- sig { params(timestamp: T.nilable(Integer), type: String).void }
1284
- def initialize(timestamp: nil, type: nil); end
1285
- end
1286
- class Start < Stripe::RequestParams
1287
- # A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
1288
- sig { returns(T.nilable(Integer)) }
1289
- attr_accessor :timestamp
1290
- # Select how to calculate the start of the invoice item period.
1291
- sig { returns(String) }
1292
- attr_accessor :type
1293
- sig { params(timestamp: T.nilable(Integer), type: String).void }
1294
- def initialize(timestamp: nil, type: nil); end
1295
- end
1296
- # End of the invoice item period.
1297
- sig {
1298
- returns(::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem::Period::End)
1299
- }
1300
- attr_accessor :end
1301
- # Start of the invoice item period.
1302
- sig {
1303
- returns(::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem::Period::Start)
1304
- }
1305
- attr_accessor :start
1306
- sig {
1307
- params(end_: ::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem::Period::End, start: ::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem::Period::Start).void
1308
- }
1309
- def initialize(end_: nil, start: nil); end
1310
- end
1311
- class PriceData < Stripe::RequestParams
1312
- # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
1313
- sig { returns(String) }
1314
- attr_accessor :currency
1315
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
1316
- sig { returns(String) }
1317
- attr_accessor :product
1318
- # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
1319
- sig { returns(T.nilable(String)) }
1320
- attr_accessor :tax_behavior
1321
- # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
1322
- sig { returns(T.nilable(Integer)) }
1323
- attr_accessor :unit_amount
1324
- # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
1325
- sig { returns(T.nilable(String)) }
1326
- attr_accessor :unit_amount_decimal
1327
- sig {
1328
- params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
1329
- }
1330
- def initialize(
1331
- currency: nil,
1332
- product: nil,
1333
- tax_behavior: nil,
1334
- unit_amount: nil,
1335
- unit_amount_decimal: nil
1336
- ); end
1337
- end
1338
- # The coupons to redeem into discounts for the item.
1339
- sig {
1340
- returns(T.nilable(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem::Discount]))
1341
- }
1342
- attr_accessor :discounts
1343
- # 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`.
1344
- sig { returns(T.nilable(T::Hash[String, String])) }
1345
- attr_accessor :metadata
1346
- # The period associated with this invoice item. Defaults to the period of the underlying subscription that surrounds the start of the phase.
1347
- sig {
1348
- returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem::Period))
1349
- }
1350
- attr_accessor :period
1351
- # The ID of the price object. One of `price` or `price_data` is required.
1352
- sig { returns(T.nilable(String)) }
1353
- attr_accessor :price
1354
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
1355
- sig {
1356
- returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem::PriceData))
1357
- }
1358
- attr_accessor :price_data
1359
- # Quantity for this item. Defaults to 1.
1360
- sig { returns(T.nilable(Integer)) }
1361
- attr_accessor :quantity
1362
- # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
1363
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
1364
- attr_accessor :tax_rates
1365
- sig {
1366
- params(discounts: T.nilable(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem::Discount]), metadata: T.nilable(T::Hash[String, String]), period: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem::Period), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.any(String, T::Array[String]))).void
1367
- }
1368
- def initialize(
1369
- discounts: nil,
1370
- metadata: nil,
1371
- period: nil,
1372
- price: nil,
1373
- price_data: nil,
1374
- quantity: nil,
1375
- tax_rates: nil
1376
- ); end
1377
- end
1378
- class AutomaticTax < Stripe::RequestParams
1379
- class Liability < Stripe::RequestParams
1380
- # The connected account being referenced when `type` is `account`.
1381
- sig { returns(T.nilable(String)) }
1382
- attr_accessor :account
1383
- # Type of the account referenced in the request.
1384
- sig { returns(String) }
1385
- attr_accessor :type
1386
- sig { params(account: T.nilable(String), type: String).void }
1387
- def initialize(account: nil, type: nil); end
1388
- end
1389
- # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
1390
- sig { returns(T::Boolean) }
1391
- attr_accessor :enabled
1392
- # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
1393
- sig {
1394
- returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::AutomaticTax::Liability))
1395
- }
1396
- attr_accessor :liability
1397
- sig {
1398
- params(enabled: T::Boolean, liability: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::AutomaticTax::Liability)).void
1399
- }
1400
- def initialize(enabled: nil, liability: nil); end
1401
- end
1402
- class BillingThresholds < Stripe::RequestParams
1403
- # Monetary threshold that triggers the subscription to advance to a new billing period
1404
- sig { returns(T.nilable(Integer)) }
1405
- attr_accessor :amount_gte
1406
- # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
1407
- sig { returns(T.nilable(T::Boolean)) }
1408
- attr_accessor :reset_billing_cycle_anchor
1409
- sig {
1410
- params(amount_gte: T.nilable(Integer), reset_billing_cycle_anchor: T.nilable(T::Boolean)).void
1411
- }
1412
- def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
1413
- end
1414
- class Discount < Stripe::RequestParams
1415
- # ID of the coupon to create a new discount for.
1416
- sig { returns(T.nilable(String)) }
1417
- attr_accessor :coupon
1418
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1419
- sig { returns(T.nilable(String)) }
1420
- attr_accessor :discount
1421
- # ID of the promotion code to create a new discount for.
1422
- sig { returns(T.nilable(String)) }
1423
- attr_accessor :promotion_code
1424
- sig {
1425
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
1426
- }
1427
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
1428
- end
1429
- class Duration < Stripe::RequestParams
1430
- # Specifies phase duration. Either `day`, `week`, `month` or `year`.
1431
- sig { returns(String) }
1432
- attr_accessor :interval
1433
- # The multiplier applied to the interval.
1434
- sig { returns(T.nilable(Integer)) }
1435
- attr_accessor :interval_count
1436
- sig { params(interval: String, interval_count: T.nilable(Integer)).void }
1437
- def initialize(interval: nil, interval_count: nil); end
1438
- end
1439
- class InvoiceSettings < Stripe::RequestParams
1440
- class Issuer < Stripe::RequestParams
1441
- # The connected account being referenced when `type` is `account`.
1442
- sig { returns(T.nilable(String)) }
1443
- attr_accessor :account
1444
- # Type of the account referenced in the request.
1445
- sig { returns(String) }
1446
- attr_accessor :type
1447
- sig { params(account: T.nilable(String), type: String).void }
1448
- def initialize(account: nil, type: nil); end
1449
- end
1450
- # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
1451
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
1452
- attr_accessor :account_tax_ids
1453
- # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
1454
- sig { returns(T.nilable(Integer)) }
1455
- attr_accessor :days_until_due
1456
- # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
1457
- sig {
1458
- returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::InvoiceSettings::Issuer))
1459
- }
1460
- attr_accessor :issuer
1461
- sig {
1462
- params(account_tax_ids: T.nilable(T.any(String, T::Array[String])), days_until_due: T.nilable(Integer), issuer: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::InvoiceSettings::Issuer)).void
1463
- }
1464
- def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
1465
- end
1466
- class Item < Stripe::RequestParams
1467
- class BillingThresholds < Stripe::RequestParams
1468
- # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
1469
- sig { returns(Integer) }
1470
- attr_accessor :usage_gte
1471
- sig { params(usage_gte: Integer).void }
1472
- def initialize(usage_gte: nil); end
1473
- end
1474
- class Discount < Stripe::RequestParams
1475
- # ID of the coupon to create a new discount for.
1476
- sig { returns(T.nilable(String)) }
1477
- attr_accessor :coupon
1478
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1479
- sig { returns(T.nilable(String)) }
1480
- attr_accessor :discount
1481
- # ID of the promotion code to create a new discount for.
1482
- sig { returns(T.nilable(String)) }
1483
- attr_accessor :promotion_code
1484
- sig {
1485
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
1486
- }
1487
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
1488
- end
1489
- class PriceData < Stripe::RequestParams
1490
- class Recurring < Stripe::RequestParams
1491
- # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
1492
- sig { returns(String) }
1493
- attr_accessor :interval
1494
- # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
1495
- sig { returns(T.nilable(Integer)) }
1496
- attr_accessor :interval_count
1497
- sig { params(interval: String, interval_count: T.nilable(Integer)).void }
1498
- def initialize(interval: nil, interval_count: nil); end
1499
- end
1500
- # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
1501
- sig { returns(String) }
1502
- attr_accessor :currency
1503
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
1504
- sig { returns(String) }
1505
- attr_accessor :product
1506
- # The recurring components of a price such as `interval` and `interval_count`.
1507
- sig {
1508
- returns(::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::PriceData::Recurring)
1509
- }
1510
- attr_accessor :recurring
1511
- # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
1512
- sig { returns(T.nilable(String)) }
1513
- attr_accessor :tax_behavior
1514
- # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
1515
- sig { returns(T.nilable(Integer)) }
1516
- attr_accessor :unit_amount
1517
- # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
1518
- sig { returns(T.nilable(String)) }
1519
- attr_accessor :unit_amount_decimal
1520
- sig {
1521
- params(currency: String, product: String, recurring: ::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
1522
- }
1523
- def initialize(
1524
- currency: nil,
1525
- product: nil,
1526
- recurring: nil,
1527
- tax_behavior: nil,
1528
- unit_amount: nil,
1529
- unit_amount_decimal: nil
1530
- ); end
1531
- end
1532
- # 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.
1533
- sig {
1534
- returns(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::BillingThresholds)))
1535
- }
1536
- attr_accessor :billing_thresholds
1537
- # The coupons to redeem into discounts for the subscription item.
1538
- sig {
1539
- returns(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::Discount])))
1540
- }
1541
- attr_accessor :discounts
1542
- # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
1543
- sig { returns(T.nilable(T::Hash[String, String])) }
1544
- attr_accessor :metadata
1545
- # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
1546
- sig { returns(T.nilable(String)) }
1547
- attr_accessor :plan
1548
- # The ID of the price object.
1549
- sig { returns(T.nilable(String)) }
1550
- attr_accessor :price
1551
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
1552
- sig {
1553
- returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::PriceData))
1554
- }
1555
- attr_accessor :price_data
1556
- # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
1557
- sig { returns(T.nilable(Integer)) }
1558
- attr_accessor :quantity
1559
- # 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.
1560
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
1561
- attr_accessor :tax_rates
1562
- sig {
1563
- params(billing_thresholds: T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::BillingThresholds)), discounts: T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::Discount])), metadata: T.nilable(T::Hash[String, String]), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.any(String, T::Array[String]))).void
1564
- }
1565
- def initialize(
1566
- billing_thresholds: nil,
1567
- discounts: nil,
1568
- metadata: nil,
1569
- plan: nil,
1570
- price: nil,
1571
- price_data: nil,
1572
- quantity: nil,
1573
- tax_rates: nil
1574
- ); end
1575
- end
1576
- class TransferData < Stripe::RequestParams
1577
- # 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 destination account. By default, the entire amount is transferred to the destination.
1578
- sig { returns(T.nilable(Float)) }
1579
- attr_accessor :amount_percent
1580
- # ID of an existing, connected Stripe account.
1581
- sig { returns(String) }
1582
- attr_accessor :destination
1583
- sig { params(amount_percent: T.nilable(Float), destination: String).void }
1584
- def initialize(amount_percent: nil, destination: nil); end
1585
- end
1586
- # 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.
1587
- sig {
1588
- returns(T.nilable(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem]))
1589
- }
1590
- attr_accessor :add_invoice_items
1591
- # 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).
1592
- sig { returns(T.nilable(Float)) }
1593
- attr_accessor :application_fee_percent
1594
- # Automatic tax settings for this phase.
1595
- sig {
1596
- returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::AutomaticTax))
1597
- }
1598
- attr_accessor :automatic_tax
1599
- # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
1600
- sig { returns(T.nilable(String)) }
1601
- attr_accessor :billing_cycle_anchor
1602
- # 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.
1603
- sig {
1604
- returns(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::Phase::BillingThresholds)))
1605
- }
1606
- attr_accessor :billing_thresholds
1607
- # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
1608
- sig { returns(T.nilable(String)) }
1609
- attr_accessor :collection_method
1610
- # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
1611
- sig { returns(T.nilable(String)) }
1612
- attr_accessor :currency
1613
- # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
1614
- sig { returns(T.nilable(String)) }
1615
- attr_accessor :default_payment_method
1616
- # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase.
1617
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
1618
- attr_accessor :default_tax_rates
1619
- # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
1620
- sig { returns(T.nilable(String)) }
1621
- attr_accessor :description
1622
- # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
1623
- sig {
1624
- returns(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Discount])))
1625
- }
1626
- attr_accessor :discounts
1627
- # The number of intervals the phase should last. If set, `end_date` must not be set.
1628
- sig { returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::Duration)) }
1629
- attr_accessor :duration
1630
- # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
1631
- sig { returns(T.nilable(T.any(Integer, String))) }
1632
- attr_accessor :end_date
1633
- # All invoices will be billed using the specified settings.
1634
- sig {
1635
- returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::InvoiceSettings))
1636
- }
1637
- attr_accessor :invoice_settings
1638
- # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
1639
- sig { returns(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item]) }
1640
- attr_accessor :items
1641
- # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. This parameter is deprecated and will be removed in a future version. Use `duration` instead.
1642
- sig { returns(T.nilable(Integer)) }
1643
- attr_accessor :iterations
1644
- # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
1645
- sig { returns(T.nilable(T::Hash[String, String])) }
1646
- attr_accessor :metadata
1647
- # The account on behalf of which to charge, for each of the associated subscription's invoices.
1648
- sig { returns(T.nilable(String)) }
1649
- attr_accessor :on_behalf_of
1650
- # 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.
1651
- sig { returns(T.nilable(String)) }
1652
- attr_accessor :proration_behavior
1653
- # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
1654
- sig { returns(T.nilable(T.any(Integer, String))) }
1655
- attr_accessor :start_date
1656
- # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
1657
- sig {
1658
- returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::TransferData))
1659
- }
1660
- attr_accessor :transfer_data
1661
- # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
1662
- sig { returns(T.nilable(T::Boolean)) }
1663
- attr_accessor :trial
1664
- # 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`
1665
- sig { returns(T.nilable(T.any(Integer, String))) }
1666
- attr_accessor :trial_end
1667
- sig {
1668
- params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem]), application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::AutomaticTax), billing_cycle_anchor: T.nilable(String), billing_thresholds: T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::Phase::BillingThresholds)), collection_method: T.nilable(String), currency: T.nilable(String), default_payment_method: T.nilable(String), default_tax_rates: T.nilable(T.any(String, T::Array[String])), description: T.nilable(String), discounts: T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Discount])), duration: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::Duration), end_date: T.nilable(T.any(Integer, String)), invoice_settings: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::InvoiceSettings), items: T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item], iterations: T.nilable(Integer), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), start_date: T.nilable(T.any(Integer, String)), transfer_data: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::TransferData), trial: T.nilable(T::Boolean), trial_end: T.nilable(T.any(Integer, String))).void
1669
- }
1670
- def initialize(
1671
- add_invoice_items: nil,
1672
- application_fee_percent: nil,
1673
- automatic_tax: nil,
1674
- billing_cycle_anchor: nil,
1675
- billing_thresholds: nil,
1676
- collection_method: nil,
1677
- currency: nil,
1678
- default_payment_method: nil,
1679
- default_tax_rates: nil,
1680
- description: nil,
1681
- discounts: nil,
1682
- duration: nil,
1683
- end_date: nil,
1684
- invoice_settings: nil,
1685
- items: nil,
1686
- iterations: nil,
1687
- metadata: nil,
1688
- on_behalf_of: nil,
1689
- proration_behavior: nil,
1690
- start_date: nil,
1691
- transfer_data: nil,
1692
- trial: nil,
1693
- trial_end: nil
1694
- ); end
1695
- end
1696
- # Object representing the subscription schedule's default settings.
1697
- sig { returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings)) }
1698
- attr_accessor :default_settings
1699
- # 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.
1700
- sig { returns(T.nilable(String)) }
1701
- attr_accessor :end_behavior
1702
- # Specifies which fields in the response should be expanded.
1703
- sig { returns(T.nilable(T::Array[String])) }
1704
- attr_accessor :expand
1705
- # 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`.
1706
- sig { returns(T.nilable(T.any(String, T::Hash[String, String]))) }
1707
- attr_accessor :metadata
1708
- # 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. Note that past phases can be omitted.
1709
- sig { returns(T.nilable(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase])) }
1710
- attr_accessor :phases
1711
- # If the update changes the billing configuration (item price, quantity, etc.) of the current phase, indicates how prorations from this change should be handled. The default value is `create_prorations`.
1712
- sig { returns(T.nilable(String)) }
1713
- attr_accessor :proration_behavior
1714
- sig {
1715
- params(default_settings: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings), end_behavior: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.any(String, T::Hash[String, String])), phases: T.nilable(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase]), proration_behavior: T.nilable(String)).void
1716
- }
1717
- def initialize(
1718
- default_settings: nil,
1719
- end_behavior: nil,
1720
- expand: nil,
1721
- metadata: nil,
1722
- phases: nil,
1723
- proration_behavior: nil
1724
- ); end
1725
- end
1726
- class CancelParams < Stripe::RequestParams
1727
- # Specifies which fields in the response should be expanded.
1728
- sig { returns(T.nilable(T::Array[String])) }
1729
- attr_accessor :expand
1730
- # If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`.
1731
- sig { returns(T.nilable(T::Boolean)) }
1732
- attr_accessor :invoice_now
1733
- # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`.
1734
- sig { returns(T.nilable(T::Boolean)) }
1735
- attr_accessor :prorate
1736
- sig {
1737
- params(expand: T.nilable(T::Array[String]), invoice_now: T.nilable(T::Boolean), prorate: T.nilable(T::Boolean)).void
1738
- }
1739
- def initialize(expand: nil, invoice_now: nil, prorate: nil); end
1740
- end
1741
- class ReleaseParams < Stripe::RequestParams
1742
- # Specifies which fields in the response should be expanded.
1743
- sig { returns(T.nilable(T::Array[String])) }
1744
- attr_accessor :expand
1745
- # Keep any cancellation on the subscription that the schedule has set
1746
- sig { returns(T.nilable(T::Boolean)) }
1747
- attr_accessor :preserve_cancel_date
1748
- sig {
1749
- params(expand: T.nilable(T::Array[String]), preserve_cancel_date: T.nilable(T::Boolean)).void
1750
- }
1751
- def initialize(expand: nil, preserve_cancel_date: nil); end
1752
- end
1753
- # Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.
1754
- sig {
1755
- params(params: T.any(::Stripe::SubscriptionSchedule::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule)
1756
- }
1757
- def cancel(params = {}, opts = {}); end
1758
-
1759
- # Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.
1760
- sig {
1761
- params(schedule: String, params: T.any(::Stripe::SubscriptionSchedule::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule)
1762
- }
1763
- def self.cancel(schedule, params = {}, opts = {}); end
1764
-
1765
- # Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.
1766
- sig {
1767
- params(params: T.any(::Stripe::SubscriptionSchedule::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule)
1768
- }
1769
- def self.create(params = {}, opts = {}); end
1770
-
1771
- # Retrieves the list of your subscription schedules.
1772
- sig {
1773
- params(params: T.any(::Stripe::SubscriptionSchedule::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
1774
- }
1775
- def self.list(params = {}, opts = {}); end
1776
-
1777
- # Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription's ID to the released_subscription property.
1778
- sig {
1779
- params(params: T.any(::Stripe::SubscriptionSchedule::ReleaseParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule)
1780
- }
1781
- def release(params = {}, opts = {}); end
1782
-
1783
- # Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription's ID to the released_subscription property.
1784
- sig {
1785
- params(schedule: String, params: T.any(::Stripe::SubscriptionSchedule::ReleaseParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule)
1786
- }
1787
- def self.release(schedule, params = {}, opts = {}); end
1788
-
1789
- # Updates an existing subscription schedule.
1790
- sig {
1791
- params(schedule: String, params: T.any(::Stripe::SubscriptionSchedule::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule)
1792
- }
1793
- def self.update(schedule, params = {}, opts = {}); end
1794
- end
1795
- end