stripe 13.6.0.pre.beta.1 → 14.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (556) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +699 -1457
  3. data/OPENAPI_VERSION +1 -1
  4. data/README.md +29 -0
  5. data/VERSION +1 -1
  6. data/lib/stripe/api_requestor.rb +2 -0
  7. data/lib/stripe/api_version.rb +1 -1
  8. data/lib/stripe/errors.rb +0 -7
  9. data/lib/stripe/object_types.rb +0 -26
  10. data/lib/stripe/resources/account.rb +83 -614
  11. data/lib/stripe/resources/account_session.rb +1 -247
  12. data/lib/stripe/resources/apple_pay_domain.rb +0 -9
  13. data/lib/stripe/resources/application_fee.rb +1 -10
  14. data/lib/stripe/resources/balance.rb +0 -9
  15. data/lib/stripe/resources/balance_transaction.rb +2 -11
  16. data/lib/stripe/resources/bank_account.rb +1 -1
  17. data/lib/stripe/resources/billing/alert.rb +0 -9
  18. data/lib/stripe/resources/billing/credit_balance_summary.rb +0 -48
  19. data/lib/stripe/resources/billing/credit_balance_transaction.rb +0 -9
  20. data/lib/stripe/resources/billing/credit_grant.rb +4 -13
  21. data/lib/stripe/resources/billing/meter.rb +1 -10
  22. data/lib/stripe/resources/billing_portal/configuration.rb +0 -9
  23. data/lib/stripe/resources/card.rb +2 -4
  24. data/lib/stripe/resources/charge.rb +35 -1457
  25. data/lib/stripe/resources/checkout/session.rb +100 -293
  26. data/lib/stripe/resources/climate/order.rb +0 -9
  27. data/lib/stripe/resources/climate/product.rb +0 -9
  28. data/lib/stripe/resources/climate/supplier.rb +0 -9
  29. data/lib/stripe/resources/confirmation_token.rb +74 -156
  30. data/lib/stripe/resources/country_spec.rb +0 -9
  31. data/lib/stripe/resources/coupon.rb +0 -9
  32. data/lib/stripe/resources/credit_note.rb +14 -35
  33. data/lib/stripe/resources/credit_note_line_item.rb +14 -12
  34. data/lib/stripe/resources/customer.rb +12 -28
  35. data/lib/stripe/resources/customer_balance_transaction.rb +3 -1
  36. data/lib/stripe/resources/dispute.rb +0 -9
  37. data/lib/stripe/resources/entitlements/active_entitlement.rb +0 -9
  38. data/lib/stripe/resources/entitlements/feature.rb +0 -9
  39. data/lib/stripe/resources/event.rb +0 -40
  40. data/lib/stripe/resources/exchange_rate.rb +0 -9
  41. data/lib/stripe/resources/file.rb +0 -9
  42. data/lib/stripe/resources/file_link.rb +0 -9
  43. data/lib/stripe/resources/financial_connections/account.rb +0 -23
  44. data/lib/stripe/resources/financial_connections/session.rb +1 -65
  45. data/lib/stripe/resources/financial_connections/transaction.rb +0 -9
  46. data/lib/stripe/resources/forwarding/request.rb +0 -9
  47. data/lib/stripe/resources/identity/verification_report.rb +0 -9
  48. data/lib/stripe/resources/identity/verification_session.rb +0 -9
  49. data/lib/stripe/resources/invoice.rb +225 -5120
  50. data/lib/stripe/resources/invoice_item.rb +65 -110
  51. data/lib/stripe/resources/invoice_line_item.rb +106 -89
  52. data/lib/stripe/resources/invoice_payment.rb +53 -4
  53. data/lib/stripe/resources/invoice_rendering_template.rb +0 -12
  54. data/lib/stripe/resources/issuing/authorization.rb +0 -9
  55. data/lib/stripe/resources/issuing/card.rb +0 -9
  56. data/lib/stripe/resources/issuing/cardholder.rb +1 -11
  57. data/lib/stripe/resources/issuing/dispute.rb +0 -9
  58. data/lib/stripe/resources/issuing/personalization_design.rb +0 -9
  59. data/lib/stripe/resources/issuing/physical_bundle.rb +0 -9
  60. data/lib/stripe/resources/issuing/token.rb +0 -9
  61. data/lib/stripe/resources/issuing/transaction.rb +0 -15
  62. data/lib/stripe/resources/line_item.rb +0 -28
  63. data/lib/stripe/resources/mandate.rb +6 -33
  64. data/lib/stripe/resources/payment_intent.rb +642 -4975
  65. data/lib/stripe/resources/payment_link.rb +84 -15
  66. data/lib/stripe/resources/payment_method.rb +74 -187
  67. data/lib/stripe/resources/payment_method_configuration.rb +87 -214
  68. data/lib/stripe/resources/payment_method_domain.rb +9 -18
  69. data/lib/stripe/resources/payout.rb +0 -9
  70. data/lib/stripe/resources/person.rb +9 -9
  71. data/lib/stripe/resources/plan.rb +0 -15
  72. data/lib/stripe/resources/price.rb +2 -47
  73. data/lib/stripe/resources/product.rb +0 -68
  74. data/lib/stripe/resources/promotion_code.rb +0 -9
  75. data/lib/stripe/resources/quote.rb +8 -2037
  76. data/lib/stripe/resources/radar/early_fraud_warning.rb +0 -9
  77. data/lib/stripe/resources/radar/value_list.rb +0 -9
  78. data/lib/stripe/resources/radar/value_list_item.rb +0 -9
  79. data/lib/stripe/resources/refund.rb +13 -18
  80. data/lib/stripe/resources/reporting/report_run.rb +0 -9
  81. data/lib/stripe/resources/reporting/report_type.rb +0 -9
  82. data/lib/stripe/resources/review.rb +2 -11
  83. data/lib/stripe/resources/setup_attempt.rb +11 -16
  84. data/lib/stripe/resources/setup_intent.rb +158 -540
  85. data/lib/stripe/resources/shipping_rate.rb +0 -9
  86. data/lib/stripe/resources/sigma/scheduled_query_run.rb +0 -9
  87. data/lib/stripe/resources/source.rb +0 -41
  88. data/lib/stripe/resources/subscription.rb +14 -385
  89. data/lib/stripe/resources/subscription_item.rb +9 -134
  90. data/lib/stripe/resources/subscription_schedule.rb +14 -1135
  91. data/lib/stripe/resources/tax/calculation.rb +0 -9
  92. data/lib/stripe/resources/tax/registration.rb +1 -10
  93. data/lib/stripe/resources/tax/settings.rb +0 -9
  94. data/lib/stripe/resources/tax/transaction.rb +0 -9
  95. data/lib/stripe/resources/tax_code.rb +0 -9
  96. data/lib/stripe/resources/tax_id.rb +0 -9
  97. data/lib/stripe/resources/tax_rate.rb +0 -9
  98. data/lib/stripe/resources/terminal/configuration.rb +214 -14
  99. data/lib/stripe/resources/terminal/location.rb +0 -9
  100. data/lib/stripe/resources/terminal/reader.rb +0 -408
  101. data/lib/stripe/resources/test_helpers/test_clock.rb +0 -9
  102. data/lib/stripe/resources/token.rb +1 -10
  103. data/lib/stripe/resources/topup.rb +0 -9
  104. data/lib/stripe/resources/transfer.rb +0 -9
  105. data/lib/stripe/resources/treasury/credit_reversal.rb +0 -9
  106. data/lib/stripe/resources/treasury/debit_reversal.rb +0 -9
  107. data/lib/stripe/resources/treasury/financial_account.rb +4 -32
  108. data/lib/stripe/resources/treasury/financial_account_features.rb +0 -2
  109. data/lib/stripe/resources/treasury/inbound_transfer.rb +0 -9
  110. data/lib/stripe/resources/treasury/outbound_payment.rb +0 -9
  111. data/lib/stripe/resources/treasury/outbound_transfer.rb +0 -46
  112. data/lib/stripe/resources/treasury/received_credit.rb +1 -47
  113. data/lib/stripe/resources/treasury/received_debit.rb +1 -49
  114. data/lib/stripe/resources/treasury/transaction.rb +0 -9
  115. data/lib/stripe/resources/treasury/transaction_entry.rb +0 -9
  116. data/lib/stripe/resources/v2/event.rb +1 -0
  117. data/lib/stripe/resources/v2/event_destination.rb +1 -0
  118. data/lib/stripe/resources/webhook_endpoint.rb +0 -9
  119. data/lib/stripe/resources.rb +0 -25
  120. data/lib/stripe/services/account_external_account_service.rb +1 -1
  121. data/lib/stripe/services/account_service.rb +68 -509
  122. data/lib/stripe/services/account_session_service.rb +1 -217
  123. data/lib/stripe/services/balance_transaction_service.rb +1 -1
  124. data/lib/stripe/services/billing/credit_balance_summary_service.rb +2 -2
  125. data/lib/stripe/services/billing/credit_grant_service.rb +2 -2
  126. data/lib/stripe/services/billing/meter_service.rb +1 -1
  127. data/lib/stripe/services/charge_service.rb +1 -1335
  128. data/lib/stripe/services/checkout/session_service.rb +60 -168
  129. data/lib/stripe/services/credit_note_preview_lines_service.rb +0 -4
  130. data/lib/stripe/services/credit_note_service.rb +0 -8
  131. data/lib/stripe/services/customer_service.rb +0 -16
  132. data/lib/stripe/services/financial_connections/account_service.rb +1 -3
  133. data/lib/stripe/services/financial_connections/session_service.rb +1 -30
  134. data/lib/stripe/services/financial_connections_service.rb +1 -2
  135. data/lib/stripe/services/invoice_item_service.rb +34 -88
  136. data/lib/stripe/services/invoice_line_item_service.rb +25 -41
  137. data/lib/stripe/services/invoice_payment_service.rb +33 -5
  138. data/lib/stripe/services/invoice_service.rb +210 -3147
  139. data/lib/stripe/services/issuing/cardholder_service.rb +1 -2
  140. data/lib/stripe/services/issuing/transaction_service.rb +0 -4
  141. data/lib/stripe/services/issuing_service.rb +1 -5
  142. data/lib/stripe/services/payment_intent_service.rb +568 -4513
  143. data/lib/stripe/services/payment_link_service.rb +59 -6
  144. data/lib/stripe/services/payment_method_configuration_service.rb +62 -146
  145. data/lib/stripe/services/payment_method_domain_service.rb +6 -6
  146. data/lib/stripe/services/payment_method_service.rb +49 -119
  147. data/lib/stripe/services/plan_service.rb +0 -4
  148. data/lib/stripe/services/price_service.rb +2 -25
  149. data/lib/stripe/services/product_service.rb +0 -38
  150. data/lib/stripe/services/quote_service.rb +9 -1716
  151. data/lib/stripe/services/setup_intent_service.rb +158 -492
  152. data/lib/stripe/services/subscription_item_service.rb +5 -111
  153. data/lib/stripe/services/subscription_schedule_service.rb +14 -1005
  154. data/lib/stripe/services/subscription_service.rb +13 -323
  155. data/lib/stripe/services/tax/registration_service.rb +1 -1
  156. data/lib/stripe/services/tax_service.rb +1 -3
  157. data/lib/stripe/services/terminal/configuration_service.rb +170 -4
  158. data/lib/stripe/services/terminal/reader_service.rb +0 -177
  159. data/lib/stripe/services/terminal_service.rb +1 -2
  160. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +49 -87
  161. data/lib/stripe/services/test_helpers/terminal/reader_service.rb +0 -43
  162. data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +1 -25
  163. data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +1 -25
  164. data/lib/stripe/services/token_service.rb +1 -1
  165. data/lib/stripe/services/treasury/financial_account_features_service.rb +1 -4
  166. data/lib/stripe/services/treasury/financial_account_service.rb +3 -17
  167. data/lib/stripe/services/treasury/outbound_transfer_service.rb +0 -24
  168. data/lib/stripe/services/v1_services.rb +2 -8
  169. data/lib/stripe/services/v2/core/event_destination_service.rb +1 -4
  170. data/lib/stripe/services/v2/core/event_service.rb +1 -4
  171. data/lib/stripe/services.rb +0 -27
  172. data/lib/stripe/stripe_client.rb +1 -0
  173. data/lib/stripe/stripe_configuration.rb +1 -3
  174. data/lib/stripe/util.rb +1 -7
  175. data/lib/stripe/version.rb +1 -1
  176. data/lib/stripe.rb +0 -45
  177. data/rbi/stripe/resources/account.rbi +1131 -1479
  178. data/rbi/stripe/resources/account_link.rbi +9 -9
  179. data/rbi/stripe/resources/account_session.rbi +118 -367
  180. data/rbi/stripe/resources/apple_pay_domain.rbi +8 -15
  181. data/rbi/stripe/resources/application_fee.rbi +15 -20
  182. data/rbi/stripe/resources/apps/secret.rbi +20 -20
  183. data/rbi/stripe/resources/balance.rbi +0 -7
  184. data/rbi/stripe/resources/balance_transaction.rbi +19 -24
  185. data/rbi/stripe/resources/bank_account.rbi +1 -1
  186. data/rbi/stripe/resources/billing/alert.rbi +23 -28
  187. data/rbi/stripe/resources/billing/credit_balance_summary.rbi +0 -53
  188. data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +6 -13
  189. data/rbi/stripe/resources/billing/credit_grant.rbi +30 -37
  190. data/rbi/stripe/resources/billing/meter.rbi +19 -26
  191. data/rbi/stripe/resources/billing/meter_event.rbi +4 -4
  192. data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +5 -5
  193. data/rbi/stripe/resources/billing_portal/configuration.rbi +86 -81
  194. data/rbi/stripe/resources/billing_portal/session.rbi +31 -27
  195. data/rbi/stripe/resources/card.rbi +2 -5
  196. data/rbi/stripe/resources/charge.rbi +136 -1576
  197. data/rbi/stripe/resources/checkout/session.rbi +631 -748
  198. data/rbi/stripe/resources/climate/order.rbi +20 -25
  199. data/rbi/stripe/resources/climate/product.rbi +5 -12
  200. data/rbi/stripe/resources/climate/supplier.rbi +5 -12
  201. data/rbi/stripe/resources/confirmation_token.rbi +274 -268
  202. data/rbi/stripe/resources/country_spec.rbi +5 -12
  203. data/rbi/stripe/resources/coupon.rbi +34 -39
  204. data/rbi/stripe/resources/credit_note.rbi +134 -146
  205. data/rbi/stripe/resources/credit_note_line_item.rbi +20 -18
  206. data/rbi/stripe/resources/customer.rbi +172 -164
  207. data/rbi/stripe/resources/customer_balance_transaction.rbi +4 -1
  208. data/rbi/stripe/resources/customer_session.rbi +19 -15
  209. data/rbi/stripe/resources/dispute.rbi +92 -95
  210. data/rbi/stripe/resources/entitlements/active_entitlement.rbi +5 -12
  211. data/rbi/stripe/resources/entitlements/feature.rbi +15 -22
  212. data/rbi/stripe/resources/ephemeral_key.rbi +2 -2
  213. data/rbi/stripe/resources/event.rbi +16 -60
  214. data/rbi/stripe/resources/exchange_rate.rbi +5 -12
  215. data/rbi/stripe/resources/file.rbi +20 -25
  216. data/rbi/stripe/resources/file_link.rbi +23 -28
  217. data/rbi/stripe/resources/financial_connections/account.rbi +25 -44
  218. data/rbi/stripe/resources/financial_connections/session.rbi +12 -75
  219. data/rbi/stripe/resources/financial_connections/transaction.rbi +16 -19
  220. data/rbi/stripe/resources/forwarding/request.rbi +21 -24
  221. data/rbi/stripe/resources/identity/verification_report.rbi +18 -21
  222. data/rbi/stripe/resources/identity/verification_session.rbi +60 -61
  223. data/rbi/stripe/resources/invoice.rbi +723 -5918
  224. data/rbi/stripe/resources/invoice_item.rbi +138 -177
  225. data/rbi/stripe/resources/invoice_line_item.rbi +199 -264
  226. data/rbi/stripe/resources/invoice_payment.rbi +51 -7
  227. data/rbi/stripe/resources/invoice_rendering_template.rbi +10 -20
  228. data/rbi/stripe/resources/issuing/authorization.rbi +216 -199
  229. data/rbi/stripe/resources/issuing/card.rbi +104 -101
  230. data/rbi/stripe/resources/issuing/cardholder.rbi +120 -108
  231. data/rbi/stripe/resources/issuing/dispute.rbi +164 -151
  232. data/rbi/stripe/resources/issuing/personalization_design.rbi +61 -56
  233. data/rbi/stripe/resources/issuing/physical_bundle.rbi +7 -14
  234. data/rbi/stripe/resources/issuing/token.rbi +16 -21
  235. data/rbi/stripe/resources/issuing/transaction.rbi +180 -176
  236. data/rbi/stripe/resources/line_item.rbi +0 -36
  237. data/rbi/stripe/resources/mandate.rbi +8 -40
  238. data/rbi/stripe/resources/payment_intent.rbi +2252 -6482
  239. data/rbi/stripe/resources/payment_link.rbi +346 -211
  240. data/rbi/stripe/resources/payment_method.rbi +226 -330
  241. data/rbi/stripe/resources/payment_method_configuration.rbi +602 -685
  242. data/rbi/stripe/resources/payment_method_domain.rbi +26 -31
  243. data/rbi/stripe/resources/payout.rbi +43 -42
  244. data/rbi/stripe/resources/person.rbi +9 -9
  245. data/rbi/stripe/resources/plan.rbi +51 -63
  246. data/rbi/stripe/resources/price.rbi +114 -151
  247. data/rbi/stripe/resources/product.rbi +90 -152
  248. data/rbi/stripe/resources/promotion_code.rbi +42 -47
  249. data/rbi/stripe/resources/quote.rbi +168 -2231
  250. data/rbi/stripe/resources/radar/early_fraud_warning.rbi +17 -20
  251. data/rbi/stripe/resources/radar/value_list.rbi +24 -29
  252. data/rbi/stripe/resources/radar/value_list_item.rbi +18 -21
  253. data/rbi/stripe/resources/refund.rbi +52 -51
  254. data/rbi/stripe/resources/reporting/report_run.rbi +27 -30
  255. data/rbi/stripe/resources/reporting/report_type.rbi +2 -9
  256. data/rbi/stripe/resources/review.rbi +17 -22
  257. data/rbi/stripe/resources/setup_attempt.rbi +25 -32
  258. data/rbi/stripe/resources/setup_intent.rbi +900 -1102
  259. data/rbi/stripe/resources/shipping_rate.rbi +41 -46
  260. data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +5 -12
  261. data/rbi/stripe/resources/source.rbi +132 -179
  262. data/rbi/stripe/resources/subscription.rbi +363 -707
  263. data/rbi/stripe/resources/subscription_item.rbi +69 -177
  264. data/rbi/stripe/resources/subscription_schedule.rbi +289 -1447
  265. data/rbi/stripe/resources/tax/calculation.rbi +43 -48
  266. data/rbi/stripe/resources/tax/registration.rbi +217 -170
  267. data/rbi/stripe/resources/tax/settings.rbi +14 -21
  268. data/rbi/stripe/resources/tax/transaction.rbi +20 -25
  269. data/rbi/stripe/resources/tax_code.rbi +5 -12
  270. data/rbi/stripe/resources/tax_id.rbi +15 -22
  271. data/rbi/stripe/resources/tax_rate.rbi +34 -39
  272. data/rbi/stripe/resources/terminal/configuration.rbi +457 -212
  273. data/rbi/stripe/resources/terminal/connection_token.rbi +3 -3
  274. data/rbi/stripe/resources/terminal/location.rbi +28 -35
  275. data/rbi/stripe/resources/terminal/reader.rbi +71 -441
  276. data/rbi/stripe/resources/test_helpers/test_clock.rbi +12 -17
  277. data/rbi/stripe/resources/token.rbi +288 -263
  278. data/rbi/stripe/resources/topup.rbi +35 -38
  279. data/rbi/stripe/resources/transfer.rbi +27 -32
  280. data/rbi/stripe/resources/treasury/credit_reversal.rbi +10 -17
  281. data/rbi/stripe/resources/treasury/debit_reversal.rbi +11 -18
  282. data/rbi/stripe/resources/treasury/financial_account.rbi +125 -130
  283. data/rbi/stripe/resources/treasury/financial_account_features.rbi +0 -3
  284. data/rbi/stripe/resources/treasury/inbound_transfer.rbi +22 -29
  285. data/rbi/stripe/resources/treasury/outbound_payment.rbi +82 -79
  286. data/rbi/stripe/resources/treasury/outbound_transfer.rbi +44 -86
  287. data/rbi/stripe/resources/treasury/received_credit.rbi +18 -64
  288. data/rbi/stripe/resources/treasury/received_debit.rbi +17 -66
  289. data/rbi/stripe/resources/treasury/transaction.rbi +27 -28
  290. data/rbi/stripe/resources/treasury/transaction_entry.rbi +25 -26
  291. data/rbi/stripe/resources/v2/amount.rbi +1 -1
  292. data/rbi/stripe/resources/v2/event.rbi +1 -0
  293. data/rbi/stripe/resources/v2/event_destination.rbi +1 -0
  294. data/rbi/stripe/resources/webhook_endpoint.rbi +18 -25
  295. data/rbi/stripe/services/account_capability_service.rbi +7 -7
  296. data/rbi/stripe/services/account_external_account_service.rbi +52 -52
  297. data/rbi/stripe/services/account_link_service.rbi +9 -9
  298. data/rbi/stripe/services/account_login_link_service.rbi +2 -2
  299. data/rbi/stripe/services/account_person_service.rbi +221 -201
  300. data/rbi/stripe/services/account_service.rbi +1221 -1345
  301. data/rbi/stripe/services/account_session_service.rbi +115 -346
  302. data/rbi/stripe/services/apple_pay_domain_service.rbi +10 -10
  303. data/rbi/stripe/services/application_fee_refund_service.rbi +16 -14
  304. data/rbi/stripe/services/application_fee_service.rbi +18 -14
  305. data/rbi/stripe/services/apps/secret_service.rbi +20 -20
  306. data/rbi/stripe/services/balance_service.rbi +2 -2
  307. data/rbi/stripe/services/balance_transaction_service.rbi +22 -18
  308. data/rbi/stripe/services/billing/alert_service.rbi +23 -23
  309. data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +10 -10
  310. data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +8 -8
  311. data/rbi/stripe/services/billing/credit_grant_service.rbi +32 -30
  312. data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +7 -5
  313. data/rbi/stripe/services/billing/meter_event_service.rbi +4 -4
  314. data/rbi/stripe/services/billing/meter_event_summary_service.rbi +6 -6
  315. data/rbi/stripe/services/billing/meter_service.rbi +21 -21
  316. data/rbi/stripe/services/billing_portal/configuration_service.rbi +90 -76
  317. data/rbi/stripe/services/billing_portal/session_service.rbi +29 -27
  318. data/rbi/stripe/services/charge_service.rbi +96 -1464
  319. data/rbi/stripe/services/checkout/session_line_item_service.rbi +5 -5
  320. data/rbi/stripe/services/checkout/session_service.rbi +555 -591
  321. data/rbi/stripe/services/climate/order_service.rbi +22 -20
  322. data/rbi/stripe/services/climate/product_service.rbi +7 -7
  323. data/rbi/stripe/services/climate/supplier_service.rbi +7 -7
  324. data/rbi/stripe/services/confirmation_token_service.rbi +2 -2
  325. data/rbi/stripe/services/country_spec_service.rbi +7 -7
  326. data/rbi/stripe/services/coupon_service.rbi +40 -34
  327. data/rbi/stripe/services/credit_note_line_item_service.rbi +5 -5
  328. data/rbi/stripe/services/credit_note_preview_lines_service.rbi +35 -35
  329. data/rbi/stripe/services/credit_note_service.rbi +81 -85
  330. data/rbi/stripe/services/customer_balance_transaction_service.rbi +15 -15
  331. data/rbi/stripe/services/customer_cash_balance_service.rbi +7 -7
  332. data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +7 -7
  333. data/rbi/stripe/services/customer_funding_instructions_service.rbi +5 -5
  334. data/rbi/stripe/services/customer_payment_method_service.rbi +9 -9
  335. data/rbi/stripe/services/customer_payment_source_service.rbi +48 -44
  336. data/rbi/stripe/services/customer_service.rbi +143 -139
  337. data/rbi/stripe/services/customer_session_service.rbi +21 -15
  338. data/rbi/stripe/services/customer_tax_id_service.rbi +9 -9
  339. data/rbi/stripe/services/dispute_service.rbi +92 -90
  340. data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +7 -7
  341. data/rbi/stripe/services/entitlements/feature_service.rbi +17 -17
  342. data/rbi/stripe/services/ephemeral_key_service.rbi +8 -8
  343. data/rbi/stripe/services/event_service.rbi +18 -16
  344. data/rbi/stripe/services/exchange_rate_service.rbi +7 -7
  345. data/rbi/stripe/services/file_link_service.rbi +25 -23
  346. data/rbi/stripe/services/file_service.rbi +22 -20
  347. data/rbi/stripe/services/financial_connections/account_owner_service.rbi +5 -5
  348. data/rbi/stripe/services/financial_connections/account_service.rbi +22 -21
  349. data/rbi/stripe/services/financial_connections/session_service.rbi +16 -39
  350. data/rbi/stripe/services/financial_connections/transaction_service.rbi +16 -14
  351. data/rbi/stripe/services/financial_connections_service.rbi +0 -1
  352. data/rbi/stripe/services/forwarding/request_service.rbi +21 -19
  353. data/rbi/stripe/services/identity/verification_report_service.rbi +18 -16
  354. data/rbi/stripe/services/identity/verification_session_service.rbi +62 -56
  355. data/rbi/stripe/services/invoice_item_service.rbi +99 -155
  356. data/rbi/stripe/services/invoice_line_item_service.rbi +71 -82
  357. data/rbi/stripe/services/invoice_payment_service.rbi +39 -12
  358. data/rbi/stripe/services/invoice_rendering_template_service.rbi +13 -13
  359. data/rbi/stripe/services/invoice_service.rbi +679 -3799
  360. data/rbi/stripe/services/issuing/authorization_service.rbi +32 -26
  361. data/rbi/stripe/services/issuing/card_service.rbi +102 -86
  362. data/rbi/stripe/services/issuing/cardholder_service.rbi +122 -103
  363. data/rbi/stripe/services/issuing/dispute_service.rbi +152 -146
  364. data/rbi/stripe/services/issuing/personalization_design_service.rbi +52 -42
  365. data/rbi/stripe/services/issuing/physical_bundle_service.rbi +9 -9
  366. data/rbi/stripe/services/issuing/token_service.rbi +20 -16
  367. data/rbi/stripe/services/issuing/transaction_service.rbi +25 -23
  368. data/rbi/stripe/services/issuing_service.rbi +0 -3
  369. data/rbi/stripe/services/mandate_service.rbi +2 -2
  370. data/rbi/stripe/services/payment_intent_service.rbi +2312 -6081
  371. data/rbi/stripe/services/payment_link_line_item_service.rbi +5 -5
  372. data/rbi/stripe/services/payment_link_service.rbi +303 -201
  373. data/rbi/stripe/services/payment_method_configuration_service.rbi +616 -620
  374. data/rbi/stripe/services/payment_method_domain_service.rbi +25 -23
  375. data/rbi/stripe/services/payment_method_service.rbi +192 -249
  376. data/rbi/stripe/services/payout_service.rbi +45 -37
  377. data/rbi/stripe/services/plan_service.rbi +53 -55
  378. data/rbi/stripe/services/price_service.rbi +124 -129
  379. data/rbi/stripe/services/product_feature_service.rbi +9 -9
  380. data/rbi/stripe/services/product_service.rbi +94 -122
  381. data/rbi/stripe/services/promotion_code_service.rbi +46 -42
  382. data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +5 -5
  383. data/rbi/stripe/services/quote_line_item_service.rbi +5 -5
  384. data/rbi/stripe/services/quote_service.rbi +159 -1863
  385. data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +17 -15
  386. data/rbi/stripe/services/radar/value_list_item_service.rbi +20 -16
  387. data/rbi/stripe/services/radar/value_list_service.rbi +28 -24
  388. data/rbi/stripe/services/refund_service.rbi +37 -33
  389. data/rbi/stripe/services/reporting/report_run_service.rbi +29 -25
  390. data/rbi/stripe/services/reporting/report_type_service.rbi +4 -4
  391. data/rbi/stripe/services/review_service.rbi +17 -15
  392. data/rbi/stripe/services/setup_attempt_service.rbi +13 -11
  393. data/rbi/stripe/services/setup_intent_service.rbi +1028 -1062
  394. data/rbi/stripe/services/shipping_rate_service.rbi +47 -41
  395. data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +7 -7
  396. data/rbi/stripe/services/source_service.rbi +149 -133
  397. data/rbi/stripe/services/source_transaction_service.rbi +5 -5
  398. data/rbi/stripe/services/subscription_item_service.rbi +61 -159
  399. data/rbi/stripe/services/subscription_schedule_service.rbi +289 -1305
  400. data/rbi/stripe/services/subscription_service.rbi +366 -640
  401. data/rbi/stripe/services/tax/calculation_line_item_service.rbi +5 -5
  402. data/rbi/stripe/services/tax/calculation_service.rbi +40 -38
  403. data/rbi/stripe/services/tax/registration_service.rbi +337 -165
  404. data/rbi/stripe/services/tax/settings_service.rbi +16 -16
  405. data/rbi/stripe/services/tax/transaction_line_item_service.rbi +5 -5
  406. data/rbi/stripe/services/tax/transaction_service.rbi +19 -15
  407. data/rbi/stripe/services/tax_code_service.rbi +7 -7
  408. data/rbi/stripe/services/tax_id_service.rbi +17 -17
  409. data/rbi/stripe/services/tax_rate_service.rbi +36 -34
  410. data/rbi/stripe/services/tax_service.rbi +0 -2
  411. data/rbi/stripe/services/terminal/configuration_service.rbi +464 -204
  412. data/rbi/stripe/services/terminal/connection_token_service.rbi +3 -3
  413. data/rbi/stripe/services/terminal/location_service.rbi +30 -30
  414. data/rbi/stripe/services/terminal/reader_service.rbi +57 -226
  415. data/rbi/stripe/services/terminal_service.rbi +0 -1
  416. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +157 -198
  417. data/rbi/stripe/services/test_helpers/customer_service.rbi +3 -3
  418. data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +180 -168
  419. data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +10 -10
  420. data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +11 -9
  421. data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +151 -145
  422. data/rbi/stripe/services/test_helpers/refund_service.rbi +2 -2
  423. data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +10 -39
  424. data/rbi/stripe/services/test_helpers/test_clock_service.rbi +14 -12
  425. data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +9 -9
  426. data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +20 -18
  427. data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +20 -18
  428. data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +11 -38
  429. data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +11 -38
  430. data/rbi/stripe/services/token_service.rbi +292 -258
  431. data/rbi/stripe/services/topup_service.rbi +37 -33
  432. data/rbi/stripe/services/transfer_reversal_service.rbi +18 -16
  433. data/rbi/stripe/services/transfer_service.rbi +29 -27
  434. data/rbi/stripe/services/treasury/credit_reversal_service.rbi +12 -12
  435. data/rbi/stripe/services/treasury/debit_reversal_service.rbi +13 -13
  436. data/rbi/stripe/services/treasury/financial_account_features_service.rbi +23 -26
  437. data/rbi/stripe/services/treasury/financial_account_service.rbi +92 -96
  438. data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +15 -15
  439. data/rbi/stripe/services/treasury/outbound_payment_service.rbi +60 -56
  440. data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +24 -49
  441. data/rbi/stripe/services/treasury/received_credit_service.rbi +11 -9
  442. data/rbi/stripe/services/treasury/received_debit_service.rbi +8 -8
  443. data/rbi/stripe/services/treasury/transaction_entry_service.rbi +25 -21
  444. data/rbi/stripe/services/treasury/transaction_service.rbi +31 -23
  445. data/rbi/stripe/services/v1_services.rbi +1 -7
  446. data/rbi/stripe/services/v2/billing/meter_event_service.rbi +3 -3
  447. data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +3 -3
  448. data/rbi/stripe/services/v2/core/event_destination_service.rbi +21 -24
  449. data/rbi/stripe/services/v2/core/event_service.rbi +3 -6
  450. data/rbi/stripe/services/webhook_endpoint_service.rbi +20 -20
  451. metadata +4 -109
  452. data/lib/stripe/request_signing_authenticator.rb +0 -79
  453. data/lib/stripe/resources/account_notice.rb +0 -132
  454. data/lib/stripe/resources/billing/meter_error_report.rb +0 -59
  455. data/lib/stripe/resources/capital/financing_offer.rb +0 -188
  456. data/lib/stripe/resources/capital/financing_summary.rb +0 -64
  457. data/lib/stripe/resources/capital/financing_transaction.rb +0 -123
  458. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -27
  459. data/lib/stripe/resources/financial_connections/institution.rb +0 -99
  460. data/lib/stripe/resources/gift_cards/card.rb +0 -217
  461. data/lib/stripe/resources/gift_cards/transaction.rb +0 -281
  462. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -611
  463. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +0 -84
  464. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +0 -95
  465. data/lib/stripe/resources/issuing/settlement.rb +0 -49
  466. data/lib/stripe/resources/margin.rb +0 -124
  467. data/lib/stripe/resources/order.rb +0 -2868
  468. data/lib/stripe/resources/payment_attempt_record.rb +0 -184
  469. data/lib/stripe/resources/payment_record.rb +0 -715
  470. data/lib/stripe/resources/quote_line.rb +0 -274
  471. data/lib/stripe/resources/quote_preview_invoice.rb +0 -652
  472. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -362
  473. data/lib/stripe/resources/tax/association.rb +0 -89
  474. data/lib/stripe/resources/tax/form.rb +0 -220
  475. data/lib/stripe/resources/terminal/reader_collected_data.rb +0 -40
  476. data/lib/stripe/resources/usage_record.rb +0 -30
  477. data/lib/stripe/resources/usage_record_summary.rb +0 -33
  478. data/lib/stripe/services/account_notice_service.rb +0 -101
  479. data/lib/stripe/services/capital/financing_offer_service.rb +0 -112
  480. data/lib/stripe/services/capital/financing_summary_service.rb +0 -28
  481. data/lib/stripe/services/capital/financing_transaction_service.rb +0 -79
  482. data/lib/stripe/services/capital_service.rb +0 -15
  483. data/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +0 -37
  484. data/lib/stripe/services/financial_connections/institution_service.rb +0 -57
  485. data/lib/stripe/services/gift_cards/card_service.rb +0 -170
  486. data/lib/stripe/services/gift_cards/transaction_service.rb +0 -209
  487. data/lib/stripe/services/gift_cards_service.rb +0 -14
  488. data/lib/stripe/services/invoice_upcoming_lines_service.rb +0 -1881
  489. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +0 -504
  490. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +0 -66
  491. data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +0 -83
  492. data/lib/stripe/services/margin_service.rb +0 -119
  493. data/lib/stripe/services/order_line_item_service.rb +0 -35
  494. data/lib/stripe/services/order_service.rb +0 -2268
  495. data/lib/stripe/services/payment_attempt_record_service.rb +0 -49
  496. data/lib/stripe/services/payment_record_service.rb +0 -542
  497. data/lib/stripe/services/quote_line_service.rb +0 -35
  498. data/lib/stripe/services/quote_preview_invoice_service.rb +0 -35
  499. data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +0 -35
  500. data/lib/stripe/services/subscription_item_usage_record_service.rb +0 -41
  501. data/lib/stripe/services/subscription_item_usage_record_summary_service.rb +0 -37
  502. data/lib/stripe/services/tax/association_service.rb +0 -31
  503. data/lib/stripe/services/tax/form_service.rb +0 -100
  504. data/lib/stripe/services/terminal/reader_collected_data_service.rb +0 -28
  505. data/rbi/stripe/resources/account_notice.rbi +0 -139
  506. data/rbi/stripe/resources/billing/meter_error_report.rbi +0 -71
  507. data/rbi/stripe/resources/capital/financing_offer.rbi +0 -190
  508. data/rbi/stripe/resources/capital/financing_summary.rbi +0 -74
  509. data/rbi/stripe/resources/capital/financing_transaction.rbi +0 -130
  510. data/rbi/stripe/resources/financial_connections/account_inferred_balance.rbi +0 -27
  511. data/rbi/stripe/resources/financial_connections/institution.rbi +0 -99
  512. data/rbi/stripe/resources/gift_cards/card.rbi +0 -206
  513. data/rbi/stripe/resources/gift_cards/transaction.rbi +0 -257
  514. data/rbi/stripe/resources/issuing/credit_underwriting_record.rbi +0 -622
  515. data/rbi/stripe/resources/issuing/dispute_settlement_detail.rbi +0 -83
  516. data/rbi/stripe/resources/issuing/fraud_liability_debit.rbi +0 -90
  517. data/rbi/stripe/resources/issuing/settlement.rbi +0 -62
  518. data/rbi/stripe/resources/margin.rbi +0 -127
  519. data/rbi/stripe/resources/order.rbi +0 -3036
  520. data/rbi/stripe/resources/payment_attempt_record.rbi +0 -215
  521. data/rbi/stripe/resources/payment_record.rbi +0 -722
  522. data/rbi/stripe/resources/quote_line.rbi +0 -350
  523. data/rbi/stripe/resources/quote_preview_invoice.rbi +0 -850
  524. data/rbi/stripe/resources/quote_preview_subscription_schedule.rbi +0 -474
  525. data/rbi/stripe/resources/tax/association.rbi +0 -94
  526. data/rbi/stripe/resources/tax/form.rbi +0 -224
  527. data/rbi/stripe/resources/terminal/reader_collected_data.rbi +0 -41
  528. data/rbi/stripe/resources/usage_record.rbi +0 -32
  529. data/rbi/stripe/resources/usage_record_summary.rbi +0 -38
  530. data/rbi/stripe/services/account_notice_service.rbi +0 -90
  531. data/rbi/stripe/services/capital/financing_offer_service.rbi +0 -95
  532. data/rbi/stripe/services/capital/financing_summary_service.rbi +0 -22
  533. data/rbi/stripe/services/capital/financing_transaction_service.rbi +0 -68
  534. data/rbi/stripe/services/capital_service.rbi +0 -11
  535. data/rbi/stripe/services/financial_connections/account_inferred_balance_service.rbi +0 -33
  536. data/rbi/stripe/services/financial_connections/institution_service.rbi +0 -46
  537. data/rbi/stripe/services/gift_cards/card_service.rbi +0 -142
  538. data/rbi/stripe/services/gift_cards/transaction_service.rbi +0 -174
  539. data/rbi/stripe/services/gift_cards_service.rbi +0 -10
  540. data/rbi/stripe/services/invoice_upcoming_lines_service.rbi +0 -2023
  541. data/rbi/stripe/services/issuing/credit_underwriting_record_service.rbi +0 -498
  542. data/rbi/stripe/services/issuing/dispute_settlement_detail_service.rbi +0 -55
  543. data/rbi/stripe/services/issuing/fraud_liability_debit_service.rbi +0 -73
  544. data/rbi/stripe/services/margin_service.rbi +0 -104
  545. data/rbi/stripe/services/order_line_item_service.rbi +0 -31
  546. data/rbi/stripe/services/order_service.rbi +0 -2320
  547. data/rbi/stripe/services/payment_attempt_record_service.rbi +0 -36
  548. data/rbi/stripe/services/payment_record_service.rbi +0 -521
  549. data/rbi/stripe/services/quote_line_service.rbi +0 -31
  550. data/rbi/stripe/services/quote_preview_invoice_service.rbi +0 -31
  551. data/rbi/stripe/services/quote_preview_subscription_schedule_service.rbi +0 -31
  552. data/rbi/stripe/services/subscription_item_usage_record_service.rbi +0 -37
  553. data/rbi/stripe/services/subscription_item_usage_record_summary_service.rbi +0 -33
  554. data/rbi/stripe/services/tax/association_service.rbi +0 -25
  555. data/rbi/stripe/services/tax/form_service.rbi +0 -85
  556. data/rbi/stripe/services/terminal/reader_collected_data_service.rbi +0 -22
@@ -7,102 +7,116 @@ module Stripe
7
7
  class ListParams < Stripe::RequestParams
8
8
  class CanceledAt < Stripe::RequestParams
9
9
  # Minimum value to filter by (exclusive)
10
- sig { returns(Integer) }
10
+ sig { returns(T.nilable(Integer)) }
11
11
  attr_accessor :gt
12
12
  # Minimum value to filter by (inclusive)
13
- sig { returns(Integer) }
13
+ sig { returns(T.nilable(Integer)) }
14
14
  attr_accessor :gte
15
15
  # Maximum value to filter by (exclusive)
16
- sig { returns(Integer) }
16
+ sig { returns(T.nilable(Integer)) }
17
17
  attr_accessor :lt
18
18
  # Maximum value to filter by (inclusive)
19
- sig { returns(Integer) }
19
+ sig { returns(T.nilable(Integer)) }
20
20
  attr_accessor :lte
21
- sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void }
21
+ sig {
22
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
23
+ }
22
24
  def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
23
25
  end
24
26
  class CompletedAt < Stripe::RequestParams
25
27
  # Minimum value to filter by (exclusive)
26
- sig { returns(Integer) }
28
+ sig { returns(T.nilable(Integer)) }
27
29
  attr_accessor :gt
28
30
  # Minimum value to filter by (inclusive)
29
- sig { returns(Integer) }
31
+ sig { returns(T.nilable(Integer)) }
30
32
  attr_accessor :gte
31
33
  # Maximum value to filter by (exclusive)
32
- sig { returns(Integer) }
34
+ sig { returns(T.nilable(Integer)) }
33
35
  attr_accessor :lt
34
36
  # Maximum value to filter by (inclusive)
35
- sig { returns(Integer) }
37
+ sig { returns(T.nilable(Integer)) }
36
38
  attr_accessor :lte
37
- sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void }
39
+ sig {
40
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
41
+ }
38
42
  def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
39
43
  end
40
44
  class Created < Stripe::RequestParams
41
45
  # Minimum value to filter by (exclusive)
42
- sig { returns(Integer) }
46
+ sig { returns(T.nilable(Integer)) }
43
47
  attr_accessor :gt
44
48
  # Minimum value to filter by (inclusive)
45
- sig { returns(Integer) }
49
+ sig { returns(T.nilable(Integer)) }
46
50
  attr_accessor :gte
47
51
  # Maximum value to filter by (exclusive)
48
- sig { returns(Integer) }
52
+ sig { returns(T.nilable(Integer)) }
49
53
  attr_accessor :lt
50
54
  # Maximum value to filter by (inclusive)
51
- sig { returns(Integer) }
55
+ sig { returns(T.nilable(Integer)) }
52
56
  attr_accessor :lte
53
- sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void }
57
+ sig {
58
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
59
+ }
54
60
  def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
55
61
  end
56
62
  class ReleasedAt < Stripe::RequestParams
57
63
  # Minimum value to filter by (exclusive)
58
- sig { returns(Integer) }
64
+ sig { returns(T.nilable(Integer)) }
59
65
  attr_accessor :gt
60
66
  # Minimum value to filter by (inclusive)
61
- sig { returns(Integer) }
67
+ sig { returns(T.nilable(Integer)) }
62
68
  attr_accessor :gte
63
69
  # Maximum value to filter by (exclusive)
64
- sig { returns(Integer) }
70
+ sig { returns(T.nilable(Integer)) }
65
71
  attr_accessor :lt
66
72
  # Maximum value to filter by (inclusive)
67
- sig { returns(Integer) }
73
+ sig { returns(T.nilable(Integer)) }
68
74
  attr_accessor :lte
69
- sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void }
75
+ sig {
76
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
77
+ }
70
78
  def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
71
79
  end
72
80
  # Only return subscription schedules that were created canceled the given date interval.
73
- sig { returns(T.any(::Stripe::SubscriptionScheduleService::ListParams::CanceledAt, Integer)) }
81
+ sig {
82
+ returns(T.nilable(T.any(::Stripe::SubscriptionScheduleService::ListParams::CanceledAt, Integer)))
83
+ }
74
84
  attr_accessor :canceled_at
75
85
  # Only return subscription schedules that completed during the given date interval.
76
86
  sig {
77
- returns(T.any(::Stripe::SubscriptionScheduleService::ListParams::CompletedAt, Integer))
87
+ returns(T.nilable(T.any(::Stripe::SubscriptionScheduleService::ListParams::CompletedAt, Integer)))
78
88
  }
79
89
  attr_accessor :completed_at
80
90
  # Only return subscription schedules that were created during the given date interval.
81
- sig { returns(T.any(::Stripe::SubscriptionScheduleService::ListParams::Created, Integer)) }
91
+ sig {
92
+ returns(T.nilable(T.any(::Stripe::SubscriptionScheduleService::ListParams::Created, Integer)))
93
+ }
82
94
  attr_accessor :created
83
95
  # Only return subscription schedules for the given customer.
84
- sig { returns(String) }
96
+ sig { returns(T.nilable(String)) }
85
97
  attr_accessor :customer
86
98
  # 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.
87
- sig { returns(String) }
99
+ sig { returns(T.nilable(String)) }
88
100
  attr_accessor :ending_before
89
101
  # Specifies which fields in the response should be expanded.
90
- sig { returns(T::Array[String]) }
102
+ sig { returns(T.nilable(T::Array[String])) }
91
103
  attr_accessor :expand
92
104
  # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
93
- sig { returns(Integer) }
105
+ sig { returns(T.nilable(Integer)) }
94
106
  attr_accessor :limit
95
107
  # Only return subscription schedules that were released during the given date interval.
96
- sig { returns(T.any(::Stripe::SubscriptionScheduleService::ListParams::ReleasedAt, Integer)) }
108
+ sig {
109
+ returns(T.nilable(T.any(::Stripe::SubscriptionScheduleService::ListParams::ReleasedAt, Integer)))
110
+ }
97
111
  attr_accessor :released_at
98
112
  # Only return subscription schedules that have not started yet.
99
- sig { returns(T::Boolean) }
113
+ sig { returns(T.nilable(T::Boolean)) }
100
114
  attr_accessor :scheduled
101
115
  # 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.
102
- sig { returns(String) }
116
+ sig { returns(T.nilable(String)) }
103
117
  attr_accessor :starting_after
104
118
  sig {
105
- params(canceled_at: T.any(::Stripe::SubscriptionScheduleService::ListParams::CanceledAt, Integer), completed_at: T.any(::Stripe::SubscriptionScheduleService::ListParams::CompletedAt, Integer), created: T.any(::Stripe::SubscriptionScheduleService::ListParams::Created, Integer), customer: String, ending_before: String, expand: T::Array[String], limit: Integer, released_at: T.any(::Stripe::SubscriptionScheduleService::ListParams::ReleasedAt, Integer), scheduled: T::Boolean, starting_after: String).void
119
+ params(canceled_at: T.nilable(T.any(::Stripe::SubscriptionScheduleService::ListParams::CanceledAt, Integer)), completed_at: T.nilable(T.any(::Stripe::SubscriptionScheduleService::ListParams::CompletedAt, Integer)), created: T.nilable(T.any(::Stripe::SubscriptionScheduleService::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::SubscriptionScheduleService::ListParams::ReleasedAt, Integer)), scheduled: T.nilable(T::Boolean), starting_after: T.nilable(String)).void
106
120
  }
107
121
  def initialize(
108
122
  canceled_at: nil,
@@ -122,12 +136,12 @@ module Stripe
122
136
  class AutomaticTax < Stripe::RequestParams
123
137
  class Liability < Stripe::RequestParams
124
138
  # The connected account being referenced when `type` is `account`.
125
- sig { returns(String) }
139
+ sig { returns(T.nilable(String)) }
126
140
  attr_accessor :account
127
141
  # Type of the account referenced in the request.
128
142
  sig { returns(String) }
129
143
  attr_accessor :type
130
- sig { params(account: String, type: String).void }
144
+ sig { params(account: T.nilable(String), type: String).void }
131
145
  def initialize(account: nil, type: nil); end
132
146
  end
133
147
  # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
@@ -135,107 +149,91 @@ module Stripe
135
149
  attr_accessor :enabled
136
150
  # 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.
137
151
  sig {
138
- returns(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::AutomaticTax::Liability)
152
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::AutomaticTax::Liability))
139
153
  }
140
154
  attr_accessor :liability
141
155
  sig {
142
- params(enabled: T::Boolean, liability: ::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::AutomaticTax::Liability).void
156
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::AutomaticTax::Liability)).void
143
157
  }
144
158
  def initialize(enabled: nil, liability: nil); end
145
159
  end
146
- class BillingThresholds < Stripe::RequestParams
147
- # Monetary threshold that triggers the subscription to advance to a new billing period
148
- sig { returns(Integer) }
149
- attr_accessor :amount_gte
150
- # 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.
151
- sig { returns(T::Boolean) }
152
- attr_accessor :reset_billing_cycle_anchor
153
- sig { params(amount_gte: Integer, reset_billing_cycle_anchor: T::Boolean).void }
154
- def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
155
- end
156
160
  class InvoiceSettings < Stripe::RequestParams
157
161
  class Issuer < Stripe::RequestParams
158
162
  # The connected account being referenced when `type` is `account`.
159
- sig { returns(String) }
163
+ sig { returns(T.nilable(String)) }
160
164
  attr_accessor :account
161
165
  # Type of the account referenced in the request.
162
166
  sig { returns(String) }
163
167
  attr_accessor :type
164
- sig { params(account: String, type: String).void }
168
+ sig { params(account: T.nilable(String), type: String).void }
165
169
  def initialize(account: nil, type: nil); end
166
170
  end
167
171
  # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule.
168
- sig { returns(T.nilable(T::Array[String])) }
172
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
169
173
  attr_accessor :account_tax_ids
170
174
  # 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`.
171
- sig { returns(Integer) }
175
+ sig { returns(T.nilable(Integer)) }
172
176
  attr_accessor :days_until_due
173
177
  # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
174
178
  sig {
175
- returns(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::InvoiceSettings::Issuer)
179
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::InvoiceSettings::Issuer))
176
180
  }
177
181
  attr_accessor :issuer
178
182
  sig {
179
- params(account_tax_ids: T.nilable(T::Array[String]), days_until_due: Integer, issuer: ::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::InvoiceSettings::Issuer).void
183
+ params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), days_until_due: T.nilable(Integer), issuer: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::InvoiceSettings::Issuer)).void
180
184
  }
181
185
  def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
182
186
  end
183
187
  class TransferData < Stripe::RequestParams
184
188
  # 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.
185
- sig { returns(Float) }
189
+ sig { returns(T.nilable(Float)) }
186
190
  attr_accessor :amount_percent
187
191
  # ID of an existing, connected Stripe account.
188
192
  sig { returns(String) }
189
193
  attr_accessor :destination
190
- sig { params(amount_percent: Float, destination: String).void }
194
+ sig { params(amount_percent: T.nilable(Float), destination: String).void }
191
195
  def initialize(amount_percent: nil, destination: nil); end
192
196
  end
193
197
  # 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).
194
- sig { returns(Float) }
198
+ sig { returns(T.nilable(Float)) }
195
199
  attr_accessor :application_fee_percent
196
200
  # Default settings for automatic tax computation.
197
201
  sig {
198
- returns(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::AutomaticTax)
202
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::AutomaticTax))
199
203
  }
200
204
  attr_accessor :automatic_tax
201
205
  # 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).
202
- sig { returns(String) }
206
+ sig { returns(T.nilable(String)) }
203
207
  attr_accessor :billing_cycle_anchor
204
- # 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.
205
- sig {
206
- returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::BillingThresholds))
207
- }
208
- attr_accessor :billing_thresholds
209
208
  # 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.
210
- sig { returns(String) }
209
+ sig { returns(T.nilable(String)) }
211
210
  attr_accessor :collection_method
212
211
  # 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.
213
- sig { returns(String) }
212
+ sig { returns(T.nilable(String)) }
214
213
  attr_accessor :default_payment_method
215
214
  # 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.
216
- sig { returns(T.nilable(String)) }
215
+ sig { returns(T.nilable(T.nilable(String))) }
217
216
  attr_accessor :description
218
217
  # All invoices will be billed using the specified settings.
219
218
  sig {
220
- returns(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::InvoiceSettings)
219
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::InvoiceSettings))
221
220
  }
222
221
  attr_accessor :invoice_settings
223
222
  # The account on behalf of which to charge, for each of the associated subscription's invoices.
224
- sig { returns(T.nilable(String)) }
223
+ sig { returns(T.nilable(T.nilable(String))) }
225
224
  attr_accessor :on_behalf_of
226
225
  # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
227
226
  sig {
228
- returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::TransferData))
227
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::TransferData))))
229
228
  }
230
229
  attr_accessor :transfer_data
231
230
  sig {
232
- params(application_fee_percent: Float, automatic_tax: ::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::AutomaticTax, billing_cycle_anchor: String, billing_thresholds: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::BillingThresholds), collection_method: String, default_payment_method: String, description: T.nilable(String), invoice_settings: ::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::InvoiceSettings, on_behalf_of: T.nilable(String), transfer_data: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::TransferData)).void
231
+ params(application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::AutomaticTax), billing_cycle_anchor: T.nilable(String), collection_method: T.nilable(String), default_payment_method: T.nilable(String), description: T.nilable(T.nilable(String)), invoice_settings: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::InvoiceSettings), on_behalf_of: T.nilable(T.nilable(String)), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::TransferData)))).void
233
232
  }
234
233
  def initialize(
235
234
  application_fee_percent: nil,
236
235
  automatic_tax: nil,
237
236
  billing_cycle_anchor: nil,
238
- billing_thresholds: nil,
239
237
  collection_method: nil,
240
238
  default_payment_method: nil,
241
239
  description: nil,
@@ -247,70 +245,38 @@ module Stripe
247
245
  class Phase < Stripe::RequestParams
248
246
  class AddInvoiceItem < Stripe::RequestParams
249
247
  class Discount < Stripe::RequestParams
250
- class DiscountEnd < Stripe::RequestParams
251
- class Duration < Stripe::RequestParams
252
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
253
- sig { returns(String) }
254
- attr_accessor :interval
255
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
256
- sig { returns(Integer) }
257
- attr_accessor :interval_count
258
- sig { params(interval: String, interval_count: Integer).void }
259
- def initialize(interval: nil, interval_count: nil); end
260
- end
261
- # Time span for the redeemed discount.
262
- sig {
263
- returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem::Discount::DiscountEnd::Duration)
264
- }
265
- attr_accessor :duration
266
- # A precise Unix timestamp for the discount to end. Must be in the future.
267
- sig { returns(Integer) }
268
- attr_accessor :timestamp
269
- # The type of calculation made to determine when the discount ends.
270
- sig { returns(String) }
271
- attr_accessor :type
272
- sig {
273
- params(duration: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
274
- }
275
- def initialize(duration: nil, timestamp: nil, type: nil); end
276
- end
277
248
  # ID of the coupon to create a new discount for.
278
- sig { returns(String) }
249
+ sig { returns(T.nilable(String)) }
279
250
  attr_accessor :coupon
280
251
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
281
- sig { returns(String) }
252
+ sig { returns(T.nilable(String)) }
282
253
  attr_accessor :discount
283
- # Details to determine how long the discount should be applied for.
284
- sig {
285
- returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem::Discount::DiscountEnd)
286
- }
287
- attr_accessor :discount_end
288
254
  # ID of the promotion code to create a new discount for.
289
- sig { returns(String) }
255
+ sig { returns(T.nilable(String)) }
290
256
  attr_accessor :promotion_code
291
257
  sig {
292
- params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem::Discount::DiscountEnd, promotion_code: String).void
258
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
293
259
  }
294
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end
260
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
295
261
  end
296
262
  class PriceData < Stripe::RequestParams
297
263
  # 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).
298
264
  sig { returns(String) }
299
265
  attr_accessor :currency
300
- # The ID of the product that this price will belong to.
266
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
301
267
  sig { returns(String) }
302
268
  attr_accessor :product
303
269
  # 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.
304
- sig { returns(String) }
270
+ sig { returns(T.nilable(String)) }
305
271
  attr_accessor :tax_behavior
306
272
  # 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.
307
- sig { returns(Integer) }
273
+ sig { returns(T.nilable(Integer)) }
308
274
  attr_accessor :unit_amount
309
275
  # 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.
310
- sig { returns(String) }
276
+ sig { returns(T.nilable(String)) }
311
277
  attr_accessor :unit_amount_decimal
312
278
  sig {
313
- params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void
279
+ params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
314
280
  }
315
281
  def initialize(
316
282
  currency: nil,
@@ -322,25 +288,25 @@ module Stripe
322
288
  end
323
289
  # The coupons to redeem into discounts for the item.
324
290
  sig {
325
- returns(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem::Discount])
291
+ returns(T.nilable(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem::Discount]))
326
292
  }
327
293
  attr_accessor :discounts
328
294
  # The ID of the price object. One of `price` or `price_data` is required.
329
- sig { returns(String) }
295
+ sig { returns(T.nilable(String)) }
330
296
  attr_accessor :price
331
297
  # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
332
298
  sig {
333
- returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem::PriceData)
299
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem::PriceData))
334
300
  }
335
301
  attr_accessor :price_data
336
302
  # Quantity for this item. Defaults to 1.
337
- sig { returns(Integer) }
303
+ sig { returns(T.nilable(Integer)) }
338
304
  attr_accessor :quantity
339
305
  # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
340
- sig { returns(T.nilable(T::Array[String])) }
306
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
341
307
  attr_accessor :tax_rates
342
308
  sig {
343
- params(discounts: T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem::Discount], price: String, price_data: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void
309
+ params(discounts: T.nilable(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem::Discount]), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
344
310
  }
345
311
  def initialize(
346
312
  discounts: nil,
@@ -353,12 +319,12 @@ module Stripe
353
319
  class AutomaticTax < Stripe::RequestParams
354
320
  class Liability < Stripe::RequestParams
355
321
  # The connected account being referenced when `type` is `account`.
356
- sig { returns(String) }
322
+ sig { returns(T.nilable(String)) }
357
323
  attr_accessor :account
358
324
  # Type of the account referenced in the request.
359
325
  sig { returns(String) }
360
326
  attr_accessor :type
361
- sig { params(account: String, type: String).void }
327
+ sig { params(account: T.nilable(String), type: String).void }
362
328
  def initialize(account: nil, type: nil); end
363
329
  end
364
330
  # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
@@ -366,152 +332,71 @@ module Stripe
366
332
  attr_accessor :enabled
367
333
  # 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.
368
334
  sig {
369
- returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::AutomaticTax::Liability)
335
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::AutomaticTax::Liability))
370
336
  }
371
337
  attr_accessor :liability
372
338
  sig {
373
- params(enabled: T::Boolean, liability: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::AutomaticTax::Liability).void
339
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::AutomaticTax::Liability)).void
374
340
  }
375
341
  def initialize(enabled: nil, liability: nil); end
376
342
  end
377
- class BillingThresholds < Stripe::RequestParams
378
- # Monetary threshold that triggers the subscription to advance to a new billing period
379
- sig { returns(Integer) }
380
- attr_accessor :amount_gte
381
- # 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.
382
- sig { returns(T::Boolean) }
383
- attr_accessor :reset_billing_cycle_anchor
384
- sig { params(amount_gte: Integer, reset_billing_cycle_anchor: T::Boolean).void }
385
- def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
386
- end
387
343
  class Discount < Stripe::RequestParams
388
- class DiscountEnd < Stripe::RequestParams
389
- class Duration < Stripe::RequestParams
390
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
391
- sig { returns(String) }
392
- attr_accessor :interval
393
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
394
- sig { returns(Integer) }
395
- attr_accessor :interval_count
396
- sig { params(interval: String, interval_count: Integer).void }
397
- def initialize(interval: nil, interval_count: nil); end
398
- end
399
- # Time span for the redeemed discount.
400
- sig {
401
- returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::Discount::DiscountEnd::Duration)
402
- }
403
- attr_accessor :duration
404
- # A precise Unix timestamp for the discount to end. Must be in the future.
405
- sig { returns(Integer) }
406
- attr_accessor :timestamp
407
- # The type of calculation made to determine when the discount ends.
408
- sig { returns(String) }
409
- attr_accessor :type
410
- sig {
411
- params(duration: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
412
- }
413
- def initialize(duration: nil, timestamp: nil, type: nil); end
414
- end
415
344
  # ID of the coupon to create a new discount for.
416
- sig { returns(String) }
345
+ sig { returns(T.nilable(String)) }
417
346
  attr_accessor :coupon
418
347
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
419
- sig { returns(String) }
348
+ sig { returns(T.nilable(String)) }
420
349
  attr_accessor :discount
421
- # Details to determine how long the discount should be applied for.
422
- sig {
423
- returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::Discount::DiscountEnd)
424
- }
425
- attr_accessor :discount_end
426
350
  # ID of the promotion code to create a new discount for.
427
- sig { returns(String) }
351
+ sig { returns(T.nilable(String)) }
428
352
  attr_accessor :promotion_code
429
353
  sig {
430
- params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::Discount::DiscountEnd, promotion_code: String).void
354
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
431
355
  }
432
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end
356
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
433
357
  end
434
358
  class InvoiceSettings < Stripe::RequestParams
435
359
  class Issuer < Stripe::RequestParams
436
360
  # The connected account being referenced when `type` is `account`.
437
- sig { returns(String) }
361
+ sig { returns(T.nilable(String)) }
438
362
  attr_accessor :account
439
363
  # Type of the account referenced in the request.
440
364
  sig { returns(String) }
441
365
  attr_accessor :type
442
- sig { params(account: String, type: String).void }
366
+ sig { params(account: T.nilable(String), type: String).void }
443
367
  def initialize(account: nil, type: nil); end
444
368
  end
445
369
  # 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.
446
- sig { returns(T.nilable(T::Array[String])) }
370
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
447
371
  attr_accessor :account_tax_ids
448
372
  # 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`.
449
- sig { returns(Integer) }
373
+ sig { returns(T.nilable(Integer)) }
450
374
  attr_accessor :days_until_due
451
375
  # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
452
376
  sig {
453
- returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::InvoiceSettings::Issuer)
377
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::InvoiceSettings::Issuer))
454
378
  }
455
379
  attr_accessor :issuer
456
380
  sig {
457
- params(account_tax_ids: T.nilable(T::Array[String]), days_until_due: Integer, issuer: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::InvoiceSettings::Issuer).void
381
+ params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), days_until_due: T.nilable(Integer), issuer: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::InvoiceSettings::Issuer)).void
458
382
  }
459
383
  def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
460
384
  end
461
385
  class Item < Stripe::RequestParams
462
- class BillingThresholds < Stripe::RequestParams
463
- # 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))
464
- sig { returns(Integer) }
465
- attr_accessor :usage_gte
466
- sig { params(usage_gte: Integer).void }
467
- def initialize(usage_gte: nil); end
468
- end
469
386
  class Discount < Stripe::RequestParams
470
- class DiscountEnd < Stripe::RequestParams
471
- class Duration < Stripe::RequestParams
472
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
473
- sig { returns(String) }
474
- attr_accessor :interval
475
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
476
- sig { returns(Integer) }
477
- attr_accessor :interval_count
478
- sig { params(interval: String, interval_count: Integer).void }
479
- def initialize(interval: nil, interval_count: nil); end
480
- end
481
- # Time span for the redeemed discount.
482
- sig {
483
- returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::Discount::DiscountEnd::Duration)
484
- }
485
- attr_accessor :duration
486
- # A precise Unix timestamp for the discount to end. Must be in the future.
487
- sig { returns(Integer) }
488
- attr_accessor :timestamp
489
- # The type of calculation made to determine when the discount ends.
490
- sig { returns(String) }
491
- attr_accessor :type
492
- sig {
493
- params(duration: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
494
- }
495
- def initialize(duration: nil, timestamp: nil, type: nil); end
496
- end
497
387
  # ID of the coupon to create a new discount for.
498
- sig { returns(String) }
388
+ sig { returns(T.nilable(String)) }
499
389
  attr_accessor :coupon
500
390
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
501
- sig { returns(String) }
391
+ sig { returns(T.nilable(String)) }
502
392
  attr_accessor :discount
503
- # Details to determine how long the discount should be applied for.
504
- sig {
505
- returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::Discount::DiscountEnd)
506
- }
507
- attr_accessor :discount_end
508
393
  # ID of the promotion code to create a new discount for.
509
- sig { returns(String) }
394
+ sig { returns(T.nilable(String)) }
510
395
  attr_accessor :promotion_code
511
396
  sig {
512
- params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::Discount::DiscountEnd, promotion_code: String).void
397
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
513
398
  }
514
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end
399
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
515
400
  end
516
401
  class PriceData < Stripe::RequestParams
517
402
  class Recurring < Stripe::RequestParams
@@ -519,15 +404,15 @@ module Stripe
519
404
  sig { returns(String) }
520
405
  attr_accessor :interval
521
406
  # 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).
522
- sig { returns(Integer) }
407
+ sig { returns(T.nilable(Integer)) }
523
408
  attr_accessor :interval_count
524
- sig { params(interval: String, interval_count: Integer).void }
409
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
525
410
  def initialize(interval: nil, interval_count: nil); end
526
411
  end
527
412
  # 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).
528
413
  sig { returns(String) }
529
414
  attr_accessor :currency
530
- # The ID of the product that this price will belong to.
415
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
531
416
  sig { returns(String) }
532
417
  attr_accessor :product
533
418
  # The recurring components of a price such as `interval` and `interval_count`.
@@ -536,16 +421,16 @@ module Stripe
536
421
  }
537
422
  attr_accessor :recurring
538
423
  # 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.
539
- sig { returns(String) }
424
+ sig { returns(T.nilable(String)) }
540
425
  attr_accessor :tax_behavior
541
426
  # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
542
- sig { returns(Integer) }
427
+ sig { returns(T.nilable(Integer)) }
543
428
  attr_accessor :unit_amount
544
429
  # 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.
545
- sig { returns(String) }
430
+ sig { returns(T.nilable(String)) }
546
431
  attr_accessor :unit_amount_decimal
547
432
  sig {
548
- params(currency: String, product: String, recurring: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void
433
+ params(currency: String, product: String, recurring: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
549
434
  }
550
435
  def initialize(
551
436
  currency: nil,
@@ -556,191 +441,133 @@ module Stripe
556
441
  unit_amount_decimal: nil
557
442
  ); end
558
443
  end
559
- class Trial < Stripe::RequestParams
560
- # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
561
- sig { returns(T::Array[String]) }
562
- attr_accessor :converts_to
563
- # Determines the type of trial for this item.
564
- sig { returns(String) }
565
- attr_accessor :type
566
- sig { params(converts_to: T::Array[String], type: String).void }
567
- def initialize(converts_to: nil, type: nil); end
568
- end
569
- # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds.
570
- sig {
571
- returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::BillingThresholds))
572
- }
573
- attr_accessor :billing_thresholds
574
444
  # The coupons to redeem into discounts for the subscription item.
575
445
  sig {
576
- returns(T.nilable(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::Discount]))
446
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::Discount]))))
577
447
  }
578
448
  attr_accessor :discounts
579
449
  # 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`.
580
- sig { returns(T::Hash[String, String]) }
450
+ sig { returns(T.nilable(T::Hash[String, String])) }
581
451
  attr_accessor :metadata
582
452
  # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
583
- sig { returns(String) }
453
+ sig { returns(T.nilable(String)) }
584
454
  attr_accessor :plan
585
455
  # The ID of the price object.
586
- sig { returns(String) }
456
+ sig { returns(T.nilable(String)) }
587
457
  attr_accessor :price
588
458
  # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
589
459
  sig {
590
- returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::PriceData)
460
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::PriceData))
591
461
  }
592
462
  attr_accessor :price_data
593
463
  # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
594
- sig { returns(Integer) }
464
+ sig { returns(T.nilable(Integer)) }
595
465
  attr_accessor :quantity
596
466
  # 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.
597
- sig { returns(T.nilable(T::Array[String])) }
467
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
598
468
  attr_accessor :tax_rates
599
- # Options that configure the trial on the subscription item.
600
- sig { returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::Trial) }
601
- attr_accessor :trial
602
469
  sig {
603
- params(billing_thresholds: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::BillingThresholds), discounts: T.nilable(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::Discount]), metadata: T::Hash[String, String], plan: String, price: String, price_data: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String]), trial: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::Trial).void
470
+ params(discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::Discount]))), metadata: T.nilable(T::Hash[String, String]), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
604
471
  }
605
472
  def initialize(
606
- billing_thresholds: nil,
607
473
  discounts: nil,
608
474
  metadata: nil,
609
475
  plan: nil,
610
476
  price: nil,
611
477
  price_data: nil,
612
478
  quantity: nil,
613
- tax_rates: nil,
614
- trial: nil
479
+ tax_rates: nil
615
480
  ); end
616
481
  end
617
- class PauseCollection < Stripe::RequestParams
618
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
619
- sig { returns(String) }
620
- attr_accessor :behavior
621
- sig { params(behavior: String).void }
622
- def initialize(behavior: nil); end
623
- end
624
482
  class TransferData < Stripe::RequestParams
625
483
  # 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.
626
- sig { returns(Float) }
484
+ sig { returns(T.nilable(Float)) }
627
485
  attr_accessor :amount_percent
628
486
  # ID of an existing, connected Stripe account.
629
487
  sig { returns(String) }
630
488
  attr_accessor :destination
631
- sig { params(amount_percent: Float, destination: String).void }
489
+ sig { params(amount_percent: T.nilable(Float), destination: String).void }
632
490
  def initialize(amount_percent: nil, destination: nil); end
633
491
  end
634
- class TrialSettings < Stripe::RequestParams
635
- class EndBehavior < Stripe::RequestParams
636
- # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
637
- sig { returns(String) }
638
- attr_accessor :prorate_up_front
639
- sig { params(prorate_up_front: String).void }
640
- def initialize(prorate_up_front: nil); end
641
- end
642
- # Defines how the subscription should behave when a trial ends.
643
- sig {
644
- returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::TrialSettings::EndBehavior)
645
- }
646
- attr_accessor :end_behavior
647
- sig {
648
- params(end_behavior: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::TrialSettings::EndBehavior).void
649
- }
650
- def initialize(end_behavior: nil); end
651
- end
652
492
  # 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.
653
493
  sig {
654
- returns(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem])
494
+ returns(T.nilable(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem]))
655
495
  }
656
496
  attr_accessor :add_invoice_items
657
497
  # 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).
658
- sig { returns(Float) }
498
+ sig { returns(T.nilable(Float)) }
659
499
  attr_accessor :application_fee_percent
660
500
  # Automatic tax settings for this phase.
661
- sig { returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::AutomaticTax) }
501
+ sig {
502
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::AutomaticTax))
503
+ }
662
504
  attr_accessor :automatic_tax
663
505
  # 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).
664
- sig { returns(String) }
506
+ sig { returns(T.nilable(String)) }
665
507
  attr_accessor :billing_cycle_anchor
666
- # 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.
667
- sig {
668
- returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::BillingThresholds))
669
- }
670
- attr_accessor :billing_thresholds
671
508
  # 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.
672
- sig { returns(String) }
509
+ sig { returns(T.nilable(String)) }
673
510
  attr_accessor :collection_method
674
- # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.
675
- sig { returns(String) }
676
- attr_accessor :coupon
677
511
  # 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).
678
- sig { returns(String) }
512
+ sig { returns(T.nilable(String)) }
679
513
  attr_accessor :currency
680
514
  # 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.
681
- sig { returns(String) }
515
+ sig { returns(T.nilable(String)) }
682
516
  attr_accessor :default_payment_method
683
517
  # 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.
684
- sig { returns(T.nilable(T::Array[String])) }
518
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
685
519
  attr_accessor :default_tax_rates
686
520
  # 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.
687
- sig { returns(T.nilable(String)) }
521
+ sig { returns(T.nilable(T.nilable(String))) }
688
522
  attr_accessor :description
689
523
  # 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.
690
524
  sig {
691
- returns(T.nilable(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Discount]))
525
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Discount]))))
692
526
  }
693
527
  attr_accessor :discounts
694
528
  # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
695
- sig { returns(Integer) }
529
+ sig { returns(T.nilable(Integer)) }
696
530
  attr_accessor :end_date
697
531
  # All invoices will be billed using the specified settings.
698
- sig { returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::InvoiceSettings) }
532
+ sig {
533
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::InvoiceSettings))
534
+ }
699
535
  attr_accessor :invoice_settings
700
536
  # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
701
537
  sig { returns(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item]) }
702
538
  attr_accessor :items
703
539
  # 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.
704
- sig { returns(Integer) }
540
+ sig { returns(T.nilable(Integer)) }
705
541
  attr_accessor :iterations
706
542
  # 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`.
707
- sig { returns(T::Hash[String, String]) }
543
+ sig { returns(T.nilable(T::Hash[String, String])) }
708
544
  attr_accessor :metadata
709
545
  # The account on behalf of which to charge, for each of the associated subscription's invoices.
710
- sig { returns(String) }
546
+ sig { returns(T.nilable(String)) }
711
547
  attr_accessor :on_behalf_of
712
- # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
713
- sig { returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::PauseCollection) }
714
- attr_accessor :pause_collection
715
548
  # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase.
716
- sig { returns(String) }
549
+ sig { returns(T.nilable(String)) }
717
550
  attr_accessor :proration_behavior
718
551
  # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
719
- sig { returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::TransferData) }
552
+ sig {
553
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::TransferData))
554
+ }
720
555
  attr_accessor :transfer_data
721
556
  # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
722
- sig { returns(T::Boolean) }
557
+ sig { returns(T.nilable(T::Boolean)) }
723
558
  attr_accessor :trial
724
- # Specify trial behavior when crossing phase boundaries
725
- sig { returns(String) }
726
- attr_accessor :trial_continuation
727
559
  # 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`
728
- sig { returns(Integer) }
560
+ sig { returns(T.nilable(Integer)) }
729
561
  attr_accessor :trial_end
730
- # Settings related to subscription trials.
731
- sig { returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::TrialSettings) }
732
- attr_accessor :trial_settings
733
562
  sig {
734
- params(add_invoice_items: T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem], application_fee_percent: Float, automatic_tax: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::AutomaticTax, billing_cycle_anchor: String, billing_thresholds: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::BillingThresholds), collection_method: String, coupon: String, currency: String, default_payment_method: String, default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), discounts: T.nilable(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Discount]), end_date: Integer, invoice_settings: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::InvoiceSettings, items: T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item], iterations: Integer, metadata: T::Hash[String, String], on_behalf_of: String, pause_collection: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::PauseCollection, proration_behavior: String, transfer_data: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::TransferData, trial: T::Boolean, trial_continuation: String, trial_end: Integer, trial_settings: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::TrialSettings).void
563
+ params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem]), application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::AutomaticTax), billing_cycle_anchor: T.nilable(String), collection_method: T.nilable(String), currency: T.nilable(String), default_payment_method: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Discount]))), end_date: T.nilable(Integer), invoice_settings: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::InvoiceSettings), items: T::Array[::Stripe::SubscriptionScheduleService::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::SubscriptionScheduleService::CreateParams::Phase::TransferData), trial: T.nilable(T::Boolean), trial_end: T.nilable(Integer)).void
735
564
  }
736
565
  def initialize(
737
566
  add_invoice_items: nil,
738
567
  application_fee_percent: nil,
739
568
  automatic_tax: nil,
740
569
  billing_cycle_anchor: nil,
741
- billing_thresholds: nil,
742
570
  collection_method: nil,
743
- coupon: nil,
744
571
  currency: nil,
745
572
  default_payment_method: nil,
746
573
  default_tax_rates: nil,
@@ -752,60 +579,44 @@ module Stripe
752
579
  iterations: nil,
753
580
  metadata: nil,
754
581
  on_behalf_of: nil,
755
- pause_collection: nil,
756
582
  proration_behavior: nil,
757
583
  transfer_data: nil,
758
584
  trial: nil,
759
- trial_continuation: nil,
760
- trial_end: nil,
761
- trial_settings: nil
585
+ trial_end: nil
762
586
  ); end
763
587
  end
764
- class Prebilling < Stripe::RequestParams
765
- # This is used to determine the number of billing cycles to prebill.
766
- sig { returns(Integer) }
767
- attr_accessor :iterations
768
- # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
769
- sig { returns(String) }
770
- attr_accessor :update_behavior
771
- sig { params(iterations: Integer, update_behavior: String).void }
772
- def initialize(iterations: nil, update_behavior: nil); end
773
- end
774
- # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
775
- sig { returns(String) }
776
- attr_accessor :billing_behavior
777
588
  # The identifier of the customer to create the subscription schedule for.
778
- sig { returns(String) }
589
+ sig { returns(T.nilable(String)) }
779
590
  attr_accessor :customer
780
591
  # Object representing the subscription schedule's default settings.
781
- sig { returns(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings) }
592
+ sig {
593
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings))
594
+ }
782
595
  attr_accessor :default_settings
783
596
  # 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.
784
- sig { returns(String) }
597
+ sig { returns(T.nilable(String)) }
785
598
  attr_accessor :end_behavior
786
599
  # Specifies which fields in the response should be expanded.
787
- sig { returns(T::Array[String]) }
600
+ sig { returns(T.nilable(T::Array[String])) }
788
601
  attr_accessor :expand
789
602
  # 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.
790
- sig { returns(String) }
603
+ sig { returns(T.nilable(String)) }
791
604
  attr_accessor :from_subscription
792
605
  # 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`.
793
- sig { returns(T.nilable(T::Hash[String, String])) }
606
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
794
607
  attr_accessor :metadata
795
608
  # 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.
796
- sig { returns(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase]) }
609
+ sig {
610
+ returns(T.nilable(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase]))
611
+ }
797
612
  attr_accessor :phases
798
- # If specified, the invoicing for the given billing cycle iterations will be processed now.
799
- sig { returns(::Stripe::SubscriptionScheduleService::CreateParams::Prebilling) }
800
- attr_accessor :prebilling
801
613
  # 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.
802
- sig { returns(T.any(Integer, String)) }
614
+ sig { returns(T.nilable(T.any(Integer, String))) }
803
615
  attr_accessor :start_date
804
616
  sig {
805
- params(billing_behavior: String, customer: String, default_settings: ::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings, end_behavior: String, expand: T::Array[String], from_subscription: String, metadata: T.nilable(T::Hash[String, String]), phases: T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase], prebilling: ::Stripe::SubscriptionScheduleService::CreateParams::Prebilling, start_date: T.any(Integer, String)).void
617
+ params(customer: T.nilable(String), default_settings: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings), end_behavior: T.nilable(String), expand: T.nilable(T::Array[String]), from_subscription: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), phases: T.nilable(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase]), start_date: T.nilable(T.any(Integer, String))).void
806
618
  }
807
619
  def initialize(
808
- billing_behavior: nil,
809
620
  customer: nil,
810
621
  default_settings: nil,
811
622
  end_behavior: nil,
@@ -813,15 +624,14 @@ module Stripe
813
624
  from_subscription: nil,
814
625
  metadata: nil,
815
626
  phases: nil,
816
- prebilling: nil,
817
627
  start_date: nil
818
628
  ); end
819
629
  end
820
630
  class RetrieveParams < Stripe::RequestParams
821
631
  # Specifies which fields in the response should be expanded.
822
- sig { returns(T::Array[String]) }
632
+ sig { returns(T.nilable(T::Array[String])) }
823
633
  attr_accessor :expand
824
- sig { params(expand: T::Array[String]).void }
634
+ sig { params(expand: T.nilable(T::Array[String])).void }
825
635
  def initialize(expand: nil); end
826
636
  end
827
637
  class UpdateParams < Stripe::RequestParams
@@ -829,12 +639,12 @@ module Stripe
829
639
  class AutomaticTax < Stripe::RequestParams
830
640
  class Liability < Stripe::RequestParams
831
641
  # The connected account being referenced when `type` is `account`.
832
- sig { returns(String) }
642
+ sig { returns(T.nilable(String)) }
833
643
  attr_accessor :account
834
644
  # Type of the account referenced in the request.
835
645
  sig { returns(String) }
836
646
  attr_accessor :type
837
- sig { params(account: String, type: String).void }
647
+ sig { params(account: T.nilable(String), type: String).void }
838
648
  def initialize(account: nil, type: nil); end
839
649
  end
840
650
  # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
@@ -842,107 +652,91 @@ module Stripe
842
652
  attr_accessor :enabled
843
653
  # 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.
844
654
  sig {
845
- returns(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::AutomaticTax::Liability)
655
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::AutomaticTax::Liability))
846
656
  }
847
657
  attr_accessor :liability
848
658
  sig {
849
- params(enabled: T::Boolean, liability: ::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::AutomaticTax::Liability).void
659
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::AutomaticTax::Liability)).void
850
660
  }
851
661
  def initialize(enabled: nil, liability: nil); end
852
662
  end
853
- class BillingThresholds < Stripe::RequestParams
854
- # Monetary threshold that triggers the subscription to advance to a new billing period
855
- sig { returns(Integer) }
856
- attr_accessor :amount_gte
857
- # 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.
858
- sig { returns(T::Boolean) }
859
- attr_accessor :reset_billing_cycle_anchor
860
- sig { params(amount_gte: Integer, reset_billing_cycle_anchor: T::Boolean).void }
861
- def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
862
- end
863
663
  class InvoiceSettings < Stripe::RequestParams
864
664
  class Issuer < Stripe::RequestParams
865
665
  # The connected account being referenced when `type` is `account`.
866
- sig { returns(String) }
666
+ sig { returns(T.nilable(String)) }
867
667
  attr_accessor :account
868
668
  # Type of the account referenced in the request.
869
669
  sig { returns(String) }
870
670
  attr_accessor :type
871
- sig { params(account: String, type: String).void }
671
+ sig { params(account: T.nilable(String), type: String).void }
872
672
  def initialize(account: nil, type: nil); end
873
673
  end
874
674
  # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule.
875
- sig { returns(T.nilable(T::Array[String])) }
675
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
876
676
  attr_accessor :account_tax_ids
877
677
  # 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`.
878
- sig { returns(Integer) }
678
+ sig { returns(T.nilable(Integer)) }
879
679
  attr_accessor :days_until_due
880
680
  # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
881
681
  sig {
882
- returns(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::InvoiceSettings::Issuer)
682
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::InvoiceSettings::Issuer))
883
683
  }
884
684
  attr_accessor :issuer
885
685
  sig {
886
- params(account_tax_ids: T.nilable(T::Array[String]), days_until_due: Integer, issuer: ::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::InvoiceSettings::Issuer).void
686
+ params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), days_until_due: T.nilable(Integer), issuer: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::InvoiceSettings::Issuer)).void
887
687
  }
888
688
  def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
889
689
  end
890
690
  class TransferData < Stripe::RequestParams
891
691
  # 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.
892
- sig { returns(Float) }
692
+ sig { returns(T.nilable(Float)) }
893
693
  attr_accessor :amount_percent
894
694
  # ID of an existing, connected Stripe account.
895
695
  sig { returns(String) }
896
696
  attr_accessor :destination
897
- sig { params(amount_percent: Float, destination: String).void }
697
+ sig { params(amount_percent: T.nilable(Float), destination: String).void }
898
698
  def initialize(amount_percent: nil, destination: nil); end
899
699
  end
900
700
  # 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).
901
- sig { returns(Float) }
701
+ sig { returns(T.nilable(Float)) }
902
702
  attr_accessor :application_fee_percent
903
703
  # Default settings for automatic tax computation.
904
704
  sig {
905
- returns(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::AutomaticTax)
705
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::AutomaticTax))
906
706
  }
907
707
  attr_accessor :automatic_tax
908
708
  # 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).
909
- sig { returns(String) }
709
+ sig { returns(T.nilable(String)) }
910
710
  attr_accessor :billing_cycle_anchor
911
- # 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.
912
- sig {
913
- returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::BillingThresholds))
914
- }
915
- attr_accessor :billing_thresholds
916
711
  # 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.
917
- sig { returns(String) }
712
+ sig { returns(T.nilable(String)) }
918
713
  attr_accessor :collection_method
919
714
  # 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.
920
- sig { returns(String) }
715
+ sig { returns(T.nilable(String)) }
921
716
  attr_accessor :default_payment_method
922
717
  # 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.
923
- sig { returns(T.nilable(String)) }
718
+ sig { returns(T.nilable(T.nilable(String))) }
924
719
  attr_accessor :description
925
720
  # All invoices will be billed using the specified settings.
926
721
  sig {
927
- returns(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::InvoiceSettings)
722
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::InvoiceSettings))
928
723
  }
929
724
  attr_accessor :invoice_settings
930
725
  # The account on behalf of which to charge, for each of the associated subscription's invoices.
931
- sig { returns(T.nilable(String)) }
726
+ sig { returns(T.nilable(T.nilable(String))) }
932
727
  attr_accessor :on_behalf_of
933
728
  # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
934
729
  sig {
935
- returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::TransferData))
730
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::TransferData))))
936
731
  }
937
732
  attr_accessor :transfer_data
938
733
  sig {
939
- params(application_fee_percent: Float, automatic_tax: ::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::AutomaticTax, billing_cycle_anchor: String, billing_thresholds: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::BillingThresholds), collection_method: String, default_payment_method: String, description: T.nilable(String), invoice_settings: ::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::InvoiceSettings, on_behalf_of: T.nilable(String), transfer_data: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::TransferData)).void
734
+ params(application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::AutomaticTax), billing_cycle_anchor: T.nilable(String), collection_method: T.nilable(String), default_payment_method: T.nilable(String), description: T.nilable(T.nilable(String)), invoice_settings: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::InvoiceSettings), on_behalf_of: T.nilable(T.nilable(String)), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::TransferData)))).void
940
735
  }
941
736
  def initialize(
942
737
  application_fee_percent: nil,
943
738
  automatic_tax: nil,
944
739
  billing_cycle_anchor: nil,
945
- billing_thresholds: nil,
946
740
  collection_method: nil,
947
741
  default_payment_method: nil,
948
742
  description: nil,
@@ -954,70 +748,38 @@ module Stripe
954
748
  class Phase < Stripe::RequestParams
955
749
  class AddInvoiceItem < Stripe::RequestParams
956
750
  class Discount < Stripe::RequestParams
957
- class DiscountEnd < Stripe::RequestParams
958
- class Duration < Stripe::RequestParams
959
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
960
- sig { returns(String) }
961
- attr_accessor :interval
962
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
963
- sig { returns(Integer) }
964
- attr_accessor :interval_count
965
- sig { params(interval: String, interval_count: Integer).void }
966
- def initialize(interval: nil, interval_count: nil); end
967
- end
968
- # Time span for the redeemed discount.
969
- sig {
970
- returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem::Discount::DiscountEnd::Duration)
971
- }
972
- attr_accessor :duration
973
- # A precise Unix timestamp for the discount to end. Must be in the future.
974
- sig { returns(Integer) }
975
- attr_accessor :timestamp
976
- # The type of calculation made to determine when the discount ends.
977
- sig { returns(String) }
978
- attr_accessor :type
979
- sig {
980
- params(duration: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
981
- }
982
- def initialize(duration: nil, timestamp: nil, type: nil); end
983
- end
984
751
  # ID of the coupon to create a new discount for.
985
- sig { returns(String) }
752
+ sig { returns(T.nilable(String)) }
986
753
  attr_accessor :coupon
987
754
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
988
- sig { returns(String) }
755
+ sig { returns(T.nilable(String)) }
989
756
  attr_accessor :discount
990
- # Details to determine how long the discount should be applied for.
991
- sig {
992
- returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem::Discount::DiscountEnd)
993
- }
994
- attr_accessor :discount_end
995
757
  # ID of the promotion code to create a new discount for.
996
- sig { returns(String) }
758
+ sig { returns(T.nilable(String)) }
997
759
  attr_accessor :promotion_code
998
760
  sig {
999
- params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem::Discount::DiscountEnd, promotion_code: String).void
761
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
1000
762
  }
1001
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end
763
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
1002
764
  end
1003
765
  class PriceData < Stripe::RequestParams
1004
766
  # 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).
1005
767
  sig { returns(String) }
1006
768
  attr_accessor :currency
1007
- # The ID of the product that this price will belong to.
769
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
1008
770
  sig { returns(String) }
1009
771
  attr_accessor :product
1010
772
  # 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.
1011
- sig { returns(String) }
773
+ sig { returns(T.nilable(String)) }
1012
774
  attr_accessor :tax_behavior
1013
775
  # 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.
1014
- sig { returns(Integer) }
776
+ sig { returns(T.nilable(Integer)) }
1015
777
  attr_accessor :unit_amount
1016
778
  # 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.
1017
- sig { returns(String) }
779
+ sig { returns(T.nilable(String)) }
1018
780
  attr_accessor :unit_amount_decimal
1019
781
  sig {
1020
- params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void
782
+ params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
1021
783
  }
1022
784
  def initialize(
1023
785
  currency: nil,
@@ -1029,25 +791,25 @@ module Stripe
1029
791
  end
1030
792
  # The coupons to redeem into discounts for the item.
1031
793
  sig {
1032
- returns(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem::Discount])
794
+ returns(T.nilable(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem::Discount]))
1033
795
  }
1034
796
  attr_accessor :discounts
1035
797
  # The ID of the price object. One of `price` or `price_data` is required.
1036
- sig { returns(String) }
798
+ sig { returns(T.nilable(String)) }
1037
799
  attr_accessor :price
1038
800
  # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
1039
801
  sig {
1040
- returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem::PriceData)
802
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem::PriceData))
1041
803
  }
1042
804
  attr_accessor :price_data
1043
805
  # Quantity for this item. Defaults to 1.
1044
- sig { returns(Integer) }
806
+ sig { returns(T.nilable(Integer)) }
1045
807
  attr_accessor :quantity
1046
808
  # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
1047
- sig { returns(T.nilable(T::Array[String])) }
809
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
1048
810
  attr_accessor :tax_rates
1049
811
  sig {
1050
- params(discounts: T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem::Discount], price: String, price_data: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void
812
+ params(discounts: T.nilable(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem::Discount]), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
1051
813
  }
1052
814
  def initialize(
1053
815
  discounts: nil,
@@ -1060,12 +822,12 @@ module Stripe
1060
822
  class AutomaticTax < Stripe::RequestParams
1061
823
  class Liability < Stripe::RequestParams
1062
824
  # The connected account being referenced when `type` is `account`.
1063
- sig { returns(String) }
825
+ sig { returns(T.nilable(String)) }
1064
826
  attr_accessor :account
1065
827
  # Type of the account referenced in the request.
1066
828
  sig { returns(String) }
1067
829
  attr_accessor :type
1068
- sig { params(account: String, type: String).void }
830
+ sig { params(account: T.nilable(String), type: String).void }
1069
831
  def initialize(account: nil, type: nil); end
1070
832
  end
1071
833
  # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
@@ -1073,152 +835,71 @@ module Stripe
1073
835
  attr_accessor :enabled
1074
836
  # 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.
1075
837
  sig {
1076
- returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AutomaticTax::Liability)
838
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AutomaticTax::Liability))
1077
839
  }
1078
840
  attr_accessor :liability
1079
841
  sig {
1080
- params(enabled: T::Boolean, liability: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AutomaticTax::Liability).void
842
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AutomaticTax::Liability)).void
1081
843
  }
1082
844
  def initialize(enabled: nil, liability: nil); end
1083
845
  end
1084
- class BillingThresholds < Stripe::RequestParams
1085
- # Monetary threshold that triggers the subscription to advance to a new billing period
1086
- sig { returns(Integer) }
1087
- attr_accessor :amount_gte
1088
- # 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.
1089
- sig { returns(T::Boolean) }
1090
- attr_accessor :reset_billing_cycle_anchor
1091
- sig { params(amount_gte: Integer, reset_billing_cycle_anchor: T::Boolean).void }
1092
- def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
1093
- end
1094
846
  class Discount < Stripe::RequestParams
1095
- class DiscountEnd < Stripe::RequestParams
1096
- class Duration < Stripe::RequestParams
1097
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1098
- sig { returns(String) }
1099
- attr_accessor :interval
1100
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1101
- sig { returns(Integer) }
1102
- attr_accessor :interval_count
1103
- sig { params(interval: String, interval_count: Integer).void }
1104
- def initialize(interval: nil, interval_count: nil); end
1105
- end
1106
- # Time span for the redeemed discount.
1107
- sig {
1108
- returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Discount::DiscountEnd::Duration)
1109
- }
1110
- attr_accessor :duration
1111
- # A precise Unix timestamp for the discount to end. Must be in the future.
1112
- sig { returns(Integer) }
1113
- attr_accessor :timestamp
1114
- # The type of calculation made to determine when the discount ends.
1115
- sig { returns(String) }
1116
- attr_accessor :type
1117
- sig {
1118
- params(duration: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
1119
- }
1120
- def initialize(duration: nil, timestamp: nil, type: nil); end
1121
- end
1122
847
  # ID of the coupon to create a new discount for.
1123
- sig { returns(String) }
848
+ sig { returns(T.nilable(String)) }
1124
849
  attr_accessor :coupon
1125
850
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
1126
- sig { returns(String) }
851
+ sig { returns(T.nilable(String)) }
1127
852
  attr_accessor :discount
1128
- # Details to determine how long the discount should be applied for.
1129
- sig {
1130
- returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Discount::DiscountEnd)
1131
- }
1132
- attr_accessor :discount_end
1133
853
  # ID of the promotion code to create a new discount for.
1134
- sig { returns(String) }
854
+ sig { returns(T.nilable(String)) }
1135
855
  attr_accessor :promotion_code
1136
856
  sig {
1137
- params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Discount::DiscountEnd, promotion_code: String).void
857
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
1138
858
  }
1139
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end
859
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
1140
860
  end
1141
861
  class InvoiceSettings < Stripe::RequestParams
1142
862
  class Issuer < Stripe::RequestParams
1143
863
  # The connected account being referenced when `type` is `account`.
1144
- sig { returns(String) }
864
+ sig { returns(T.nilable(String)) }
1145
865
  attr_accessor :account
1146
866
  # Type of the account referenced in the request.
1147
867
  sig { returns(String) }
1148
868
  attr_accessor :type
1149
- sig { params(account: String, type: String).void }
869
+ sig { params(account: T.nilable(String), type: String).void }
1150
870
  def initialize(account: nil, type: nil); end
1151
871
  end
1152
872
  # 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.
1153
- sig { returns(T.nilable(T::Array[String])) }
873
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
1154
874
  attr_accessor :account_tax_ids
1155
875
  # 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`.
1156
- sig { returns(Integer) }
876
+ sig { returns(T.nilable(Integer)) }
1157
877
  attr_accessor :days_until_due
1158
878
  # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
1159
879
  sig {
1160
- returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::InvoiceSettings::Issuer)
880
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::InvoiceSettings::Issuer))
1161
881
  }
1162
882
  attr_accessor :issuer
1163
883
  sig {
1164
- params(account_tax_ids: T.nilable(T::Array[String]), days_until_due: Integer, issuer: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::InvoiceSettings::Issuer).void
884
+ params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), days_until_due: T.nilable(Integer), issuer: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::InvoiceSettings::Issuer)).void
1165
885
  }
1166
886
  def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
1167
887
  end
1168
888
  class Item < Stripe::RequestParams
1169
- class BillingThresholds < Stripe::RequestParams
1170
- # 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))
1171
- sig { returns(Integer) }
1172
- attr_accessor :usage_gte
1173
- sig { params(usage_gte: Integer).void }
1174
- def initialize(usage_gte: nil); end
1175
- end
1176
889
  class Discount < Stripe::RequestParams
1177
- class DiscountEnd < Stripe::RequestParams
1178
- class Duration < Stripe::RequestParams
1179
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1180
- sig { returns(String) }
1181
- attr_accessor :interval
1182
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1183
- sig { returns(Integer) }
1184
- attr_accessor :interval_count
1185
- sig { params(interval: String, interval_count: Integer).void }
1186
- def initialize(interval: nil, interval_count: nil); end
1187
- end
1188
- # Time span for the redeemed discount.
1189
- sig {
1190
- returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::Discount::DiscountEnd::Duration)
1191
- }
1192
- attr_accessor :duration
1193
- # A precise Unix timestamp for the discount to end. Must be in the future.
1194
- sig { returns(Integer) }
1195
- attr_accessor :timestamp
1196
- # The type of calculation made to determine when the discount ends.
1197
- sig { returns(String) }
1198
- attr_accessor :type
1199
- sig {
1200
- params(duration: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
1201
- }
1202
- def initialize(duration: nil, timestamp: nil, type: nil); end
1203
- end
1204
890
  # ID of the coupon to create a new discount for.
1205
- sig { returns(String) }
891
+ sig { returns(T.nilable(String)) }
1206
892
  attr_accessor :coupon
1207
893
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
1208
- sig { returns(String) }
894
+ sig { returns(T.nilable(String)) }
1209
895
  attr_accessor :discount
1210
- # Details to determine how long the discount should be applied for.
1211
- sig {
1212
- returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::Discount::DiscountEnd)
1213
- }
1214
- attr_accessor :discount_end
1215
896
  # ID of the promotion code to create a new discount for.
1216
- sig { returns(String) }
897
+ sig { returns(T.nilable(String)) }
1217
898
  attr_accessor :promotion_code
1218
899
  sig {
1219
- params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::Discount::DiscountEnd, promotion_code: String).void
900
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
1220
901
  }
1221
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end
902
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
1222
903
  end
1223
904
  class PriceData < Stripe::RequestParams
1224
905
  class Recurring < Stripe::RequestParams
@@ -1226,15 +907,15 @@ module Stripe
1226
907
  sig { returns(String) }
1227
908
  attr_accessor :interval
1228
909
  # 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).
1229
- sig { returns(Integer) }
910
+ sig { returns(T.nilable(Integer)) }
1230
911
  attr_accessor :interval_count
1231
- sig { params(interval: String, interval_count: Integer).void }
912
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
1232
913
  def initialize(interval: nil, interval_count: nil); end
1233
914
  end
1234
915
  # 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).
1235
916
  sig { returns(String) }
1236
917
  attr_accessor :currency
1237
- # The ID of the product that this price will belong to.
918
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
1238
919
  sig { returns(String) }
1239
920
  attr_accessor :product
1240
921
  # The recurring components of a price such as `interval` and `interval_count`.
@@ -1243,16 +924,16 @@ module Stripe
1243
924
  }
1244
925
  attr_accessor :recurring
1245
926
  # 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.
1246
- sig { returns(String) }
927
+ sig { returns(T.nilable(String)) }
1247
928
  attr_accessor :tax_behavior
1248
929
  # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
1249
- sig { returns(Integer) }
930
+ sig { returns(T.nilable(Integer)) }
1250
931
  attr_accessor :unit_amount
1251
932
  # 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.
1252
- sig { returns(String) }
933
+ sig { returns(T.nilable(String)) }
1253
934
  attr_accessor :unit_amount_decimal
1254
935
  sig {
1255
- params(currency: String, product: String, recurring: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void
936
+ params(currency: String, product: String, recurring: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
1256
937
  }
1257
938
  def initialize(
1258
939
  currency: nil,
@@ -1263,194 +944,136 @@ module Stripe
1263
944
  unit_amount_decimal: nil
1264
945
  ); end
1265
946
  end
1266
- class Trial < Stripe::RequestParams
1267
- # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
1268
- sig { returns(T::Array[String]) }
1269
- attr_accessor :converts_to
1270
- # Determines the type of trial for this item.
1271
- sig { returns(String) }
1272
- attr_accessor :type
1273
- sig { params(converts_to: T::Array[String], type: String).void }
1274
- def initialize(converts_to: nil, type: nil); end
1275
- end
1276
- # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds.
1277
- sig {
1278
- returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::BillingThresholds))
1279
- }
1280
- attr_accessor :billing_thresholds
1281
947
  # The coupons to redeem into discounts for the subscription item.
1282
948
  sig {
1283
- returns(T.nilable(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::Discount]))
949
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::Discount]))))
1284
950
  }
1285
951
  attr_accessor :discounts
1286
952
  # 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`.
1287
- sig { returns(T::Hash[String, String]) }
953
+ sig { returns(T.nilable(T::Hash[String, String])) }
1288
954
  attr_accessor :metadata
1289
955
  # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
1290
- sig { returns(String) }
956
+ sig { returns(T.nilable(String)) }
1291
957
  attr_accessor :plan
1292
958
  # The ID of the price object.
1293
- sig { returns(String) }
959
+ sig { returns(T.nilable(String)) }
1294
960
  attr_accessor :price
1295
961
  # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
1296
962
  sig {
1297
- returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::PriceData)
963
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::PriceData))
1298
964
  }
1299
965
  attr_accessor :price_data
1300
966
  # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
1301
- sig { returns(Integer) }
967
+ sig { returns(T.nilable(Integer)) }
1302
968
  attr_accessor :quantity
1303
969
  # 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.
1304
- sig { returns(T.nilable(T::Array[String])) }
970
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
1305
971
  attr_accessor :tax_rates
1306
- # Options that configure the trial on the subscription item.
1307
- sig { returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::Trial) }
1308
- attr_accessor :trial
1309
972
  sig {
1310
- params(billing_thresholds: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::BillingThresholds), discounts: T.nilable(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::Discount]), metadata: T::Hash[String, String], plan: String, price: String, price_data: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String]), trial: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::Trial).void
973
+ params(discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::Discount]))), metadata: T.nilable(T::Hash[String, String]), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
1311
974
  }
1312
975
  def initialize(
1313
- billing_thresholds: nil,
1314
976
  discounts: nil,
1315
977
  metadata: nil,
1316
978
  plan: nil,
1317
979
  price: nil,
1318
980
  price_data: nil,
1319
981
  quantity: nil,
1320
- tax_rates: nil,
1321
- trial: nil
982
+ tax_rates: nil
1322
983
  ); end
1323
984
  end
1324
- class PauseCollection < Stripe::RequestParams
1325
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
1326
- sig { returns(String) }
1327
- attr_accessor :behavior
1328
- sig { params(behavior: String).void }
1329
- def initialize(behavior: nil); end
1330
- end
1331
985
  class TransferData < Stripe::RequestParams
1332
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 destination account. By default, the entire amount is transferred to the destination.
1333
- sig { returns(Float) }
987
+ sig { returns(T.nilable(Float)) }
1334
988
  attr_accessor :amount_percent
1335
989
  # ID of an existing, connected Stripe account.
1336
990
  sig { returns(String) }
1337
991
  attr_accessor :destination
1338
- sig { params(amount_percent: Float, destination: String).void }
992
+ sig { params(amount_percent: T.nilable(Float), destination: String).void }
1339
993
  def initialize(amount_percent: nil, destination: nil); end
1340
994
  end
1341
- class TrialSettings < Stripe::RequestParams
1342
- class EndBehavior < Stripe::RequestParams
1343
- # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
1344
- sig { returns(String) }
1345
- attr_accessor :prorate_up_front
1346
- sig { params(prorate_up_front: String).void }
1347
- def initialize(prorate_up_front: nil); end
1348
- end
1349
- # Defines how the subscription should behave when a trial ends.
1350
- sig {
1351
- returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::TrialSettings::EndBehavior)
1352
- }
1353
- attr_accessor :end_behavior
1354
- sig {
1355
- params(end_behavior: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::TrialSettings::EndBehavior).void
1356
- }
1357
- def initialize(end_behavior: nil); end
1358
- end
1359
995
  # 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.
1360
996
  sig {
1361
- returns(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem])
997
+ returns(T.nilable(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem]))
1362
998
  }
1363
999
  attr_accessor :add_invoice_items
1364
1000
  # 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).
1365
- sig { returns(Float) }
1001
+ sig { returns(T.nilable(Float)) }
1366
1002
  attr_accessor :application_fee_percent
1367
1003
  # Automatic tax settings for this phase.
1368
- sig { returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AutomaticTax) }
1004
+ sig {
1005
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AutomaticTax))
1006
+ }
1369
1007
  attr_accessor :automatic_tax
1370
1008
  # 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).
1371
- sig { returns(String) }
1009
+ sig { returns(T.nilable(String)) }
1372
1010
  attr_accessor :billing_cycle_anchor
1373
- # 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.
1374
- sig {
1375
- returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::BillingThresholds))
1376
- }
1377
- attr_accessor :billing_thresholds
1378
1011
  # 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.
1379
- sig { returns(String) }
1012
+ sig { returns(T.nilable(String)) }
1380
1013
  attr_accessor :collection_method
1381
- # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.
1382
- sig { returns(String) }
1383
- attr_accessor :coupon
1384
1014
  # 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).
1385
- sig { returns(String) }
1015
+ sig { returns(T.nilable(String)) }
1386
1016
  attr_accessor :currency
1387
1017
  # 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.
1388
- sig { returns(String) }
1018
+ sig { returns(T.nilable(String)) }
1389
1019
  attr_accessor :default_payment_method
1390
1020
  # 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.
1391
- sig { returns(T.nilable(T::Array[String])) }
1021
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
1392
1022
  attr_accessor :default_tax_rates
1393
1023
  # 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.
1394
- sig { returns(T.nilable(String)) }
1024
+ sig { returns(T.nilable(T.nilable(String))) }
1395
1025
  attr_accessor :description
1396
1026
  # 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.
1397
1027
  sig {
1398
- returns(T.nilable(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Discount]))
1028
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Discount]))))
1399
1029
  }
1400
1030
  attr_accessor :discounts
1401
1031
  # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
1402
- sig { returns(T.any(Integer, String)) }
1032
+ sig { returns(T.nilable(T.any(Integer, String))) }
1403
1033
  attr_accessor :end_date
1404
1034
  # All invoices will be billed using the specified settings.
1405
- sig { returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::InvoiceSettings) }
1035
+ sig {
1036
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::InvoiceSettings))
1037
+ }
1406
1038
  attr_accessor :invoice_settings
1407
1039
  # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
1408
1040
  sig { returns(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item]) }
1409
1041
  attr_accessor :items
1410
1042
  # 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.
1411
- sig { returns(Integer) }
1043
+ sig { returns(T.nilable(Integer)) }
1412
1044
  attr_accessor :iterations
1413
1045
  # 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`.
1414
- sig { returns(T::Hash[String, String]) }
1046
+ sig { returns(T.nilable(T::Hash[String, String])) }
1415
1047
  attr_accessor :metadata
1416
1048
  # The account on behalf of which to charge, for each of the associated subscription's invoices.
1417
- sig { returns(String) }
1049
+ sig { returns(T.nilable(String)) }
1418
1050
  attr_accessor :on_behalf_of
1419
- # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
1420
- sig { returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::PauseCollection) }
1421
- attr_accessor :pause_collection
1422
1051
  # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase.
1423
- sig { returns(String) }
1052
+ sig { returns(T.nilable(String)) }
1424
1053
  attr_accessor :proration_behavior
1425
1054
  # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
1426
- sig { returns(T.any(Integer, String)) }
1055
+ sig { returns(T.nilable(T.any(Integer, String))) }
1427
1056
  attr_accessor :start_date
1428
1057
  # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
1429
- sig { returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::TransferData) }
1058
+ sig {
1059
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::TransferData))
1060
+ }
1430
1061
  attr_accessor :transfer_data
1431
1062
  # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
1432
- sig { returns(T::Boolean) }
1063
+ sig { returns(T.nilable(T::Boolean)) }
1433
1064
  attr_accessor :trial
1434
- # Specify trial behavior when crossing phase boundaries
1435
- sig { returns(String) }
1436
- attr_accessor :trial_continuation
1437
1065
  # 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`
1438
- sig { returns(T.any(Integer, String)) }
1066
+ sig { returns(T.nilable(T.any(Integer, String))) }
1439
1067
  attr_accessor :trial_end
1440
- # Settings related to subscription trials.
1441
- sig { returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::TrialSettings) }
1442
- attr_accessor :trial_settings
1443
1068
  sig {
1444
- params(add_invoice_items: T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem], application_fee_percent: Float, automatic_tax: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AutomaticTax, billing_cycle_anchor: String, billing_thresholds: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::BillingThresholds), collection_method: String, coupon: String, currency: String, default_payment_method: String, default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), discounts: T.nilable(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Discount]), end_date: T.any(Integer, String), invoice_settings: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::InvoiceSettings, items: T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item], iterations: Integer, metadata: T::Hash[String, String], on_behalf_of: String, pause_collection: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::PauseCollection, proration_behavior: String, start_date: T.any(Integer, String), transfer_data: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::TransferData, trial: T::Boolean, trial_continuation: String, trial_end: T.any(Integer, String), trial_settings: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::TrialSettings).void
1069
+ params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem]), application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AutomaticTax), billing_cycle_anchor: T.nilable(String), collection_method: T.nilable(String), currency: T.nilable(String), default_payment_method: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Discount]))), end_date: T.nilable(T.any(Integer, String)), invoice_settings: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::InvoiceSettings), items: T::Array[::Stripe::SubscriptionScheduleService::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::SubscriptionScheduleService::UpdateParams::Phase::TransferData), trial: T.nilable(T::Boolean), trial_end: T.nilable(T.any(Integer, String))).void
1445
1070
  }
1446
1071
  def initialize(
1447
1072
  add_invoice_items: nil,
1448
1073
  application_fee_percent: nil,
1449
1074
  automatic_tax: nil,
1450
1075
  billing_cycle_anchor: nil,
1451
- billing_thresholds: nil,
1452
1076
  collection_method: nil,
1453
- coupon: nil,
1454
1077
  currency: nil,
1455
1078
  default_payment_method: nil,
1456
1079
  default_tax_rates: nil,
@@ -1462,713 +1085,74 @@ module Stripe
1462
1085
  iterations: nil,
1463
1086
  metadata: nil,
1464
1087
  on_behalf_of: nil,
1465
- pause_collection: nil,
1466
1088
  proration_behavior: nil,
1467
1089
  start_date: nil,
1468
1090
  transfer_data: nil,
1469
1091
  trial: nil,
1470
- trial_continuation: nil,
1471
- trial_end: nil,
1472
- trial_settings: nil
1092
+ trial_end: nil
1473
1093
  ); end
1474
1094
  end
1475
- class Prebilling < Stripe::RequestParams
1476
- # This is used to determine the number of billing cycles to prebill.
1477
- sig { returns(Integer) }
1478
- attr_accessor :iterations
1479
- # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
1480
- sig { returns(String) }
1481
- attr_accessor :update_behavior
1482
- sig { params(iterations: Integer, update_behavior: String).void }
1483
- def initialize(iterations: nil, update_behavior: nil); end
1484
- end
1485
- # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
1486
- sig { returns(String) }
1487
- attr_accessor :billing_behavior
1488
1095
  # Object representing the subscription schedule's default settings.
1489
- sig { returns(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings) }
1096
+ sig {
1097
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings))
1098
+ }
1490
1099
  attr_accessor :default_settings
1491
1100
  # 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.
1492
- sig { returns(String) }
1101
+ sig { returns(T.nilable(String)) }
1493
1102
  attr_accessor :end_behavior
1494
1103
  # Specifies which fields in the response should be expanded.
1495
- sig { returns(T::Array[String]) }
1104
+ sig { returns(T.nilable(T::Array[String])) }
1496
1105
  attr_accessor :expand
1497
1106
  # 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`.
1498
- sig { returns(T.nilable(T::Hash[String, String])) }
1107
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
1499
1108
  attr_accessor :metadata
1500
1109
  # 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.
1501
- sig { returns(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase]) }
1110
+ sig {
1111
+ returns(T.nilable(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase]))
1112
+ }
1502
1113
  attr_accessor :phases
1503
- # If specified, the invoicing for the given billing cycle iterations will be processed now.
1504
- sig { returns(::Stripe::SubscriptionScheduleService::UpdateParams::Prebilling) }
1505
- attr_accessor :prebilling
1506
1114
  # If the update changes the current phase, indicates whether the changes should be prorated. The default value is `create_prorations`.
1507
- sig { returns(String) }
1115
+ sig { returns(T.nilable(String)) }
1508
1116
  attr_accessor :proration_behavior
1509
1117
  sig {
1510
- params(billing_behavior: String, default_settings: ::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings, end_behavior: String, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String]), phases: T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase], prebilling: ::Stripe::SubscriptionScheduleService::UpdateParams::Prebilling, proration_behavior: String).void
1118
+ params(default_settings: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings), end_behavior: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), phases: T.nilable(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase]), proration_behavior: T.nilable(String)).void
1511
1119
  }
1512
1120
  def initialize(
1513
- billing_behavior: nil,
1514
1121
  default_settings: nil,
1515
1122
  end_behavior: nil,
1516
1123
  expand: nil,
1517
1124
  metadata: nil,
1518
1125
  phases: nil,
1519
- prebilling: nil,
1520
1126
  proration_behavior: nil
1521
1127
  ); end
1522
1128
  end
1523
- class AmendParams < Stripe::RequestParams
1524
- class Amendment < Stripe::RequestParams
1525
- class AmendmentEnd < Stripe::RequestParams
1526
- class DiscountEnd < Stripe::RequestParams
1527
- # The ID of a specific discount.
1528
- sig { returns(String) }
1529
- attr_accessor :discount
1530
- sig { params(discount: String).void }
1531
- def initialize(discount: nil); end
1532
- end
1533
- class Duration < Stripe::RequestParams
1534
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1535
- sig { returns(String) }
1536
- attr_accessor :interval
1537
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1538
- sig { returns(Integer) }
1539
- attr_accessor :interval_count
1540
- sig { params(interval: String, interval_count: Integer).void }
1541
- def initialize(interval: nil, interval_count: nil); end
1542
- end
1543
- # Use the `end` time of a given discount.
1544
- sig {
1545
- returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentEnd::DiscountEnd)
1546
- }
1547
- attr_accessor :discount_end
1548
- # Time span for the amendment starting from the `amendment_start`.
1549
- sig {
1550
- returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentEnd::Duration)
1551
- }
1552
- attr_accessor :duration
1553
- # A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
1554
- sig { returns(Integer) }
1555
- attr_accessor :timestamp
1556
- # Select one of three ways to pass the `amendment_end`.
1557
- sig { returns(String) }
1558
- attr_accessor :type
1559
- sig {
1560
- params(discount_end: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentEnd::DiscountEnd, duration: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentEnd::Duration, timestamp: Integer, type: String).void
1561
- }
1562
- def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil); end
1563
- end
1564
- class AmendmentStart < Stripe::RequestParams
1565
- class AmendmentEnd < Stripe::RequestParams
1566
- # The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array.
1567
- sig { returns(Integer) }
1568
- attr_accessor :index
1569
- sig { params(index: Integer).void }
1570
- def initialize(index: nil); end
1571
- end
1572
- class DiscountEnd < Stripe::RequestParams
1573
- # The ID of a specific discount.
1574
- sig { returns(String) }
1575
- attr_accessor :discount
1576
- sig { params(discount: String).void }
1577
- def initialize(discount: nil); end
1578
- end
1579
- # Details of another amendment in the same array, immediately after which this amendment should begin.
1580
- sig {
1581
- returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentStart::AmendmentEnd)
1582
- }
1583
- attr_accessor :amendment_end
1584
- # Use the `end` time of a given discount.
1585
- sig {
1586
- returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentStart::DiscountEnd)
1587
- }
1588
- attr_accessor :discount_end
1589
- # A precise Unix timestamp for the amendment to start.
1590
- sig { returns(Integer) }
1591
- attr_accessor :timestamp
1592
- # Select one of three ways to pass the `amendment_start`.
1593
- sig { returns(String) }
1594
- attr_accessor :type
1595
- sig {
1596
- params(amendment_end: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentStart::AmendmentEnd, discount_end: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentStart::DiscountEnd, timestamp: Integer, type: String).void
1597
- }
1598
- def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil); end
1599
- end
1600
- class DiscountAction < Stripe::RequestParams
1601
- class Add < Stripe::RequestParams
1602
- class DiscountEnd < Stripe::RequestParams
1603
- # The type of calculation made to determine when the discount ends.
1604
- sig { returns(String) }
1605
- attr_accessor :type
1606
- sig { params(type: String).void }
1607
- def initialize(type: nil); end
1608
- end
1609
- # The coupon code to redeem.
1610
- sig { returns(String) }
1611
- attr_accessor :coupon
1612
- # An ID of an existing discount for a coupon that was already redeemed.
1613
- sig { returns(String) }
1614
- attr_accessor :discount
1615
- # Details to determine how long the discount should be applied for.
1616
- sig {
1617
- returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::DiscountAction::Add::DiscountEnd)
1618
- }
1619
- attr_accessor :discount_end
1620
- # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array.
1621
- sig { returns(Integer) }
1622
- attr_accessor :index
1623
- # The promotion code to redeem.
1624
- sig { returns(String) }
1625
- attr_accessor :promotion_code
1626
- sig {
1627
- params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::DiscountAction::Add::DiscountEnd, index: Integer, promotion_code: String).void
1628
- }
1629
- def initialize(
1630
- coupon: nil,
1631
- discount: nil,
1632
- discount_end: nil,
1633
- index: nil,
1634
- promotion_code: nil
1635
- ); end
1636
- end
1637
- class Remove < Stripe::RequestParams
1638
- # The coupon code to remove from the `discounts` array.
1639
- sig { returns(String) }
1640
- attr_accessor :coupon
1641
- # The ID of a discount to remove from the `discounts` array.
1642
- sig { returns(String) }
1643
- attr_accessor :discount
1644
- # The ID of a promotion code to remove from the `discounts` array.
1645
- sig { returns(String) }
1646
- attr_accessor :promotion_code
1647
- sig { params(coupon: String, discount: String, promotion_code: String).void }
1648
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
1649
- end
1650
- class Set < Stripe::RequestParams
1651
- # The coupon code to replace the `discounts` array with.
1652
- sig { returns(String) }
1653
- attr_accessor :coupon
1654
- # An ID of an existing discount to replace the `discounts` array with.
1655
- sig { returns(String) }
1656
- attr_accessor :discount
1657
- # An ID of an existing promotion code to replace the `discounts` array with.
1658
- sig { returns(String) }
1659
- attr_accessor :promotion_code
1660
- sig { params(coupon: String, discount: String, promotion_code: String).void }
1661
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
1662
- end
1663
- # Details of the discount to add.
1664
- sig {
1665
- returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::DiscountAction::Add)
1666
- }
1667
- attr_accessor :add
1668
- # Details of the discount to remove.
1669
- sig {
1670
- returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::DiscountAction::Remove)
1671
- }
1672
- attr_accessor :remove
1673
- # Details of the discount to replace the existing discounts with.
1674
- sig {
1675
- returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::DiscountAction::Set)
1676
- }
1677
- attr_accessor :set
1678
- # Determines the type of discount action.
1679
- sig { returns(String) }
1680
- attr_accessor :type
1681
- sig {
1682
- params(add: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::DiscountAction::Add, remove: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::DiscountAction::Remove, set: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::DiscountAction::Set, type: String).void
1683
- }
1684
- def initialize(add: nil, remove: nil, set: nil, type: nil); end
1685
- end
1686
- class ItemAction < Stripe::RequestParams
1687
- class Add < Stripe::RequestParams
1688
- class Discount < Stripe::RequestParams
1689
- class DiscountEnd < Stripe::RequestParams
1690
- class Duration < Stripe::RequestParams
1691
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1692
- sig { returns(String) }
1693
- attr_accessor :interval
1694
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1695
- sig { returns(Integer) }
1696
- attr_accessor :interval_count
1697
- sig { params(interval: String, interval_count: Integer).void }
1698
- def initialize(interval: nil, interval_count: nil); end
1699
- end
1700
- # Time span for the redeemed discount.
1701
- sig {
1702
- returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Add::Discount::DiscountEnd::Duration)
1703
- }
1704
- attr_accessor :duration
1705
- # A precise Unix timestamp for the discount to end. Must be in the future.
1706
- sig { returns(Integer) }
1707
- attr_accessor :timestamp
1708
- # The type of calculation made to determine when the discount ends.
1709
- sig { returns(String) }
1710
- attr_accessor :type
1711
- sig {
1712
- params(duration: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Add::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
1713
- }
1714
- def initialize(duration: nil, timestamp: nil, type: nil); end
1715
- end
1716
- # ID of the coupon to create a new discount for.
1717
- sig { returns(String) }
1718
- attr_accessor :coupon
1719
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1720
- sig { returns(String) }
1721
- attr_accessor :discount
1722
- # Details to determine how long the discount should be applied for.
1723
- sig {
1724
- returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Add::Discount::DiscountEnd)
1725
- }
1726
- attr_accessor :discount_end
1727
- # ID of the promotion code to create a new discount for.
1728
- sig { returns(String) }
1729
- attr_accessor :promotion_code
1730
- sig {
1731
- params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Add::Discount::DiscountEnd, promotion_code: String).void
1732
- }
1733
- def initialize(
1734
- coupon: nil,
1735
- discount: nil,
1736
- discount_end: nil,
1737
- promotion_code: nil
1738
- ); end
1739
- end
1740
- class Trial < Stripe::RequestParams
1741
- # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
1742
- sig { returns(T::Array[String]) }
1743
- attr_accessor :converts_to
1744
- # Determines the type of trial for this item.
1745
- sig { returns(String) }
1746
- attr_accessor :type
1747
- sig { params(converts_to: T::Array[String], type: String).void }
1748
- def initialize(converts_to: nil, type: nil); end
1749
- end
1750
- # The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
1751
- sig {
1752
- returns(T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Add::Discount])
1753
- }
1754
- attr_accessor :discounts
1755
- # 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`.
1756
- sig { returns(T::Hash[String, String]) }
1757
- attr_accessor :metadata
1758
- # The ID of the price object.
1759
- sig { returns(String) }
1760
- attr_accessor :price
1761
- # Quantity for this item.
1762
- sig { returns(Integer) }
1763
- attr_accessor :quantity
1764
- # The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`.
1765
- sig { returns(T::Array[String]) }
1766
- attr_accessor :tax_rates
1767
- # Options that configure the trial on the subscription item.
1768
- sig {
1769
- returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Add::Trial)
1770
- }
1771
- attr_accessor :trial
1772
- sig {
1773
- params(discounts: T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Add::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Add::Trial).void
1774
- }
1775
- def initialize(
1776
- discounts: nil,
1777
- metadata: nil,
1778
- price: nil,
1779
- quantity: nil,
1780
- tax_rates: nil,
1781
- trial: nil
1782
- ); end
1783
- end
1784
- class Remove < Stripe::RequestParams
1785
- # ID of a price to remove.
1786
- sig { returns(String) }
1787
- attr_accessor :price
1788
- sig { params(price: String).void }
1789
- def initialize(price: nil); end
1790
- end
1791
- class Set < Stripe::RequestParams
1792
- class Discount < Stripe::RequestParams
1793
- class DiscountEnd < Stripe::RequestParams
1794
- class Duration < Stripe::RequestParams
1795
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1796
- sig { returns(String) }
1797
- attr_accessor :interval
1798
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1799
- sig { returns(Integer) }
1800
- attr_accessor :interval_count
1801
- sig { params(interval: String, interval_count: Integer).void }
1802
- def initialize(interval: nil, interval_count: nil); end
1803
- end
1804
- # Time span for the redeemed discount.
1805
- sig {
1806
- returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Set::Discount::DiscountEnd::Duration)
1807
- }
1808
- attr_accessor :duration
1809
- # A precise Unix timestamp for the discount to end. Must be in the future.
1810
- sig { returns(Integer) }
1811
- attr_accessor :timestamp
1812
- # The type of calculation made to determine when the discount ends.
1813
- sig { returns(String) }
1814
- attr_accessor :type
1815
- sig {
1816
- params(duration: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Set::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
1817
- }
1818
- def initialize(duration: nil, timestamp: nil, type: nil); end
1819
- end
1820
- # ID of the coupon to create a new discount for.
1821
- sig { returns(String) }
1822
- attr_accessor :coupon
1823
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1824
- sig { returns(String) }
1825
- attr_accessor :discount
1826
- # Details to determine how long the discount should be applied for.
1827
- sig {
1828
- returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Set::Discount::DiscountEnd)
1829
- }
1830
- attr_accessor :discount_end
1831
- # ID of the promotion code to create a new discount for.
1832
- sig { returns(String) }
1833
- attr_accessor :promotion_code
1834
- sig {
1835
- params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Set::Discount::DiscountEnd, promotion_code: String).void
1836
- }
1837
- def initialize(
1838
- coupon: nil,
1839
- discount: nil,
1840
- discount_end: nil,
1841
- promotion_code: nil
1842
- ); end
1843
- end
1844
- class Trial < Stripe::RequestParams
1845
- # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
1846
- sig { returns(T::Array[String]) }
1847
- attr_accessor :converts_to
1848
- # Determines the type of trial for this item.
1849
- sig { returns(String) }
1850
- attr_accessor :type
1851
- sig { params(converts_to: T::Array[String], type: String).void }
1852
- def initialize(converts_to: nil, type: nil); end
1853
- end
1854
- # If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`.
1855
- sig {
1856
- returns(T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Set::Discount])
1857
- }
1858
- attr_accessor :discounts
1859
- # If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`.
1860
- sig { returns(T::Hash[String, String]) }
1861
- attr_accessor :metadata
1862
- # The ID of the price object.
1863
- sig { returns(String) }
1864
- attr_accessor :price
1865
- # If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`.
1866
- sig { returns(Integer) }
1867
- attr_accessor :quantity
1868
- # If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`.
1869
- sig { returns(T::Array[String]) }
1870
- attr_accessor :tax_rates
1871
- # If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`.
1872
- sig {
1873
- returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Set::Trial)
1874
- }
1875
- attr_accessor :trial
1876
- sig {
1877
- params(discounts: T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Set::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Set::Trial).void
1878
- }
1879
- def initialize(
1880
- discounts: nil,
1881
- metadata: nil,
1882
- price: nil,
1883
- quantity: nil,
1884
- tax_rates: nil,
1885
- trial: nil
1886
- ); end
1887
- end
1888
- # Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item.
1889
- sig {
1890
- returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Add)
1891
- }
1892
- attr_accessor :add
1893
- # Details of the subscription item to remove.
1894
- sig {
1895
- returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Remove)
1896
- }
1897
- attr_accessor :remove
1898
- # Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item.
1899
- sig {
1900
- returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Set)
1901
- }
1902
- attr_accessor :set
1903
- # Determines the type of item action.
1904
- sig { returns(String) }
1905
- attr_accessor :type
1906
- sig {
1907
- params(add: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Add, remove: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Remove, set: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Set, type: String).void
1908
- }
1909
- def initialize(add: nil, remove: nil, set: nil, type: nil); end
1910
- end
1911
- class MetadataAction < Stripe::RequestParams
1912
- # Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
1913
- sig { returns(T::Hash[String, String]) }
1914
- attr_accessor :add
1915
- # Keys to remove from schedule phase metadata.
1916
- sig { returns(T::Array[String]) }
1917
- attr_accessor :remove
1918
- # Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
1919
- sig { returns(T.nilable(T::Hash[String, String])) }
1920
- attr_accessor :set
1921
- # Select one of three ways to update phase-level `metadata` on subscription schedules.
1922
- sig { returns(String) }
1923
- attr_accessor :type
1924
- sig {
1925
- params(add: T::Hash[String, String], remove: T::Array[String], set: T.nilable(T::Hash[String, String]), type: String).void
1926
- }
1927
- def initialize(add: nil, remove: nil, set: nil, type: nil); end
1928
- end
1929
- class SetPauseCollection < Stripe::RequestParams
1930
- class Set < Stripe::RequestParams
1931
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
1932
- sig { returns(String) }
1933
- attr_accessor :behavior
1934
- sig { params(behavior: String).void }
1935
- def initialize(behavior: nil); end
1936
- end
1937
- # Details of the pause_collection behavior to apply to the amendment.
1938
- sig {
1939
- returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::SetPauseCollection::Set)
1940
- }
1941
- attr_accessor :set
1942
- # Determines the type of the pause_collection amendment.
1943
- sig { returns(String) }
1944
- attr_accessor :type
1945
- sig {
1946
- params(set: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::SetPauseCollection::Set, type: String).void
1947
- }
1948
- def initialize(set: nil, type: nil); end
1949
- end
1950
- class TrialSettings < Stripe::RequestParams
1951
- class EndBehavior < Stripe::RequestParams
1952
- # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
1953
- sig { returns(String) }
1954
- attr_accessor :prorate_up_front
1955
- sig { params(prorate_up_front: String).void }
1956
- def initialize(prorate_up_front: nil); end
1957
- end
1958
- # Defines how the subscription should behave when a trial ends.
1959
- sig {
1960
- returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::TrialSettings::EndBehavior)
1961
- }
1962
- attr_accessor :end_behavior
1963
- sig {
1964
- params(end_behavior: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::TrialSettings::EndBehavior).void
1965
- }
1966
- def initialize(end_behavior: nil); end
1967
- end
1968
- # Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment.
1969
- sig { returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentEnd) }
1970
- attr_accessor :amendment_end
1971
- # Details to identify the earliest timestamp where the proposed change should take effect.
1972
- sig {
1973
- returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentStart)
1974
- }
1975
- attr_accessor :amendment_start
1976
- # For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment.
1977
- sig { returns(String) }
1978
- attr_accessor :billing_cycle_anchor
1979
- # Changes to the coupons being redeemed or discounts being applied during the amendment time span.
1980
- sig {
1981
- returns(T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment::DiscountAction])
1982
- }
1983
- attr_accessor :discount_actions
1984
- # Changes to the subscription items during the amendment time span.
1985
- sig {
1986
- returns(T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction])
1987
- }
1988
- attr_accessor :item_actions
1989
- # Instructions for how to modify phase metadata
1990
- sig {
1991
- returns(T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment::MetadataAction])
1992
- }
1993
- attr_accessor :metadata_actions
1994
- # Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`.
1995
- sig { returns(String) }
1996
- attr_accessor :proration_behavior
1997
- # Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
1998
- sig {
1999
- returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::SetPauseCollection)
2000
- }
2001
- attr_accessor :set_pause_collection
2002
- # Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
2003
- sig { returns(String) }
2004
- attr_accessor :set_schedule_end
2005
- # Settings related to subscription trials.
2006
- sig {
2007
- returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::TrialSettings)
2008
- }
2009
- attr_accessor :trial_settings
2010
- sig {
2011
- params(amendment_end: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentEnd, amendment_start: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentStart, billing_cycle_anchor: String, discount_actions: T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment::DiscountAction], item_actions: T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction], metadata_actions: T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment::MetadataAction], proration_behavior: String, set_pause_collection: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::SetPauseCollection, set_schedule_end: String, trial_settings: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::TrialSettings).void
2012
- }
2013
- def initialize(
2014
- amendment_end: nil,
2015
- amendment_start: nil,
2016
- billing_cycle_anchor: nil,
2017
- discount_actions: nil,
2018
- item_actions: nil,
2019
- metadata_actions: nil,
2020
- proration_behavior: nil,
2021
- set_pause_collection: nil,
2022
- set_schedule_end: nil,
2023
- trial_settings: nil
2024
- ); end
2025
- end
2026
- class Prebilling < Stripe::RequestParams
2027
- class BillFrom < Stripe::RequestParams
2028
- class AmendmentStart < Stripe::RequestParams
2029
- # The position of the amendment in the `amendments` array with which prebilling should begin. Indexes start from 0 and must be less than the total number of supplied amendments.
2030
- sig { returns(Integer) }
2031
- attr_accessor :index
2032
- sig { params(index: Integer).void }
2033
- def initialize(index: nil); end
2034
- end
2035
- # Start the prebilled period when a specified amendment begins.
2036
- sig {
2037
- returns(::Stripe::SubscriptionScheduleService::AmendParams::Prebilling::BillFrom::AmendmentStart)
2038
- }
2039
- attr_accessor :amendment_start
2040
- # Start the prebilled period at a precise integer timestamp, starting from the Unix epoch.
2041
- sig { returns(Integer) }
2042
- attr_accessor :timestamp
2043
- # Select one of several ways to pass the `bill_from` value.
2044
- sig { returns(String) }
2045
- attr_accessor :type
2046
- sig {
2047
- params(amendment_start: ::Stripe::SubscriptionScheduleService::AmendParams::Prebilling::BillFrom::AmendmentStart, timestamp: Integer, type: String).void
2048
- }
2049
- def initialize(amendment_start: nil, timestamp: nil, type: nil); end
2050
- end
2051
- class BillUntil < Stripe::RequestParams
2052
- class AmendmentEnd < Stripe::RequestParams
2053
- # The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments.
2054
- sig { returns(Integer) }
2055
- attr_accessor :index
2056
- sig { params(index: Integer).void }
2057
- def initialize(index: nil); end
2058
- end
2059
- class Duration < Stripe::RequestParams
2060
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2061
- sig { returns(String) }
2062
- attr_accessor :interval
2063
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2064
- sig { returns(Integer) }
2065
- attr_accessor :interval_count
2066
- sig { params(interval: String, interval_count: Integer).void }
2067
- def initialize(interval: nil, interval_count: nil); end
2068
- end
2069
- # End the prebilled period when a specified amendment ends.
2070
- sig {
2071
- returns(::Stripe::SubscriptionScheduleService::AmendParams::Prebilling::BillUntil::AmendmentEnd)
2072
- }
2073
- attr_accessor :amendment_end
2074
- # Time span for prebilling, starting from `bill_from`.
2075
- sig {
2076
- returns(::Stripe::SubscriptionScheduleService::AmendParams::Prebilling::BillUntil::Duration)
2077
- }
2078
- attr_accessor :duration
2079
- # End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
2080
- sig { returns(Integer) }
2081
- attr_accessor :timestamp
2082
- # Select one of several ways to pass the `bill_until` value.
2083
- sig { returns(String) }
2084
- attr_accessor :type
2085
- sig {
2086
- params(amendment_end: ::Stripe::SubscriptionScheduleService::AmendParams::Prebilling::BillUntil::AmendmentEnd, duration: ::Stripe::SubscriptionScheduleService::AmendParams::Prebilling::BillUntil::Duration, timestamp: Integer, type: String).void
2087
- }
2088
- def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil); end
2089
- end
2090
- # The beginning of the prebilled time period. The default value is `now`.
2091
- sig { returns(::Stripe::SubscriptionScheduleService::AmendParams::Prebilling::BillFrom) }
2092
- attr_accessor :bill_from
2093
- # The end of the prebilled time period.
2094
- sig { returns(::Stripe::SubscriptionScheduleService::AmendParams::Prebilling::BillUntil) }
2095
- attr_accessor :bill_until
2096
- # When the prebilling invoice should be created. The default value is `now`.
2097
- sig { returns(String) }
2098
- attr_accessor :invoice_at
2099
- # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
2100
- sig { returns(String) }
2101
- attr_accessor :update_behavior
2102
- sig {
2103
- params(bill_from: ::Stripe::SubscriptionScheduleService::AmendParams::Prebilling::BillFrom, bill_until: ::Stripe::SubscriptionScheduleService::AmendParams::Prebilling::BillUntil, invoice_at: String, update_behavior: String).void
2104
- }
2105
- def initialize(bill_from: nil, bill_until: nil, invoice_at: nil, update_behavior: nil); end
2106
- end
2107
- class ScheduleSettings < Stripe::RequestParams
2108
- # Behavior of the subscription schedule and underlying subscription when it ends.
2109
- sig { returns(String) }
2110
- attr_accessor :end_behavior
2111
- sig { params(end_behavior: String).void }
2112
- def initialize(end_behavior: nil); end
2113
- end
2114
- # Changes to apply to the phases of the subscription schedule, in the order provided.
2115
- sig { returns(T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment]) }
2116
- attr_accessor :amendments
2117
- # Specifies which fields in the response should be expanded.
2118
- sig { returns(T::Array[String]) }
2119
- attr_accessor :expand
2120
- # Provide any time periods to bill in advance.
2121
- sig {
2122
- returns(T.nilable(T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Prebilling]))
2123
- }
2124
- attr_accessor :prebilling
2125
- # In cases where the amendment changes the currently active phase,
2126
- # specifies if and how to prorate at the time of the request.
2127
- sig { returns(String) }
2128
- attr_accessor :proration_behavior
2129
- # Changes to apply to the subscription schedule.
2130
- sig { returns(::Stripe::SubscriptionScheduleService::AmendParams::ScheduleSettings) }
2131
- attr_accessor :schedule_settings
2132
- sig {
2133
- params(amendments: T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment], expand: T::Array[String], prebilling: T.nilable(T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Prebilling]), proration_behavior: String, schedule_settings: ::Stripe::SubscriptionScheduleService::AmendParams::ScheduleSettings).void
2134
- }
2135
- def initialize(
2136
- amendments: nil,
2137
- expand: nil,
2138
- prebilling: nil,
2139
- proration_behavior: nil,
2140
- schedule_settings: nil
2141
- ); end
2142
- end
2143
1129
  class CancelParams < Stripe::RequestParams
2144
1130
  # Specifies which fields in the response should be expanded.
2145
- sig { returns(T::Array[String]) }
1131
+ sig { returns(T.nilable(T::Array[String])) }
2146
1132
  attr_accessor :expand
2147
1133
  # 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`.
2148
- sig { returns(T::Boolean) }
1134
+ sig { returns(T.nilable(T::Boolean)) }
2149
1135
  attr_accessor :invoice_now
2150
1136
  # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`.
2151
- sig { returns(T::Boolean) }
1137
+ sig { returns(T.nilable(T::Boolean)) }
2152
1138
  attr_accessor :prorate
2153
- sig { params(expand: T::Array[String], invoice_now: T::Boolean, prorate: T::Boolean).void }
1139
+ sig {
1140
+ params(expand: T.nilable(T::Array[String]), invoice_now: T.nilable(T::Boolean), prorate: T.nilable(T::Boolean)).void
1141
+ }
2154
1142
  def initialize(expand: nil, invoice_now: nil, prorate: nil); end
2155
1143
  end
2156
1144
  class ReleaseParams < Stripe::RequestParams
2157
1145
  # Specifies which fields in the response should be expanded.
2158
- sig { returns(T::Array[String]) }
1146
+ sig { returns(T.nilable(T::Array[String])) }
2159
1147
  attr_accessor :expand
2160
1148
  # Keep any cancellation on the subscription that the schedule has set
2161
- sig { returns(T::Boolean) }
1149
+ sig { returns(T.nilable(T::Boolean)) }
2162
1150
  attr_accessor :preserve_cancel_date
2163
- sig { params(expand: T::Array[String], preserve_cancel_date: T::Boolean).void }
1151
+ sig {
1152
+ params(expand: T.nilable(T::Array[String]), preserve_cancel_date: T.nilable(T::Boolean)).void
1153
+ }
2164
1154
  def initialize(expand: nil, preserve_cancel_date: nil); end
2165
1155
  end
2166
- # Amends an existing subscription schedule.
2167
- sig {
2168
- params(schedule: String, params: T.any(::Stripe::SubscriptionScheduleService::AmendParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule)
2169
- }
2170
- def amend(schedule, params = {}, opts = {}); end
2171
-
2172
1156
  # 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.
2173
1157
  sig {
2174
1158
  params(schedule: String, params: T.any(::Stripe::SubscriptionScheduleService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule)