stripe 13.3.0 → 13.4.0.pre.beta.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (743) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1416 -645
  3. data/OPENAPI_VERSION +1 -1
  4. data/VERSION +1 -1
  5. data/lib/stripe/api_operations/request.rb +1 -0
  6. data/lib/stripe/api_requestor.rb +1 -0
  7. data/lib/stripe/object_types.rb +32 -0
  8. data/lib/stripe/request_params.rb +24 -0
  9. data/lib/stripe/request_signing_authenticator.rb +79 -0
  10. data/lib/stripe/resources/account.rb +5071 -0
  11. data/lib/stripe/resources/account_link.rb +54 -0
  12. data/lib/stripe/resources/account_notice.rb +132 -0
  13. data/lib/stripe/resources/account_session.rb +877 -0
  14. data/lib/stripe/resources/apple_pay_domain.rb +63 -0
  15. data/lib/stripe/resources/application.rb +20 -0
  16. data/lib/stripe/resources/application_fee.rb +96 -0
  17. data/lib/stripe/resources/application_fee_refund.rb +17 -0
  18. data/lib/stripe/resources/apps/secret.rb +141 -0
  19. data/lib/stripe/resources/balance.rb +131 -0
  20. data/lib/stripe/resources/balance_transaction.rb +112 -0
  21. data/lib/stripe/resources/bank_account.rb +84 -2
  22. data/lib/stripe/resources/billing/alert.rb +144 -0
  23. data/lib/stripe/resources/billing/alert_triggered.rb +26 -0
  24. data/lib/stripe/resources/billing/credit_balance_summary.rb +77 -0
  25. data/lib/stripe/resources/billing/credit_balance_transaction.rb +116 -0
  26. data/lib/stripe/resources/billing/credit_grant.rb +203 -0
  27. data/lib/stripe/resources/billing/meter.rb +178 -0
  28. data/lib/stripe/resources/billing/meter_error_report.rb +59 -0
  29. data/lib/stripe/resources/billing/meter_event.rb +35 -0
  30. data/lib/stripe/resources/billing/meter_event_adjustment.rb +43 -0
  31. data/lib/stripe/resources/billing/meter_event_summary.rb +15 -0
  32. data/lib/stripe/resources/billing_portal/configuration.rb +562 -0
  33. data/lib/stripe/resources/billing_portal/session.rb +271 -0
  34. data/lib/stripe/resources/capability.rb +84 -0
  35. data/lib/stripe/resources/capital/financing_offer.rb +188 -0
  36. data/lib/stripe/resources/capital/financing_summary.rb +64 -0
  37. data/lib/stripe/resources/capital/financing_transaction.rb +123 -0
  38. data/lib/stripe/resources/card.rb +79 -0
  39. data/lib/stripe/resources/cash_balance.rb +17 -0
  40. data/lib/stripe/resources/charge.rb +3026 -0
  41. data/lib/stripe/resources/checkout/session.rb +3654 -0
  42. data/lib/stripe/resources/climate/order.rb +176 -0
  43. data/lib/stripe/resources/climate/product.rb +56 -0
  44. data/lib/stripe/resources/climate/supplier.rb +54 -0
  45. data/lib/stripe/resources/confirmation_token.rb +1520 -0
  46. data/lib/stripe/resources/connect_collection_transfer.rb +24 -0
  47. data/lib/stripe/resources/country_spec.rb +63 -0
  48. data/lib/stripe/resources/coupon.rb +198 -0
  49. data/lib/stripe/resources/credit_note.rb +660 -0
  50. data/lib/stripe/resources/credit_note_line_item.rb +65 -0
  51. data/lib/stripe/resources/customer.rb +840 -0
  52. data/lib/stripe/resources/customer_balance_transaction.rb +27 -0
  53. data/lib/stripe/resources/customer_cash_balance_transaction.rb +109 -0
  54. data/lib/stripe/resources/customer_session.rb +159 -0
  55. data/lib/stripe/resources/discount.rb +29 -0
  56. data/lib/stripe/resources/dispute.rb +619 -0
  57. data/lib/stripe/resources/entitlements/active_entitlement.rb +46 -0
  58. data/lib/stripe/resources/entitlements/active_entitlement_summary.rb +23 -0
  59. data/lib/stripe/resources/entitlements/feature.rb +90 -0
  60. data/lib/stripe/resources/ephemeral_key.rb +21 -0
  61. data/lib/stripe/resources/event.rb +130 -0
  62. data/lib/stripe/resources/exchange_rate.rb +33 -0
  63. data/lib/stripe/resources/file.rb +111 -0
  64. data/lib/stripe/resources/file_link.rb +112 -0
  65. data/lib/stripe/resources/financial_connections/account.rb +260 -0
  66. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +27 -0
  67. data/lib/stripe/resources/financial_connections/account_owner.rb +17 -0
  68. data/lib/stripe/resources/financial_connections/account_ownership.rb +9 -0
  69. data/lib/stripe/resources/financial_connections/institution.rb +99 -0
  70. data/lib/stripe/resources/financial_connections/session.rb +159 -0
  71. data/lib/stripe/resources/financial_connections/transaction.rb +101 -0
  72. data/lib/stripe/resources/forwarding/request.rb +165 -0
  73. data/lib/stripe/resources/funding_instructions.rb +308 -0
  74. data/lib/stripe/resources/gift_cards/card.rb +217 -0
  75. data/lib/stripe/resources/gift_cards/transaction.rb +281 -0
  76. data/lib/stripe/resources/identity/verification_report.rb +266 -0
  77. data/lib/stripe/resources/identity/verification_session.rb +361 -0
  78. data/lib/stripe/resources/invoice.rb +8078 -0
  79. data/lib/stripe/resources/invoice_item.rb +445 -0
  80. data/lib/stripe/resources/invoice_line_item.rb +333 -0
  81. data/lib/stripe/resources/invoice_payment.rb +56 -0
  82. data/lib/stripe/resources/invoice_rendering_template.rb +67 -0
  83. data/lib/stripe/resources/issuing/authorization.rb +1117 -2
  84. data/lib/stripe/resources/issuing/card.rb +666 -0
  85. data/lib/stripe/resources/issuing/cardholder.rb +658 -0
  86. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +611 -0
  87. data/lib/stripe/resources/issuing/dispute.rb +790 -0
  88. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +84 -0
  89. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +95 -0
  90. data/lib/stripe/resources/issuing/personalization_design.rb +285 -0
  91. data/lib/stripe/resources/issuing/physical_bundle.rb +63 -0
  92. data/lib/stripe/resources/issuing/settlement.rb +49 -0
  93. data/lib/stripe/resources/issuing/token.rb +175 -0
  94. data/lib/stripe/resources/issuing/transaction.rb +927 -0
  95. data/lib/stripe/resources/line_item.rb +75 -0
  96. data/lib/stripe/resources/login_link.rb +7 -0
  97. data/lib/stripe/resources/mandate.rb +169 -0
  98. data/lib/stripe/resources/margin.rb +124 -0
  99. data/lib/stripe/resources/order.rb +2850 -0
  100. data/lib/stripe/resources/payment_attempt_record.rb +184 -0
  101. data/lib/stripe/resources/payment_intent.rb +12864 -0
  102. data/lib/stripe/resources/payment_link.rb +1563 -0
  103. data/lib/stripe/resources/payment_method.rb +1638 -0
  104. data/lib/stripe/resources/payment_method_configuration.rb +2844 -0
  105. data/lib/stripe/resources/payment_method_domain.rb +153 -0
  106. data/lib/stripe/resources/payment_record.rb +715 -0
  107. data/lib/stripe/resources/payout.rb +218 -0
  108. data/lib/stripe/resources/person.rb +263 -0
  109. data/lib/stripe/resources/plan.rb +317 -0
  110. data/lib/stripe/resources/price.rb +649 -0
  111. data/lib/stripe/resources/product.rb +536 -0
  112. data/lib/stripe/resources/product_feature.rb +12 -0
  113. data/lib/stripe/resources/promotion_code.rb +221 -0
  114. data/lib/stripe/resources/quote.rb +2946 -0
  115. data/lib/stripe/resources/quote_line.rb +274 -0
  116. data/lib/stripe/resources/quote_preview_invoice.rb +652 -0
  117. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +362 -0
  118. data/lib/stripe/resources/radar/early_fraud_warning.rb +77 -0
  119. data/lib/stripe/resources/radar/value_list.rb +125 -0
  120. data/lib/stripe/resources/radar/value_list_item.rb +95 -0
  121. data/lib/stripe/resources/refund.rb +397 -0
  122. data/lib/stripe/resources/reporting/report_run.rb +150 -0
  123. data/lib/stripe/resources/reporting/report_type.rb +36 -0
  124. data/lib/stripe/resources/reserve_transaction.rb +22 -0
  125. data/lib/stripe/resources/reversal.rb +21 -0
  126. data/lib/stripe/resources/review.rb +108 -0
  127. data/lib/stripe/resources/setup_attempt.rb +373 -0
  128. data/lib/stripe/resources/setup_intent.rb +3834 -0
  129. data/lib/stripe/resources/shipping_rate.rb +259 -0
  130. data/lib/stripe/resources/sigma/scheduled_query_run.rb +54 -0
  131. data/lib/stripe/resources/source.rb +1239 -0
  132. data/lib/stripe/resources/source_mandate_notification.rb +66 -0
  133. data/lib/stripe/resources/source_transaction.rb +85 -0
  134. data/lib/stripe/resources/subscription.rb +2057 -0
  135. data/lib/stripe/resources/subscription_item.rb +433 -0
  136. data/lib/stripe/resources/subscription_schedule.rb +2402 -0
  137. data/lib/stripe/resources/tax/association.rb +89 -0
  138. data/lib/stripe/resources/tax/calculation.rb +387 -0
  139. data/lib/stripe/resources/tax/calculation_line_item.rb +56 -0
  140. data/lib/stripe/resources/tax/form.rb +220 -0
  141. data/lib/stripe/resources/tax/registration.rb +2382 -0
  142. data/lib/stripe/resources/tax/settings.rb +126 -0
  143. data/lib/stripe/resources/tax/transaction.rb +267 -0
  144. data/lib/stripe/resources/tax/transaction_line_item.rb +31 -0
  145. data/lib/stripe/resources/tax_code.rb +35 -0
  146. data/lib/stripe/resources/tax_deducted_at_source.rb +22 -0
  147. data/lib/stripe/resources/tax_id.rb +121 -0
  148. data/lib/stripe/resources/tax_rate.rb +200 -0
  149. data/lib/stripe/resources/terminal/configuration.rb +1011 -0
  150. data/lib/stripe/resources/terminal/connection_token.rb +18 -0
  151. data/lib/stripe/resources/terminal/location.rb +175 -0
  152. data/lib/stripe/resources/terminal/reader.rb +782 -0
  153. data/lib/stripe/resources/terminal/reader_collected_data.rb +40 -0
  154. data/lib/stripe/resources/test_helpers/test_clock.rb +86 -0
  155. data/lib/stripe/resources/token.rb +1149 -0
  156. data/lib/stripe/resources/topup.rb +174 -0
  157. data/lib/stripe/resources/transfer.rb +153 -0
  158. data/lib/stripe/resources/treasury/credit_reversal.rb +92 -0
  159. data/lib/stripe/resources/treasury/debit_reversal.rb +103 -0
  160. data/lib/stripe/resources/treasury/financial_account.rb +772 -0
  161. data/lib/stripe/resources/treasury/financial_account_features.rb +191 -0
  162. data/lib/stripe/resources/treasury/inbound_transfer.rb +235 -0
  163. data/lib/stripe/resources/treasury/outbound_payment.rb +495 -0
  164. data/lib/stripe/resources/treasury/outbound_transfer.rb +387 -0
  165. data/lib/stripe/resources/treasury/received_credit.rb +283 -0
  166. data/lib/stripe/resources/treasury/received_debit.rb +244 -0
  167. data/lib/stripe/resources/treasury/transaction.rb +176 -0
  168. data/lib/stripe/resources/treasury/transaction_entry.rb +157 -0
  169. data/lib/stripe/resources/usage_record.rb +13 -0
  170. data/lib/stripe/resources/usage_record_summary.rb +21 -0
  171. data/lib/stripe/resources/v2/amount.rb +9 -0
  172. data/lib/stripe/resources/v2/billing/meter_event.rb +18 -0
  173. data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +21 -0
  174. data/lib/stripe/resources/v2/billing/meter_event_session.rb +14 -0
  175. data/lib/stripe/resources/v2/event.rb +27 -0
  176. data/lib/stripe/resources/v2/event_destination.rb +59 -0
  177. data/lib/stripe/resources/webhook_endpoint.rb +122 -0
  178. data/lib/stripe/resources.rb +31 -0
  179. data/lib/stripe/services/account_capability_service.rb +32 -0
  180. data/lib/stripe/services/account_external_account_service.rb +250 -0
  181. data/lib/stripe/services/account_link_service.rb +46 -0
  182. data/lib/stripe/services/account_login_link_service.rb +9 -0
  183. data/lib/stripe/services/account_notice_service.rb +101 -0
  184. data/lib/stripe/services/account_person_service.rb +875 -0
  185. data/lib/stripe/services/account_service.rb +4351 -0
  186. data/lib/stripe/services/account_session_service.rb +664 -0
  187. data/lib/stripe/services/apple_pay_domain_service.rb +51 -0
  188. data/lib/stripe/services/application_fee_refund_service.rb +54 -0
  189. data/lib/stripe/services/application_fee_service.rb +57 -0
  190. data/lib/stripe/services/apps/secret_service.rb +116 -0
  191. data/lib/stripe/services/balance_service.rb +9 -0
  192. data/lib/stripe/services/balance_transaction_service.rb +69 -0
  193. data/lib/stripe/services/billing/alert_service.rb +113 -0
  194. data/lib/stripe/services/billing/credit_balance_summary_service.rb +37 -0
  195. data/lib/stripe/services/billing/credit_balance_transaction_service.rb +40 -0
  196. data/lib/stripe/services/billing/credit_grant_service.rb +151 -0
  197. data/lib/stripe/services/billing/meter_event_adjustment_service.rb +26 -0
  198. data/lib/stripe/services/billing/meter_event_service.rb +21 -0
  199. data/lib/stripe/services/billing/meter_event_summary_service.rb +39 -0
  200. data/lib/stripe/services/billing/meter_service.rb +130 -0
  201. data/lib/stripe/services/billing_portal/configuration_service.rb +444 -0
  202. data/lib/stripe/services/billing_portal/session_service.rb +173 -0
  203. data/lib/stripe/services/capital/financing_offer_service.rb +112 -0
  204. data/lib/stripe/services/capital/financing_summary_service.rb +28 -0
  205. data/lib/stripe/services/capital/financing_transaction_service.rb +79 -0
  206. data/lib/stripe/services/capital_service.rb +15 -0
  207. data/lib/stripe/services/charge_service.rb +1736 -0
  208. data/lib/stripe/services/checkout/session_line_item_service.rb +18 -0
  209. data/lib/stripe/services/checkout/session_service.rb +2465 -0
  210. data/lib/stripe/services/climate/order_service.rb +102 -0
  211. data/lib/stripe/services/climate/product_service.rb +27 -0
  212. data/lib/stripe/services/climate/supplier_service.rb +27 -0
  213. data/lib/stripe/services/confirmation_token_service.rb +9 -0
  214. data/lib/stripe/services/country_spec_service.rb +27 -0
  215. data/lib/stripe/services/coupon_service.rb +152 -0
  216. data/lib/stripe/services/credit_note_line_item_service.rb +18 -0
  217. data/lib/stripe/services/credit_note_preview_lines_service.rb +156 -0
  218. data/lib/stripe/services/credit_note_service.rb +373 -0
  219. data/lib/stripe/services/customer_balance_transaction_service.rb +63 -0
  220. data/lib/stripe/services/customer_cash_balance_service.rb +29 -0
  221. data/lib/stripe/services/customer_cash_balance_transaction_service.rb +27 -0
  222. data/lib/stripe/services/customer_funding_instructions_service.rb +42 -0
  223. data/lib/stripe/services/customer_payment_method_service.rb +40 -0
  224. data/lib/stripe/services/customer_payment_source_service.rb +179 -0
  225. data/lib/stripe/services/customer_service.rb +593 -0
  226. data/lib/stripe/services/customer_session_service.rb +96 -0
  227. data/lib/stripe/services/customer_tax_id_service.rb +45 -0
  228. data/lib/stripe/services/dispute_service.rb +374 -0
  229. data/lib/stripe/services/entitlements/active_entitlement_service.rb +36 -0
  230. data/lib/stripe/services/entitlements/feature_service.rb +76 -0
  231. data/lib/stripe/services/ephemeral_key_service.rb +36 -0
  232. data/lib/stripe/services/event_service.rb +65 -0
  233. data/lib/stripe/services/exchange_rate_service.rb +27 -0
  234. data/lib/stripe/services/file_link_service.rb +94 -0
  235. data/lib/stripe/services/file_service.rb +89 -0
  236. data/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +37 -0
  237. data/lib/stripe/services/financial_connections/account_owner_service.rb +27 -0
  238. data/lib/stripe/services/financial_connections/account_service.rb +99 -1
  239. data/lib/stripe/services/financial_connections/institution_service.rb +57 -0
  240. data/lib/stripe/services/financial_connections/session_service.rb +97 -0
  241. data/lib/stripe/services/financial_connections/transaction_service.rb +70 -0
  242. data/lib/stripe/services/financial_connections_service.rb +2 -1
  243. data/lib/stripe/services/forwarding/request_service.rb +106 -0
  244. data/lib/stripe/services/gift_cards/card_service.rb +170 -0
  245. data/lib/stripe/services/gift_cards/transaction_service.rb +209 -0
  246. data/lib/stripe/services/gift_cards_service.rb +14 -0
  247. data/lib/stripe/services/identity/verification_report_service.rb +65 -0
  248. data/lib/stripe/services/identity/verification_session_service.rb +231 -0
  249. data/lib/stripe/services/invoice_item_service.rb +388 -0
  250. data/lib/stripe/services/invoice_line_item_service.rb +237 -0
  251. data/lib/stripe/services/invoice_payment_service.rb +55 -0
  252. data/lib/stripe/services/invoice_rendering_template_service.rb +51 -0
  253. data/lib/stripe/services/invoice_service.rb +5567 -1
  254. data/lib/stripe/services/invoice_upcoming_lines_service.rb +1864 -0
  255. data/lib/stripe/services/issuing/authorization_service.rb +104 -0
  256. data/lib/stripe/services/issuing/card_service.rb +455 -0
  257. data/lib/stripe/services/issuing/cardholder_service.rb +526 -0
  258. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +504 -0
  259. data/lib/stripe/services/issuing/dispute_service.rb +633 -0
  260. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +66 -0
  261. data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +83 -0
  262. data/lib/stripe/services/issuing/personalization_design_service.rb +193 -0
  263. data/lib/stripe/services/issuing/physical_bundle_service.rb +40 -0
  264. data/lib/stripe/services/issuing/token_service.rb +73 -0
  265. data/lib/stripe/services/issuing/transaction_service.rb +81 -0
  266. data/lib/stripe/services/issuing_service.rb +5 -1
  267. data/lib/stripe/services/mandate_service.rb +9 -0
  268. data/lib/stripe/services/margin_service.rb +119 -0
  269. data/lib/stripe/services/order_line_item_service.rb +35 -0
  270. data/lib/stripe/services/order_service.rb +2254 -0
  271. data/lib/stripe/services/payment_attempt_record_service.rb +49 -0
  272. data/lib/stripe/services/payment_intent_service.rb +10894 -0
  273. data/lib/stripe/services/payment_link_line_item_service.rb +18 -0
  274. data/lib/stripe/services/payment_link_service.rb +1223 -0
  275. data/lib/stripe/services/payment_method_configuration_service.rb +2046 -0
  276. data/lib/stripe/services/payment_method_domain_service.rb +76 -0
  277. data/lib/stripe/services/payment_method_service.rb +864 -0
  278. data/lib/stripe/services/payment_record_service.rb +542 -0
  279. data/lib/stripe/services/payout_service.rb +159 -0
  280. data/lib/stripe/services/plan_service.rb +253 -0
  281. data/lib/stripe/services/price_service.rb +516 -0
  282. data/lib/stripe/services/product_feature_service.rb +42 -0
  283. data/lib/stripe/services/product_service.rb +459 -0
  284. data/lib/stripe/services/promotion_code_service.rb +178 -0
  285. data/lib/stripe/services/quote_computed_upfront_line_items_service.rb +18 -0
  286. data/lib/stripe/services/quote_line_item_service.rb +18 -0
  287. data/lib/stripe/services/quote_line_service.rb +35 -0
  288. data/lib/stripe/services/quote_preview_invoice_service.rb +35 -0
  289. data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +35 -0
  290. data/lib/stripe/services/quote_service.rb +2319 -1
  291. data/lib/stripe/services/radar/early_fraud_warning_service.rb +61 -0
  292. data/lib/stripe/services/radar/value_list_item_service.rb +79 -0
  293. data/lib/stripe/services/radar/value_list_service.rb +103 -0
  294. data/lib/stripe/services/refund_service.rb +137 -0
  295. data/lib/stripe/services/reporting/report_run_service.rb +106 -0
  296. data/lib/stripe/services/reporting/report_type_service.rb +18 -0
  297. data/lib/stripe/services/review_service.rb +56 -0
  298. data/lib/stripe/services/setup_attempt_service.rb +51 -0
  299. data/lib/stripe/services/setup_intent_service.rb +3476 -0
  300. data/lib/stripe/services/shipping_rate_service.rb +200 -0
  301. data/lib/stripe/services/sigma/scheduled_query_run_service.rb +27 -0
  302. data/lib/stripe/services/source_service.rb +601 -0
  303. data/lib/stripe/services/source_transaction_service.rb +18 -0
  304. data/lib/stripe/services/subscription_item_service.rb +383 -0
  305. data/lib/stripe/services/subscription_item_usage_record_service.rb +18 -0
  306. data/lib/stripe/services/subscription_item_usage_record_summary_service.rb +18 -0
  307. data/lib/stripe/services/subscription_schedule_service.rb +2053 -0
  308. data/lib/stripe/services/subscription_service.rb +1722 -0
  309. data/lib/stripe/services/tax/association_service.rb +31 -0
  310. data/lib/stripe/services/tax/calculation_line_item_service.rb +18 -0
  311. data/lib/stripe/services/tax/calculation_service.rb +205 -0
  312. data/lib/stripe/services/tax/form_service.rb +100 -0
  313. data/lib/stripe/services/tax/registration_service.rb +1564 -0
  314. data/lib/stripe/services/tax/settings_service.rb +74 -0
  315. data/lib/stripe/services/tax/transaction_line_item_service.rb +18 -0
  316. data/lib/stripe/services/tax/transaction_service.rb +111 -0
  317. data/lib/stripe/services/tax_code_service.rb +27 -0
  318. data/lib/stripe/services/tax_id_service.rb +79 -0
  319. data/lib/stripe/services/tax_rate_service.rb +155 -0
  320. data/lib/stripe/services/tax_service.rb +3 -1
  321. data/lib/stripe/services/terminal/configuration_service.rb +793 -0
  322. data/lib/stripe/services/terminal/connection_token_service.rb +12 -0
  323. data/lib/stripe/services/terminal/location_service.rb +144 -0
  324. data/lib/stripe/services/terminal/reader_collected_data_service.rb +28 -0
  325. data/lib/stripe/services/terminal/reader_service.rb +443 -0
  326. data/lib/stripe/services/terminal_service.rb +2 -1
  327. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +673 -0
  328. data/lib/stripe/services/test_helpers/customer_service.rb +18 -0
  329. data/lib/stripe/services/test_helpers/issuing/authorization_service.rb +745 -0
  330. data/lib/stripe/services/test_helpers/issuing/card_service.rb +45 -0
  331. data/lib/stripe/services/test_helpers/issuing/personalization_design_service.rb +41 -0
  332. data/lib/stripe/services/test_helpers/issuing/transaction_service.rb +632 -0
  333. data/lib/stripe/services/test_helpers/refund_service.rb +9 -0
  334. data/lib/stripe/services/test_helpers/terminal/reader_service.rb +44 -0
  335. data/lib/stripe/services/test_helpers/test_clock_service.rb +57 -0
  336. data/lib/stripe/services/test_helpers/treasury/inbound_transfer_service.rb +38 -0
  337. data/lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb +87 -0
  338. data/lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb +87 -0
  339. data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +84 -0
  340. data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +84 -0
  341. data/lib/stripe/services/token_service.rb +1121 -0
  342. data/lib/stripe/services/topup_service.rb +142 -0
  343. data/lib/stripe/services/transfer_reversal_service.rb +66 -0
  344. data/lib/stripe/services/transfer_service.rb +119 -0
  345. data/lib/stripe/services/treasury/credit_reversal_service.rb +59 -0
  346. data/lib/stripe/services/treasury/debit_reversal_service.rb +63 -0
  347. data/lib/stripe/services/treasury/financial_account_features_service.rb +169 -0
  348. data/lib/stripe/services/treasury/financial_account_service.rb +509 -0
  349. data/lib/stripe/services/treasury/inbound_transfer_service.rb +88 -0
  350. data/lib/stripe/services/treasury/outbound_payment_service.rb +258 -0
  351. data/lib/stripe/services/treasury/outbound_transfer_service.rb +148 -0
  352. data/lib/stripe/services/treasury/received_credit_service.rb +52 -0
  353. data/lib/stripe/services/treasury/received_debit_service.rb +40 -0
  354. data/lib/stripe/services/treasury/transaction_entry_service.rb +87 -0
  355. data/lib/stripe/services/treasury/transaction_service.rb +95 -0
  356. data/lib/stripe/services/v1_services.rb +8 -1
  357. data/lib/stripe/services/v2/billing/meter_event_adjustment_service.rb +23 -0
  358. data/lib/stripe/services/v2/billing/meter_event_service.rb +25 -0
  359. data/lib/stripe/services/v2/billing/meter_event_session_service.rb +3 -0
  360. data/lib/stripe/services/v2/billing/meter_event_stream_service.rb +33 -0
  361. data/lib/stripe/services/v2/core/event_destination_service.rb +146 -0
  362. data/lib/stripe/services/v2/core/event_service.rb +18 -0
  363. data/lib/stripe/services/webhook_endpoint_service.rb +96 -0
  364. data/lib/stripe/services.rb +25 -0
  365. data/lib/stripe/stripe_client.rb +1 -1
  366. data/lib/stripe/stripe_configuration.rb +3 -1
  367. data/lib/stripe/stripe_object.rb +5 -0
  368. data/lib/stripe/util.rb +7 -1
  369. data/lib/stripe/version.rb +1 -1
  370. data/lib/stripe.rb +46 -0
  371. data/rbi/stripe/resources/account.rbi +5100 -0
  372. data/rbi/stripe/resources/account_link.rbi +74 -0
  373. data/rbi/stripe/resources/account_notice.rbi +139 -0
  374. data/rbi/stripe/resources/account_session.rbi +1007 -0
  375. data/rbi/stripe/resources/apple_pay_domain.rbi +97 -0
  376. data/rbi/stripe/resources/application.rbi +20 -0
  377. data/rbi/stripe/resources/application_fee.rbi +123 -0
  378. data/rbi/stripe/resources/application_fee_refund.rbi +37 -0
  379. data/rbi/stripe/resources/apps/secret.rbi +195 -0
  380. data/rbi/stripe/resources/balance.rbi +187 -0
  381. data/rbi/stripe/resources/balance_transaction.rbi +149 -0
  382. data/rbi/stripe/resources/bank_account.rbi +127 -0
  383. data/rbi/stripe/resources/billing/alert.rbi +206 -0
  384. data/rbi/stripe/resources/billing/alert_triggered.rbi +28 -0
  385. data/rbi/stripe/resources/billing/credit_balance_summary.rbi +102 -0
  386. data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +154 -0
  387. data/rbi/stripe/resources/billing/credit_grant.rbi +269 -0
  388. data/rbi/stripe/resources/billing/meter.rbi +233 -0
  389. data/rbi/stripe/resources/billing/meter_error_report.rbi +71 -0
  390. data/rbi/stripe/resources/billing/meter_event.rbi +64 -0
  391. data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +64 -0
  392. data/rbi/stripe/resources/billing/meter_event_summary.rbi +33 -0
  393. data/rbi/stripe/resources/billing_portal/configuration.rbi +640 -0
  394. data/rbi/stripe/resources/billing_portal/session.rbi +341 -0
  395. data/rbi/stripe/resources/capability.rbi +125 -0
  396. data/rbi/stripe/resources/capital/financing_offer.rbi +190 -0
  397. data/rbi/stripe/resources/capital/financing_summary.rbi +74 -0
  398. data/rbi/stripe/resources/capital/financing_transaction.rbi +130 -0
  399. data/rbi/stripe/resources/card.rbi +128 -0
  400. data/rbi/stripe/resources/cash_balance.rbi +32 -0
  401. data/rbi/stripe/resources/charge.rbi +3484 -0
  402. data/rbi/stripe/resources/checkout/session.rbi +3995 -0
  403. data/rbi/stripe/resources/climate/order.rbi +250 -0
  404. data/rbi/stripe/resources/climate/product.rbi +82 -0
  405. data/rbi/stripe/resources/climate/supplier.rbi +79 -0
  406. data/rbi/stripe/resources/confirmation_token.rbi +1776 -0
  407. data/rbi/stripe/resources/connect_collection_transfer.rbi +26 -0
  408. data/rbi/stripe/resources/country_spec.rbi +92 -0
  409. data/rbi/stripe/resources/coupon.rbi +257 -0
  410. data/rbi/stripe/resources/credit_note.rbi +759 -0
  411. data/rbi/stripe/resources/credit_note_line_item.rbi +99 -0
  412. data/rbi/stripe/resources/customer.rbi +1001 -0
  413. data/rbi/stripe/resources/customer_balance_transaction.rbi +53 -0
  414. data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +151 -0
  415. data/rbi/stripe/resources/customer_session.rbi +196 -0
  416. data/rbi/stripe/resources/discount.rbi +53 -0
  417. data/rbi/stripe/resources/dispute.rbi +764 -0
  418. data/rbi/stripe/resources/entitlements/active_entitlement.rbi +65 -0
  419. data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +23 -0
  420. data/rbi/stripe/resources/entitlements/feature.rbi +124 -0
  421. data/rbi/stripe/resources/ephemeral_key.rbi +44 -0
  422. data/rbi/stripe/resources/event.rbi +190 -0
  423. data/rbi/stripe/resources/exchange_rate.rbi +73 -0
  424. data/rbi/stripe/resources/file.rbi +148 -0
  425. data/rbi/stripe/resources/file_link.rbi +146 -0
  426. data/rbi/stripe/resources/financial_connections/account.rbi +358 -0
  427. data/rbi/stripe/resources/financial_connections/account_inferred_balance.rbi +27 -0
  428. data/rbi/stripe/resources/financial_connections/account_owner.rbi +35 -0
  429. data/rbi/stripe/resources/financial_connections/account_ownership.rbi +23 -0
  430. data/rbi/stripe/resources/financial_connections/institution.rbi +99 -0
  431. data/rbi/stripe/resources/financial_connections/session.rbi +186 -0
  432. data/rbi/stripe/resources/financial_connections/transaction.rbi +127 -0
  433. data/rbi/stripe/resources/forwarding/request.rbi +219 -0
  434. data/rbi/stripe/resources/funding_instructions.rbi +437 -0
  435. data/rbi/stripe/resources/gift_cards/card.rbi +206 -0
  436. data/rbi/stripe/resources/gift_cards/transaction.rbi +257 -0
  437. data/rbi/stripe/resources/identity/verification_report.rbi +354 -0
  438. data/rbi/stripe/resources/identity/verification_session.rbi +518 -0
  439. data/rbi/stripe/resources/invoice.rbi +8928 -0
  440. data/rbi/stripe/resources/invoice_item.rbi +514 -0
  441. data/rbi/stripe/resources/invoice_line_item.rbi +400 -0
  442. data/rbi/stripe/resources/invoice_payment.rbi +70 -0
  443. data/rbi/stripe/resources/invoice_rendering_template.rbi +114 -0
  444. data/rbi/stripe/resources/issuing/authorization.rbi +1266 -0
  445. data/rbi/stripe/resources/issuing/card.rbi +738 -0
  446. data/rbi/stripe/resources/issuing/cardholder.rbi +732 -0
  447. data/rbi/stripe/resources/issuing/credit_underwriting_record.rbi +622 -0
  448. data/rbi/stripe/resources/issuing/dispute.rbi +900 -0
  449. data/rbi/stripe/resources/issuing/dispute_settlement_detail.rbi +83 -0
  450. data/rbi/stripe/resources/issuing/fraud_liability_debit.rbi +90 -0
  451. data/rbi/stripe/resources/issuing/personalization_design.rbi +333 -0
  452. data/rbi/stripe/resources/issuing/physical_bundle.rbi +86 -0
  453. data/rbi/stripe/resources/issuing/settlement.rbi +62 -0
  454. data/rbi/stripe/resources/issuing/token.rbi +231 -0
  455. data/rbi/stripe/resources/issuing/transaction.rbi +1057 -0
  456. data/rbi/stripe/resources/line_item.rbi +108 -0
  457. data/rbi/stripe/resources/login_link.rbi +18 -0
  458. data/rbi/stripe/resources/mandate.rbi +219 -0
  459. data/rbi/stripe/resources/margin.rbi +127 -0
  460. data/rbi/stripe/resources/order.rbi +3016 -0
  461. data/rbi/stripe/resources/payment_attempt_record.rbi +215 -0
  462. data/rbi/stripe/resources/payment_intent.rbi +13843 -0
  463. data/rbi/stripe/resources/payment_link.rbi +1666 -0
  464. data/rbi/stripe/resources/payment_method.rbi +1908 -0
  465. data/rbi/stripe/resources/payment_method_configuration.rbi +3171 -0
  466. data/rbi/stripe/resources/payment_method_domain.rbi +217 -0
  467. data/rbi/stripe/resources/payment_record.rbi +722 -0
  468. data/rbi/stripe/resources/payout.rbi +299 -0
  469. data/rbi/stripe/resources/person.rbi +371 -0
  470. data/rbi/stripe/resources/plan.rbi +385 -0
  471. data/rbi/stripe/resources/price.rbi +731 -0
  472. data/rbi/stripe/resources/product.rbi +615 -0
  473. data/rbi/stripe/resources/product_feature.rbi +26 -0
  474. data/rbi/stripe/resources/promotion_code.rbi +266 -0
  475. data/rbi/stripe/resources/quote.rbi +3186 -0
  476. data/rbi/stripe/resources/quote_line.rbi +350 -0
  477. data/rbi/stripe/resources/quote_preview_invoice.rbi +850 -0
  478. data/rbi/stripe/resources/quote_preview_subscription_schedule.rbi +474 -0
  479. data/rbi/stripe/resources/radar/early_fraud_warning.rbi +101 -0
  480. data/rbi/stripe/resources/radar/value_list.rbi +175 -0
  481. data/rbi/stripe/resources/radar/value_list_item.rbi +134 -0
  482. data/rbi/stripe/resources/refund.rbi +515 -0
  483. data/rbi/stripe/resources/reporting/report_run.rbi +194 -0
  484. data/rbi/stripe/resources/reporting/report_type.rbi +64 -0
  485. data/rbi/stripe/resources/reserve_transaction.rbi +23 -0
  486. data/rbi/stripe/resources/reversal.rbi +51 -0
  487. data/rbi/stripe/resources/review.rbi +159 -0
  488. data/rbi/stripe/resources/setup_attempt.rbi +484 -0
  489. data/rbi/stripe/resources/setup_intent.rbi +4041 -0
  490. data/rbi/stripe/resources/shipping_rate.rbi +310 -0
  491. data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +82 -0
  492. data/rbi/stripe/resources/source.rbi +1543 -0
  493. data/rbi/stripe/resources/source_mandate_notification.rbi +77 -0
  494. data/rbi/stripe/resources/source_transaction.rbi +127 -0
  495. data/rbi/stripe/resources/subscription.rbi +2308 -0
  496. data/rbi/stripe/resources/subscription_item.rbi +478 -0
  497. data/rbi/stripe/resources/subscription_schedule.rbi +2653 -0
  498. data/rbi/stripe/resources/tax/association.rbi +94 -0
  499. data/rbi/stripe/resources/tax/calculation.rbi +479 -0
  500. data/rbi/stripe/resources/tax/calculation_line_item.rbi +88 -0
  501. data/rbi/stripe/resources/tax/form.rbi +224 -0
  502. data/rbi/stripe/resources/tax/registration.rbi +2438 -0
  503. data/rbi/stripe/resources/tax/settings.rbi +148 -0
  504. data/rbi/stripe/resources/tax/transaction.rbi +356 -0
  505. data/rbi/stripe/resources/tax/transaction_line_item.rbi +54 -0
  506. data/rbi/stripe/resources/tax_code.rbi +51 -0
  507. data/rbi/stripe/resources/tax_deducted_at_source.rbi +23 -0
  508. data/rbi/stripe/resources/tax_id.rbi +174 -0
  509. data/rbi/stripe/resources/tax_rate.rbi +244 -0
  510. data/rbi/stripe/resources/terminal/configuration.rbi +1091 -0
  511. data/rbi/stripe/resources/terminal/connection_token.rbi +37 -0
  512. data/rbi/stripe/resources/terminal/location.rbi +231 -0
  513. data/rbi/stripe/resources/terminal/reader.rbi +952 -0
  514. data/rbi/stripe/resources/terminal/reader_collected_data.rbi +41 -0
  515. data/rbi/stripe/resources/test_helpers/test_clock.rbi +139 -0
  516. data/rbi/stripe/resources/token.rbi +1175 -0
  517. data/rbi/stripe/resources/topup.rbi +225 -0
  518. data/rbi/stripe/resources/transfer.rbi +204 -0
  519. data/rbi/stripe/resources/treasury/credit_reversal.rbi +126 -0
  520. data/rbi/stripe/resources/treasury/debit_reversal.rbi +138 -0
  521. data/rbi/stripe/resources/treasury/financial_account.rbi +870 -0
  522. data/rbi/stripe/resources/treasury/financial_account_features.rbi +263 -0
  523. data/rbi/stripe/resources/treasury/inbound_transfer.rbi +302 -0
  524. data/rbi/stripe/resources/treasury/outbound_payment.rbi +589 -0
  525. data/rbi/stripe/resources/treasury/outbound_transfer.rbi +473 -0
  526. data/rbi/stripe/resources/treasury/received_credit.rbi +348 -0
  527. data/rbi/stripe/resources/treasury/received_debit.rbi +305 -0
  528. data/rbi/stripe/resources/treasury/transaction.rbi +216 -0
  529. data/rbi/stripe/resources/treasury/transaction_entry.rbi +193 -0
  530. data/rbi/stripe/resources/usage_record.rbi +32 -0
  531. data/rbi/stripe/resources/usage_record_summary.rbi +38 -0
  532. data/rbi/stripe/resources/v2/amount.rbi +14 -0
  533. data/rbi/stripe/resources/v2/billing/meter_event.rbi +37 -0
  534. data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +41 -0
  535. data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +31 -0
  536. data/rbi/stripe/resources/v2/event.rbi +47 -0
  537. data/rbi/stripe/resources/v2/event_destination.rbi +90 -0
  538. data/rbi/stripe/resources/webhook_endpoint.rbi +177 -0
  539. data/rbi/stripe/services/account_capability_service.rbi +51 -0
  540. data/rbi/stripe/services/account_external_account_service.rbi +306 -0
  541. data/rbi/stripe/services/account_link_service.rbi +58 -0
  542. data/rbi/stripe/services/account_login_link_service.rbi +22 -0
  543. data/rbi/stripe/services/account_notice_service.rbi +90 -0
  544. data/rbi/stripe/services/account_person_service.rbi +903 -0
  545. data/rbi/stripe/services/account_service.rbi +4185 -0
  546. data/rbi/stripe/services/account_session_service.rbi +757 -0
  547. data/rbi/stripe/services/apple_pay_domain_service.rbi +78 -0
  548. data/rbi/stripe/services/application_fee_refund_service.rbi +91 -0
  549. data/rbi/stripe/services/application_fee_service.rbi +74 -0
  550. data/rbi/stripe/services/apps/secret_service.rbi +151 -0
  551. data/rbi/stripe/services/apps_service.rbi +9 -0
  552. data/rbi/stripe/services/balance_service.rbi +21 -0
  553. data/rbi/stripe/services/balance_transaction_service.rbi +89 -0
  554. data/rbi/stripe/services/billing/alert_service.rbi +152 -0
  555. data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +54 -0
  556. data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +59 -0
  557. data/rbi/stripe/services/billing/credit_grant_service.rbi +191 -0
  558. data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +40 -0
  559. data/rbi/stripe/services/billing/meter_event_service.rbi +42 -0
  560. data/rbi/stripe/services/billing/meter_event_summary_service.rbi +54 -0
  561. data/rbi/stripe/services/billing/meter_service.rbi +163 -0
  562. data/rbi/stripe/services/billing_portal/configuration_service.rbi +497 -0
  563. data/rbi/stripe/services/billing_portal/session_service.rbi +202 -0
  564. data/rbi/stripe/services/billing_portal_service.rbi +10 -0
  565. data/rbi/stripe/services/billing_service.rbi +15 -0
  566. data/rbi/stripe/services/capital/financing_offer_service.rbi +95 -0
  567. data/rbi/stripe/services/capital/financing_summary_service.rbi +22 -0
  568. data/rbi/stripe/services/capital/financing_transaction_service.rbi +68 -0
  569. data/rbi/stripe/services/capital_service.rbi +11 -0
  570. data/rbi/stripe/services/charge_service.rbi +1816 -0
  571. data/rbi/stripe/services/checkout/session_line_item_service.rbi +33 -0
  572. data/rbi/stripe/services/checkout/session_service.rbi +2582 -0
  573. data/rbi/stripe/services/checkout_service.rbi +9 -0
  574. data/rbi/stripe/services/climate/order_service.rbi +140 -0
  575. data/rbi/stripe/services/climate/product_service.rbi +46 -0
  576. data/rbi/stripe/services/climate/supplier_service.rbi +46 -0
  577. data/rbi/stripe/services/climate_service.rbi +11 -0
  578. data/rbi/stripe/services/confirmation_token_service.rbi +20 -0
  579. data/rbi/stripe/services/country_spec_service.rbi +44 -0
  580. data/rbi/stripe/services/coupon_service.rbi +190 -0
  581. data/rbi/stripe/services/credit_note_line_item_service.rbi +31 -0
  582. data/rbi/stripe/services/credit_note_preview_lines_service.rbi +167 -0
  583. data/rbi/stripe/services/credit_note_service.rbi +420 -0
  584. data/rbi/stripe/services/customer_balance_transaction_service.rbi +92 -0
  585. data/rbi/stripe/services/customer_cash_balance_service.rbi +45 -0
  586. data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +44 -0
  587. data/rbi/stripe/services/customer_funding_instructions_service.rbi +59 -0
  588. data/rbi/stripe/services/customer_payment_method_service.rbi +57 -0
  589. data/rbi/stripe/services/customer_payment_source_service.rbi +228 -0
  590. data/rbi/stripe/services/customer_service.rbi +647 -0
  591. data/rbi/stripe/services/customer_session_service.rbi +110 -0
  592. data/rbi/stripe/services/customer_tax_id_service.rbi +72 -0
  593. data/rbi/stripe/services/dispute_service.rbi +422 -0
  594. data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +55 -0
  595. data/rbi/stripe/services/entitlements/feature_service.rbi +107 -0
  596. data/rbi/stripe/services/entitlements_service.rbi +10 -0
  597. data/rbi/stripe/services/ephemeral_key_service.rbi +53 -0
  598. data/rbi/stripe/services/event_service.rbi +81 -0
  599. data/rbi/stripe/services/exchange_rate_service.rbi +44 -0
  600. data/rbi/stripe/services/file_link_service.rbi +122 -0
  601. data/rbi/stripe/services/file_service.rbi +114 -0
  602. data/rbi/stripe/services/financial_connections/account_inferred_balance_service.rbi +33 -0
  603. data/rbi/stripe/services/financial_connections/account_owner_service.rbi +42 -0
  604. data/rbi/stripe/services/financial_connections/account_service.rbi +132 -0
  605. data/rbi/stripe/services/financial_connections/institution_service.rbi +46 -0
  606. data/rbi/stripe/services/financial_connections/session_service.rbi +111 -0
  607. data/rbi/stripe/services/financial_connections/transaction_service.rbi +90 -0
  608. data/rbi/stripe/services/financial_connections_service.rbi +12 -0
  609. data/rbi/stripe/services/forwarding/request_service.rbi +132 -0
  610. data/rbi/stripe/services/forwarding_service.rbi +9 -0
  611. data/rbi/stripe/services/gift_cards/card_service.rbi +142 -0
  612. data/rbi/stripe/services/gift_cards/transaction_service.rbi +174 -0
  613. data/rbi/stripe/services/gift_cards_service.rbi +10 -0
  614. data/rbi/stripe/services/identity/verification_report_service.rbi +85 -0
  615. data/rbi/stripe/services/identity/verification_session_service.rbi +317 -0
  616. data/rbi/stripe/services/identity_service.rbi +10 -0
  617. data/rbi/stripe/services/invoice_item_service.rbi +424 -0
  618. data/rbi/stripe/services/invoice_line_item_service.rbi +270 -0
  619. data/rbi/stripe/services/invoice_payment_service.rbi +44 -0
  620. data/rbi/stripe/services/invoice_rendering_template_service.rbi +82 -0
  621. data/rbi/stripe/services/invoice_service.rbi +6040 -0
  622. data/rbi/stripe/services/invoice_upcoming_lines_service.rbi +2023 -0
  623. data/rbi/stripe/services/issuing/authorization_service.rbi +140 -0
  624. data/rbi/stripe/services/issuing/card_service.rbi +479 -0
  625. data/rbi/stripe/services/issuing/cardholder_service.rbi +568 -0
  626. data/rbi/stripe/services/issuing/credit_underwriting_record_service.rbi +498 -0
  627. data/rbi/stripe/services/issuing/dispute_service.rbi +701 -0
  628. data/rbi/stripe/services/issuing/dispute_settlement_detail_service.rbi +55 -0
  629. data/rbi/stripe/services/issuing/fraud_liability_debit_service.rbi +73 -0
  630. data/rbi/stripe/services/issuing/personalization_design_service.rbi +233 -0
  631. data/rbi/stripe/services/issuing/physical_bundle_service.rbi +59 -0
  632. data/rbi/stripe/services/issuing/token_service.rbi +95 -0
  633. data/rbi/stripe/services/issuing/transaction_service.rbi +103 -0
  634. data/rbi/stripe/services/issuing_service.rbi +19 -0
  635. data/rbi/stripe/services/mandate_service.rbi +20 -0
  636. data/rbi/stripe/services/margin_service.rbi +104 -0
  637. data/rbi/stripe/services/order_line_item_service.rbi +31 -0
  638. data/rbi/stripe/services/order_service.rbi +2306 -0
  639. data/rbi/stripe/services/payment_attempt_record_service.rbi +36 -0
  640. data/rbi/stripe/services/payment_intent_service.rbi +11429 -0
  641. data/rbi/stripe/services/payment_link_line_item_service.rbi +31 -0
  642. data/rbi/stripe/services/payment_link_service.rbi +1250 -0
  643. data/rbi/stripe/services/payment_method_configuration_service.rbi +2171 -0
  644. data/rbi/stripe/services/payment_method_domain_service.rbi +110 -0
  645. data/rbi/stripe/services/payment_method_service.rbi +883 -0
  646. data/rbi/stripe/services/payment_record_service.rbi +521 -0
  647. data/rbi/stripe/services/payout_service.rbi +197 -0
  648. data/rbi/stripe/services/plan_service.rbi +286 -0
  649. data/rbi/stripe/services/price_service.rbi +551 -0
  650. data/rbi/stripe/services/product_feature_service.rbi +69 -0
  651. data/rbi/stripe/services/product_service.rbi +503 -0
  652. data/rbi/stripe/services/promotion_code_service.rbi +210 -0
  653. data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +31 -0
  654. data/rbi/stripe/services/quote_line_item_service.rbi +31 -0
  655. data/rbi/stripe/services/quote_line_service.rbi +31 -0
  656. data/rbi/stripe/services/quote_preview_invoice_service.rbi +31 -0
  657. data/rbi/stripe/services/quote_preview_subscription_schedule_service.rbi +31 -0
  658. data/rbi/stripe/services/quote_service.rbi +2390 -0
  659. data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +83 -0
  660. data/rbi/stripe/services/radar/value_list_item_service.rbi +107 -0
  661. data/rbi/stripe/services/radar/value_list_service.rbi +139 -0
  662. data/rbi/stripe/services/radar_service.rbi +11 -0
  663. data/rbi/stripe/services/refund_service.rbi +181 -0
  664. data/rbi/stripe/services/reporting/report_run_service.rbi +131 -0
  665. data/rbi/stripe/services/reporting/report_type_service.rbi +35 -0
  666. data/rbi/stripe/services/reporting_service.rbi +10 -0
  667. data/rbi/stripe/services/review_service.rbi +82 -0
  668. data/rbi/stripe/services/setup_attempt_service.rbi +63 -0
  669. data/rbi/stripe/services/setup_intent_service.rbi +3609 -0
  670. data/rbi/stripe/services/shipping_rate_service.rbi +235 -0
  671. data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +46 -0
  672. data/rbi/stripe/services/sigma_service.rbi +9 -0
  673. data/rbi/stripe/services/source_service.rbi +647 -0
  674. data/rbi/stripe/services/source_transaction_service.rbi +31 -0
  675. data/rbi/stripe/services/subscription_item_service.rbi +422 -0
  676. data/rbi/stripe/services/subscription_item_usage_record_service.rbi +37 -0
  677. data/rbi/stripe/services/subscription_item_usage_record_summary_service.rbi +33 -0
  678. data/rbi/stripe/services/subscription_schedule_service.rbi +2208 -0
  679. data/rbi/stripe/services/subscription_service.rbi +1870 -0
  680. data/rbi/stripe/services/tax/association_service.rbi +25 -0
  681. data/rbi/stripe/services/tax/calculation_line_item_service.rbi +33 -0
  682. data/rbi/stripe/services/tax/calculation_service.rbi +228 -0
  683. data/rbi/stripe/services/tax/form_service.rbi +85 -0
  684. data/rbi/stripe/services/tax/registration_service.rbi +1517 -0
  685. data/rbi/stripe/services/tax/settings_service.rbi +93 -0
  686. data/rbi/stripe/services/tax/transaction_line_item_service.rbi +33 -0
  687. data/rbi/stripe/services/tax/transaction_service.rbi +142 -0
  688. data/rbi/stripe/services/tax_code_service.rbi +44 -0
  689. data/rbi/stripe/services/tax_id_service.rbi +112 -0
  690. data/rbi/stripe/services/tax_rate_service.rbi +183 -0
  691. data/rbi/stripe/services/tax_service.rbi +14 -0
  692. data/rbi/stripe/services/terminal/configuration_service.rbi +822 -0
  693. data/rbi/stripe/services/terminal/connection_token_service.rbi +25 -0
  694. data/rbi/stripe/services/terminal/location_service.rbi +184 -0
  695. data/rbi/stripe/services/terminal/reader_collected_data_service.rbi +22 -0
  696. data/rbi/stripe/services/terminal/reader_service.rbi +513 -0
  697. data/rbi/stripe/services/terminal_service.rbi +13 -0
  698. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +778 -0
  699. data/rbi/stripe/services/test_helpers/customer_service.rbi +33 -0
  700. data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +836 -0
  701. data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +76 -0
  702. data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +67 -0
  703. data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +705 -0
  704. data/rbi/stripe/services/test_helpers/issuing_service.rbi +14 -0
  705. data/rbi/stripe/services/test_helpers/refund_service.rbi +22 -0
  706. data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +62 -0
  707. data/rbi/stripe/services/test_helpers/terminal_service.rbi +11 -0
  708. data/rbi/stripe/services/test_helpers/test_clock_service.rbi +90 -0
  709. data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +64 -0
  710. data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +123 -0
  711. data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +123 -0
  712. data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +114 -0
  713. data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +114 -0
  714. data/rbi/stripe/services/test_helpers/treasury_service.rbi +15 -0
  715. data/rbi/stripe/services/test_helpers_service.rbi +15 -0
  716. data/rbi/stripe/services/token_service.rbi +1136 -0
  717. data/rbi/stripe/services/topup_service.rbi +172 -0
  718. data/rbi/stripe/services/transfer_reversal_service.rbi +99 -0
  719. data/rbi/stripe/services/transfer_service.rbi +150 -0
  720. data/rbi/stripe/services/treasury/credit_reversal_service.rbi +84 -0
  721. data/rbi/stripe/services/treasury/debit_reversal_service.rbi +88 -0
  722. data/rbi/stripe/services/treasury/financial_account_features_service.rbi +201 -0
  723. data/rbi/stripe/services/treasury/financial_account_service.rbi +566 -0
  724. data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +117 -0
  725. data/rbi/stripe/services/treasury/outbound_payment_service.rbi +300 -0
  726. data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +182 -0
  727. data/rbi/stripe/services/treasury/received_credit_service.rbi +70 -0
  728. data/rbi/stripe/services/treasury/received_debit_service.rbi +59 -0
  729. data/rbi/stripe/services/treasury/transaction_entry_service.rbi +107 -0
  730. data/rbi/stripe/services/treasury/transaction_service.rbi +114 -0
  731. data/rbi/stripe/services/treasury_service.rbi +18 -0
  732. data/rbi/stripe/services/v1_services.rbi +83 -0
  733. data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +39 -0
  734. data/rbi/stripe/services/v2/billing/meter_event_service.rbi +42 -0
  735. data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +20 -0
  736. data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +55 -0
  737. data/rbi/stripe/services/v2/billing_service.rbi +14 -0
  738. data/rbi/stripe/services/v2/core/event_destination_service.rbi +203 -0
  739. data/rbi/stripe/services/v2/core/event_service.rbi +39 -0
  740. data/rbi/stripe/services/v2/core_service.rbi +12 -0
  741. data/rbi/stripe/services/v2_services.rbi +10 -0
  742. data/rbi/stripe/services/webhook_endpoint_service.rbi +131 -0
  743. metadata +435 -4
@@ -0,0 +1,2023 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ # typed: true
5
+ module Stripe
6
+ class InvoiceUpcomingLinesService < StripeService
7
+ class ListParams < Stripe::RequestParams
8
+ class AutomaticTax < Stripe::RequestParams
9
+ class Liability < Stripe::RequestParams
10
+ # The connected account being referenced when `type` is `account`.
11
+ sig { returns(String) }
12
+ attr_accessor :account
13
+ # Type of the account referenced in the request.
14
+ sig { returns(String) }
15
+ attr_accessor :type
16
+ sig { params(account: String, type: String).void }
17
+ def initialize(account: nil, type: nil); end
18
+ end
19
+ # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
20
+ sig { returns(T::Boolean) }
21
+ attr_accessor :enabled
22
+ # 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.
23
+ sig { returns(::Stripe::InvoiceUpcomingLinesService::ListParams::AutomaticTax::Liability) }
24
+ attr_accessor :liability
25
+ sig {
26
+ params(enabled: T::Boolean, liability: ::Stripe::InvoiceUpcomingLinesService::ListParams::AutomaticTax::Liability).void
27
+ }
28
+ def initialize(enabled: nil, liability: nil); end
29
+ end
30
+ class CustomerDetails < Stripe::RequestParams
31
+ class Address < Stripe::RequestParams
32
+ # City, district, suburb, town, or village.
33
+ sig { returns(String) }
34
+ attr_accessor :city
35
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
36
+ sig { returns(String) }
37
+ attr_accessor :country
38
+ # Address line 1 (e.g., street, PO Box, or company name).
39
+ sig { returns(String) }
40
+ attr_accessor :line1
41
+ # Address line 2 (e.g., apartment, suite, unit, or building).
42
+ sig { returns(String) }
43
+ attr_accessor :line2
44
+ # ZIP or postal code.
45
+ sig { returns(String) }
46
+ attr_accessor :postal_code
47
+ # State, county, province, or region.
48
+ sig { returns(String) }
49
+ attr_accessor :state
50
+ sig {
51
+ params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void
52
+ }
53
+ def initialize(
54
+ city: nil,
55
+ country: nil,
56
+ line1: nil,
57
+ line2: nil,
58
+ postal_code: nil,
59
+ state: nil
60
+ ); end
61
+ end
62
+ class Shipping < Stripe::RequestParams
63
+ class Address < Stripe::RequestParams
64
+ # City, district, suburb, town, or village.
65
+ sig { returns(String) }
66
+ attr_accessor :city
67
+ # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
68
+ sig { returns(String) }
69
+ attr_accessor :country
70
+ # Address line 1 (e.g., street, PO Box, or company name).
71
+ sig { returns(String) }
72
+ attr_accessor :line1
73
+ # Address line 2 (e.g., apartment, suite, unit, or building).
74
+ sig { returns(String) }
75
+ attr_accessor :line2
76
+ # ZIP or postal code.
77
+ sig { returns(String) }
78
+ attr_accessor :postal_code
79
+ # State, county, province, or region.
80
+ sig { returns(String) }
81
+ attr_accessor :state
82
+ sig {
83
+ params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void
84
+ }
85
+ def initialize(
86
+ city: nil,
87
+ country: nil,
88
+ line1: nil,
89
+ line2: nil,
90
+ postal_code: nil,
91
+ state: nil
92
+ ); end
93
+ end
94
+ # Customer shipping address.
95
+ sig {
96
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::CustomerDetails::Shipping::Address)
97
+ }
98
+ attr_accessor :address
99
+ # Customer name.
100
+ sig { returns(String) }
101
+ attr_accessor :name
102
+ # Customer phone (including extension).
103
+ sig { returns(String) }
104
+ attr_accessor :phone
105
+ sig {
106
+ params(address: ::Stripe::InvoiceUpcomingLinesService::ListParams::CustomerDetails::Shipping::Address, name: String, phone: String).void
107
+ }
108
+ def initialize(address: nil, name: nil, phone: nil); end
109
+ end
110
+ class Tax < Stripe::RequestParams
111
+ # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes.
112
+ sig { returns(T.nilable(String)) }
113
+ attr_accessor :ip_address
114
+ sig { params(ip_address: T.nilable(String)).void }
115
+ def initialize(ip_address: nil); end
116
+ end
117
+ class TaxId < Stripe::RequestParams
118
+ # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`
119
+ sig { returns(String) }
120
+ attr_accessor :type
121
+ # Value of the tax ID.
122
+ sig { returns(String) }
123
+ attr_accessor :value
124
+ sig { params(type: String, value: String).void }
125
+ def initialize(type: nil, value: nil); end
126
+ end
127
+ # The customer's address.
128
+ sig {
129
+ returns(T.nilable(::Stripe::InvoiceUpcomingLinesService::ListParams::CustomerDetails::Address))
130
+ }
131
+ attr_accessor :address
132
+ # The customer's shipping information. Appears on invoices emailed to this customer.
133
+ sig {
134
+ returns(T.nilable(::Stripe::InvoiceUpcomingLinesService::ListParams::CustomerDetails::Shipping))
135
+ }
136
+ attr_accessor :shipping
137
+ # Tax details about the customer.
138
+ sig { returns(::Stripe::InvoiceUpcomingLinesService::ListParams::CustomerDetails::Tax) }
139
+ attr_accessor :tax
140
+ # The customer's tax exemption. One of `none`, `exempt`, or `reverse`.
141
+ sig { returns(T.nilable(String)) }
142
+ attr_accessor :tax_exempt
143
+ # The customer's tax IDs.
144
+ sig {
145
+ returns(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::CustomerDetails::TaxId])
146
+ }
147
+ attr_accessor :tax_ids
148
+ sig {
149
+ params(address: T.nilable(::Stripe::InvoiceUpcomingLinesService::ListParams::CustomerDetails::Address), shipping: T.nilable(::Stripe::InvoiceUpcomingLinesService::ListParams::CustomerDetails::Shipping), tax: ::Stripe::InvoiceUpcomingLinesService::ListParams::CustomerDetails::Tax, tax_exempt: T.nilable(String), tax_ids: T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::CustomerDetails::TaxId]).void
150
+ }
151
+ def initialize(address: nil, shipping: nil, tax: nil, tax_exempt: nil, tax_ids: nil); end
152
+ end
153
+ class Discount < Stripe::RequestParams
154
+ class DiscountEnd < Stripe::RequestParams
155
+ class Duration < Stripe::RequestParams
156
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
157
+ sig { returns(String) }
158
+ attr_accessor :interval
159
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
160
+ sig { returns(Integer) }
161
+ attr_accessor :interval_count
162
+ sig { params(interval: String, interval_count: Integer).void }
163
+ def initialize(interval: nil, interval_count: nil); end
164
+ end
165
+ # Time span for the redeemed discount.
166
+ sig {
167
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::Discount::DiscountEnd::Duration)
168
+ }
169
+ attr_accessor :duration
170
+ # A precise Unix timestamp for the discount to end. Must be in the future.
171
+ sig { returns(Integer) }
172
+ attr_accessor :timestamp
173
+ # The type of calculation made to determine when the discount ends.
174
+ sig { returns(String) }
175
+ attr_accessor :type
176
+ sig {
177
+ params(duration: ::Stripe::InvoiceUpcomingLinesService::ListParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
178
+ }
179
+ def initialize(duration: nil, timestamp: nil, type: nil); end
180
+ end
181
+ # ID of the coupon to create a new discount for.
182
+ sig { returns(String) }
183
+ attr_accessor :coupon
184
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
185
+ sig { returns(String) }
186
+ attr_accessor :discount
187
+ # Details to determine how long the discount should be applied for.
188
+ sig { returns(::Stripe::InvoiceUpcomingLinesService::ListParams::Discount::DiscountEnd) }
189
+ attr_accessor :discount_end
190
+ # ID of the promotion code to create a new discount for.
191
+ sig { returns(String) }
192
+ attr_accessor :promotion_code
193
+ sig {
194
+ params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceUpcomingLinesService::ListParams::Discount::DiscountEnd, promotion_code: String).void
195
+ }
196
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end
197
+ end
198
+ class InvoiceItem < Stripe::RequestParams
199
+ class Discount < Stripe::RequestParams
200
+ class DiscountEnd < Stripe::RequestParams
201
+ class Duration < Stripe::RequestParams
202
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
203
+ sig { returns(String) }
204
+ attr_accessor :interval
205
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
206
+ sig { returns(Integer) }
207
+ attr_accessor :interval_count
208
+ sig { params(interval: String, interval_count: Integer).void }
209
+ def initialize(interval: nil, interval_count: nil); end
210
+ end
211
+ # Time span for the redeemed discount.
212
+ sig {
213
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::InvoiceItem::Discount::DiscountEnd::Duration)
214
+ }
215
+ attr_accessor :duration
216
+ # A precise Unix timestamp for the discount to end. Must be in the future.
217
+ sig { returns(Integer) }
218
+ attr_accessor :timestamp
219
+ # The type of calculation made to determine when the discount ends.
220
+ sig { returns(String) }
221
+ attr_accessor :type
222
+ sig {
223
+ params(duration: ::Stripe::InvoiceUpcomingLinesService::ListParams::InvoiceItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
224
+ }
225
+ def initialize(duration: nil, timestamp: nil, type: nil); end
226
+ end
227
+ # ID of the coupon to create a new discount for.
228
+ sig { returns(String) }
229
+ attr_accessor :coupon
230
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
231
+ sig { returns(String) }
232
+ attr_accessor :discount
233
+ # Details to determine how long the discount should be applied for.
234
+ sig {
235
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::InvoiceItem::Discount::DiscountEnd)
236
+ }
237
+ attr_accessor :discount_end
238
+ # ID of the promotion code to create a new discount for.
239
+ sig { returns(String) }
240
+ attr_accessor :promotion_code
241
+ sig {
242
+ params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceUpcomingLinesService::ListParams::InvoiceItem::Discount::DiscountEnd, promotion_code: String).void
243
+ }
244
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end
245
+ end
246
+ class Period < Stripe::RequestParams
247
+ # The end of the period, which must be greater than or equal to the start. This value is inclusive.
248
+ sig { returns(Integer) }
249
+ attr_accessor :end
250
+ # The start of the period. This value is inclusive.
251
+ sig { returns(Integer) }
252
+ attr_accessor :start
253
+ sig { params(end_: Integer, start: Integer).void }
254
+ def initialize(end_: nil, start: nil); end
255
+ end
256
+ class PriceData < Stripe::RequestParams
257
+ # 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).
258
+ sig { returns(String) }
259
+ attr_accessor :currency
260
+ # The ID of the product that this price will belong to.
261
+ sig { returns(String) }
262
+ attr_accessor :product
263
+ # 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.
264
+ sig { returns(String) }
265
+ attr_accessor :tax_behavior
266
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
267
+ sig { returns(Integer) }
268
+ attr_accessor :unit_amount
269
+ # 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.
270
+ sig { returns(String) }
271
+ attr_accessor :unit_amount_decimal
272
+ sig {
273
+ params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void
274
+ }
275
+ def initialize(
276
+ currency: nil,
277
+ product: nil,
278
+ tax_behavior: nil,
279
+ unit_amount: nil,
280
+ unit_amount_decimal: nil
281
+ ); end
282
+ end
283
+ # The integer amount in cents (or local equivalent) of previewed invoice item.
284
+ sig { returns(Integer) }
285
+ attr_accessor :amount
286
+ # 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). Only applicable to new invoice items.
287
+ sig { returns(String) }
288
+ attr_accessor :currency
289
+ # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
290
+ sig { returns(String) }
291
+ attr_accessor :description
292
+ # Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items.
293
+ sig { returns(T::Boolean) }
294
+ attr_accessor :discountable
295
+ # The coupons to redeem into discounts for the invoice item in the preview.
296
+ sig {
297
+ returns(T.nilable(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::InvoiceItem::Discount]))
298
+ }
299
+ attr_accessor :discounts
300
+ # The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice.
301
+ sig { returns(String) }
302
+ attr_accessor :invoiceitem
303
+ # 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`.
304
+ sig { returns(T.nilable(T::Hash[String, String])) }
305
+ attr_accessor :metadata
306
+ # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
307
+ sig { returns(::Stripe::InvoiceUpcomingLinesService::ListParams::InvoiceItem::Period) }
308
+ attr_accessor :period
309
+ # The ID of the price object. One of `price` or `price_data` is required.
310
+ sig { returns(String) }
311
+ attr_accessor :price
312
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
313
+ sig { returns(::Stripe::InvoiceUpcomingLinesService::ListParams::InvoiceItem::PriceData) }
314
+ attr_accessor :price_data
315
+ # Non-negative integer. The quantity of units for the invoice item.
316
+ sig { returns(Integer) }
317
+ attr_accessor :quantity
318
+ # 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.
319
+ sig { returns(String) }
320
+ attr_accessor :tax_behavior
321
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
322
+ sig { returns(T.nilable(String)) }
323
+ attr_accessor :tax_code
324
+ # The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item.
325
+ sig { returns(T.nilable(T::Array[String])) }
326
+ attr_accessor :tax_rates
327
+ # The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount.
328
+ sig { returns(Integer) }
329
+ attr_accessor :unit_amount
330
+ # 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.
331
+ sig { returns(String) }
332
+ attr_accessor :unit_amount_decimal
333
+ sig {
334
+ params(amount: Integer, currency: String, description: String, discountable: T::Boolean, discounts: T.nilable(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::InvoiceItem::Discount]), invoiceitem: String, metadata: T.nilable(T::Hash[String, String]), period: ::Stripe::InvoiceUpcomingLinesService::ListParams::InvoiceItem::Period, price: String, price_data: ::Stripe::InvoiceUpcomingLinesService::ListParams::InvoiceItem::PriceData, quantity: Integer, tax_behavior: String, tax_code: T.nilable(String), tax_rates: T.nilable(T::Array[String]), unit_amount: Integer, unit_amount_decimal: String).void
335
+ }
336
+ def initialize(
337
+ amount: nil,
338
+ currency: nil,
339
+ description: nil,
340
+ discountable: nil,
341
+ discounts: nil,
342
+ invoiceitem: nil,
343
+ metadata: nil,
344
+ period: nil,
345
+ price: nil,
346
+ price_data: nil,
347
+ quantity: nil,
348
+ tax_behavior: nil,
349
+ tax_code: nil,
350
+ tax_rates: nil,
351
+ unit_amount: nil,
352
+ unit_amount_decimal: nil
353
+ ); end
354
+ end
355
+ class Issuer < Stripe::RequestParams
356
+ # The connected account being referenced when `type` is `account`.
357
+ sig { returns(String) }
358
+ attr_accessor :account
359
+ # Type of the account referenced in the request.
360
+ sig { returns(String) }
361
+ attr_accessor :type
362
+ sig { params(account: String, type: String).void }
363
+ def initialize(account: nil, type: nil); end
364
+ end
365
+ class ScheduleDetails < Stripe::RequestParams
366
+ class Amendment < Stripe::RequestParams
367
+ class AmendmentEnd < Stripe::RequestParams
368
+ class DiscountEnd < Stripe::RequestParams
369
+ # The ID of a specific discount.
370
+ sig { returns(String) }
371
+ attr_accessor :discount
372
+ sig { params(discount: String).void }
373
+ def initialize(discount: nil); end
374
+ end
375
+ class Duration < Stripe::RequestParams
376
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
377
+ sig { returns(String) }
378
+ attr_accessor :interval
379
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
380
+ sig { returns(Integer) }
381
+ attr_accessor :interval_count
382
+ sig { params(interval: String, interval_count: Integer).void }
383
+ def initialize(interval: nil, interval_count: nil); end
384
+ end
385
+ # Use the `end` time of a given discount.
386
+ sig {
387
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::AmendmentEnd::DiscountEnd)
388
+ }
389
+ attr_accessor :discount_end
390
+ # Time span for the amendment starting from the `amendment_start`.
391
+ sig {
392
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::AmendmentEnd::Duration)
393
+ }
394
+ attr_accessor :duration
395
+ # A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
396
+ sig { returns(Integer) }
397
+ attr_accessor :timestamp
398
+ # Select one of three ways to pass the `amendment_end`.
399
+ sig { returns(String) }
400
+ attr_accessor :type
401
+ sig {
402
+ params(discount_end: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::AmendmentEnd::DiscountEnd, duration: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::AmendmentEnd::Duration, timestamp: Integer, type: String).void
403
+ }
404
+ def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil); end
405
+ end
406
+ class AmendmentStart < Stripe::RequestParams
407
+ class AmendmentEnd < Stripe::RequestParams
408
+ # 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.
409
+ sig { returns(Integer) }
410
+ attr_accessor :index
411
+ sig { params(index: Integer).void }
412
+ def initialize(index: nil); end
413
+ end
414
+ class DiscountEnd < Stripe::RequestParams
415
+ # The ID of a specific discount.
416
+ sig { returns(String) }
417
+ attr_accessor :discount
418
+ sig { params(discount: String).void }
419
+ def initialize(discount: nil); end
420
+ end
421
+ # Details of another amendment in the same array, immediately after which this amendment should begin.
422
+ sig {
423
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::AmendmentStart::AmendmentEnd)
424
+ }
425
+ attr_accessor :amendment_end
426
+ # Use the `end` time of a given discount.
427
+ sig {
428
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::AmendmentStart::DiscountEnd)
429
+ }
430
+ attr_accessor :discount_end
431
+ # A precise Unix timestamp for the amendment to start.
432
+ sig { returns(Integer) }
433
+ attr_accessor :timestamp
434
+ # Select one of three ways to pass the `amendment_start`.
435
+ sig { returns(String) }
436
+ attr_accessor :type
437
+ sig {
438
+ params(amendment_end: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::AmendmentStart::AmendmentEnd, discount_end: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::AmendmentStart::DiscountEnd, timestamp: Integer, type: String).void
439
+ }
440
+ def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil); end
441
+ end
442
+ class DiscountAction < Stripe::RequestParams
443
+ class Add < Stripe::RequestParams
444
+ class DiscountEnd < Stripe::RequestParams
445
+ # The type of calculation made to determine when the discount ends.
446
+ sig { returns(String) }
447
+ attr_accessor :type
448
+ sig { params(type: String).void }
449
+ def initialize(type: nil); end
450
+ end
451
+ # The coupon code to redeem.
452
+ sig { returns(String) }
453
+ attr_accessor :coupon
454
+ # An ID of an existing discount for a coupon that was already redeemed.
455
+ sig { returns(String) }
456
+ attr_accessor :discount
457
+ # Details to determine how long the discount should be applied for.
458
+ sig {
459
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::DiscountAction::Add::DiscountEnd)
460
+ }
461
+ attr_accessor :discount_end
462
+ # 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.
463
+ sig { returns(Integer) }
464
+ attr_accessor :index
465
+ # The promotion code to redeem.
466
+ sig { returns(String) }
467
+ attr_accessor :promotion_code
468
+ sig {
469
+ params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::DiscountAction::Add::DiscountEnd, index: Integer, promotion_code: String).void
470
+ }
471
+ def initialize(
472
+ coupon: nil,
473
+ discount: nil,
474
+ discount_end: nil,
475
+ index: nil,
476
+ promotion_code: nil
477
+ ); end
478
+ end
479
+ class Remove < Stripe::RequestParams
480
+ # The coupon code to remove from the `discounts` array.
481
+ sig { returns(String) }
482
+ attr_accessor :coupon
483
+ # The ID of a discount to remove from the `discounts` array.
484
+ sig { returns(String) }
485
+ attr_accessor :discount
486
+ # The ID of a promotion code to remove from the `discounts` array.
487
+ sig { returns(String) }
488
+ attr_accessor :promotion_code
489
+ sig { params(coupon: String, discount: String, promotion_code: String).void }
490
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
491
+ end
492
+ class Set < Stripe::RequestParams
493
+ # The coupon code to replace the `discounts` array with.
494
+ sig { returns(String) }
495
+ attr_accessor :coupon
496
+ # An ID of an existing discount to replace the `discounts` array with.
497
+ sig { returns(String) }
498
+ attr_accessor :discount
499
+ # An ID of an existing promotion code to replace the `discounts` array with.
500
+ sig { returns(String) }
501
+ attr_accessor :promotion_code
502
+ sig { params(coupon: String, discount: String, promotion_code: String).void }
503
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
504
+ end
505
+ # Details of the discount to add.
506
+ sig {
507
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::DiscountAction::Add)
508
+ }
509
+ attr_accessor :add
510
+ # Details of the discount to remove.
511
+ sig {
512
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::DiscountAction::Remove)
513
+ }
514
+ attr_accessor :remove
515
+ # Details of the discount to replace the existing discounts with.
516
+ sig {
517
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::DiscountAction::Set)
518
+ }
519
+ attr_accessor :set
520
+ # Determines the type of discount action.
521
+ sig { returns(String) }
522
+ attr_accessor :type
523
+ sig {
524
+ params(add: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::DiscountAction::Add, remove: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::DiscountAction::Remove, set: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::DiscountAction::Set, type: String).void
525
+ }
526
+ def initialize(add: nil, remove: nil, set: nil, type: nil); end
527
+ end
528
+ class ItemAction < Stripe::RequestParams
529
+ class Add < Stripe::RequestParams
530
+ class Discount < Stripe::RequestParams
531
+ class DiscountEnd < Stripe::RequestParams
532
+ class Duration < Stripe::RequestParams
533
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
534
+ sig { returns(String) }
535
+ attr_accessor :interval
536
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
537
+ sig { returns(Integer) }
538
+ attr_accessor :interval_count
539
+ sig { params(interval: String, interval_count: Integer).void }
540
+ def initialize(interval: nil, interval_count: nil); end
541
+ end
542
+ # Time span for the redeemed discount.
543
+ sig {
544
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Add::Discount::DiscountEnd::Duration)
545
+ }
546
+ attr_accessor :duration
547
+ # A precise Unix timestamp for the discount to end. Must be in the future.
548
+ sig { returns(Integer) }
549
+ attr_accessor :timestamp
550
+ # The type of calculation made to determine when the discount ends.
551
+ sig { returns(String) }
552
+ attr_accessor :type
553
+ sig {
554
+ params(duration: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Add::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
555
+ }
556
+ def initialize(duration: nil, timestamp: nil, type: nil); end
557
+ end
558
+ # ID of the coupon to create a new discount for.
559
+ sig { returns(String) }
560
+ attr_accessor :coupon
561
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
562
+ sig { returns(String) }
563
+ attr_accessor :discount
564
+ # Details to determine how long the discount should be applied for.
565
+ sig {
566
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Add::Discount::DiscountEnd)
567
+ }
568
+ attr_accessor :discount_end
569
+ # ID of the promotion code to create a new discount for.
570
+ sig { returns(String) }
571
+ attr_accessor :promotion_code
572
+ sig {
573
+ params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Add::Discount::DiscountEnd, promotion_code: String).void
574
+ }
575
+ def initialize(
576
+ coupon: nil,
577
+ discount: nil,
578
+ discount_end: nil,
579
+ promotion_code: nil
580
+ ); end
581
+ end
582
+ class Trial < Stripe::RequestParams
583
+ # 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.
584
+ sig { returns(T::Array[String]) }
585
+ attr_accessor :converts_to
586
+ # Determines the type of trial for this item.
587
+ sig { returns(String) }
588
+ attr_accessor :type
589
+ sig { params(converts_to: T::Array[String], type: String).void }
590
+ def initialize(converts_to: nil, type: nil); end
591
+ end
592
+ # The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
593
+ sig {
594
+ returns(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Add::Discount])
595
+ }
596
+ attr_accessor :discounts
597
+ # 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`.
598
+ sig { returns(T::Hash[String, String]) }
599
+ attr_accessor :metadata
600
+ # The ID of the price object.
601
+ sig { returns(String) }
602
+ attr_accessor :price
603
+ # Quantity for this item.
604
+ sig { returns(Integer) }
605
+ attr_accessor :quantity
606
+ # 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`.
607
+ sig { returns(T::Array[String]) }
608
+ attr_accessor :tax_rates
609
+ # Options that configure the trial on the subscription item.
610
+ sig {
611
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Add::Trial)
612
+ }
613
+ attr_accessor :trial
614
+ sig {
615
+ params(discounts: T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Add::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Add::Trial).void
616
+ }
617
+ def initialize(
618
+ discounts: nil,
619
+ metadata: nil,
620
+ price: nil,
621
+ quantity: nil,
622
+ tax_rates: nil,
623
+ trial: nil
624
+ ); end
625
+ end
626
+ class Remove < Stripe::RequestParams
627
+ # ID of a price to remove.
628
+ sig { returns(String) }
629
+ attr_accessor :price
630
+ sig { params(price: String).void }
631
+ def initialize(price: nil); end
632
+ end
633
+ class Set < Stripe::RequestParams
634
+ class Discount < Stripe::RequestParams
635
+ class DiscountEnd < Stripe::RequestParams
636
+ class Duration < Stripe::RequestParams
637
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
638
+ sig { returns(String) }
639
+ attr_accessor :interval
640
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
641
+ sig { returns(Integer) }
642
+ attr_accessor :interval_count
643
+ sig { params(interval: String, interval_count: Integer).void }
644
+ def initialize(interval: nil, interval_count: nil); end
645
+ end
646
+ # Time span for the redeemed discount.
647
+ sig {
648
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Set::Discount::DiscountEnd::Duration)
649
+ }
650
+ attr_accessor :duration
651
+ # A precise Unix timestamp for the discount to end. Must be in the future.
652
+ sig { returns(Integer) }
653
+ attr_accessor :timestamp
654
+ # The type of calculation made to determine when the discount ends.
655
+ sig { returns(String) }
656
+ attr_accessor :type
657
+ sig {
658
+ params(duration: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Set::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
659
+ }
660
+ def initialize(duration: nil, timestamp: nil, type: nil); end
661
+ end
662
+ # ID of the coupon to create a new discount for.
663
+ sig { returns(String) }
664
+ attr_accessor :coupon
665
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
666
+ sig { returns(String) }
667
+ attr_accessor :discount
668
+ # Details to determine how long the discount should be applied for.
669
+ sig {
670
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Set::Discount::DiscountEnd)
671
+ }
672
+ attr_accessor :discount_end
673
+ # ID of the promotion code to create a new discount for.
674
+ sig { returns(String) }
675
+ attr_accessor :promotion_code
676
+ sig {
677
+ params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Set::Discount::DiscountEnd, promotion_code: String).void
678
+ }
679
+ def initialize(
680
+ coupon: nil,
681
+ discount: nil,
682
+ discount_end: nil,
683
+ promotion_code: nil
684
+ ); end
685
+ end
686
+ class Trial < Stripe::RequestParams
687
+ # 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.
688
+ sig { returns(T::Array[String]) }
689
+ attr_accessor :converts_to
690
+ # Determines the type of trial for this item.
691
+ sig { returns(String) }
692
+ attr_accessor :type
693
+ sig { params(converts_to: T::Array[String], type: String).void }
694
+ def initialize(converts_to: nil, type: nil); end
695
+ end
696
+ # 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`.
697
+ sig {
698
+ returns(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Set::Discount])
699
+ }
700
+ attr_accessor :discounts
701
+ # 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`.
702
+ sig { returns(T::Hash[String, String]) }
703
+ attr_accessor :metadata
704
+ # The ID of the price object.
705
+ sig { returns(String) }
706
+ attr_accessor :price
707
+ # 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`.
708
+ sig { returns(Integer) }
709
+ attr_accessor :quantity
710
+ # 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`.
711
+ sig { returns(T::Array[String]) }
712
+ attr_accessor :tax_rates
713
+ # 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`.
714
+ sig {
715
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Set::Trial)
716
+ }
717
+ attr_accessor :trial
718
+ sig {
719
+ params(discounts: T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Set::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Set::Trial).void
720
+ }
721
+ def initialize(
722
+ discounts: nil,
723
+ metadata: nil,
724
+ price: nil,
725
+ quantity: nil,
726
+ tax_rates: nil,
727
+ trial: nil
728
+ ); end
729
+ end
730
+ # 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.
731
+ sig {
732
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Add)
733
+ }
734
+ attr_accessor :add
735
+ # Details of the subscription item to remove.
736
+ sig {
737
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Remove)
738
+ }
739
+ attr_accessor :remove
740
+ # 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.
741
+ sig {
742
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Set)
743
+ }
744
+ attr_accessor :set
745
+ # Determines the type of item action.
746
+ sig { returns(String) }
747
+ attr_accessor :type
748
+ sig {
749
+ params(add: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Add, remove: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Remove, set: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Set, type: String).void
750
+ }
751
+ def initialize(add: nil, remove: nil, set: nil, type: nil); end
752
+ end
753
+ class MetadataAction < Stripe::RequestParams
754
+ # Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
755
+ sig { returns(T::Hash[String, String]) }
756
+ attr_accessor :add
757
+ # Keys to remove from schedule phase metadata.
758
+ sig { returns(T::Array[String]) }
759
+ attr_accessor :remove
760
+ # Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
761
+ sig { returns(T.nilable(T::Hash[String, String])) }
762
+ attr_accessor :set
763
+ # Select one of three ways to update phase-level `metadata` on subscription schedules.
764
+ sig { returns(String) }
765
+ attr_accessor :type
766
+ sig {
767
+ params(add: T::Hash[String, String], remove: T::Array[String], set: T.nilable(T::Hash[String, String]), type: String).void
768
+ }
769
+ def initialize(add: nil, remove: nil, set: nil, type: nil); end
770
+ end
771
+ class SetPauseCollection < Stripe::RequestParams
772
+ class Set < Stripe::RequestParams
773
+ # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
774
+ sig { returns(String) }
775
+ attr_accessor :behavior
776
+ sig { params(behavior: String).void }
777
+ def initialize(behavior: nil); end
778
+ end
779
+ # Details of the pause_collection behavior to apply to the amendment.
780
+ sig {
781
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::SetPauseCollection::Set)
782
+ }
783
+ attr_accessor :set
784
+ # Determines the type of the pause_collection amendment.
785
+ sig { returns(String) }
786
+ attr_accessor :type
787
+ sig {
788
+ params(set: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::SetPauseCollection::Set, type: String).void
789
+ }
790
+ def initialize(set: nil, type: nil); end
791
+ end
792
+ class TrialSettings < Stripe::RequestParams
793
+ class EndBehavior < Stripe::RequestParams
794
+ # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
795
+ sig { returns(String) }
796
+ attr_accessor :prorate_up_front
797
+ sig { params(prorate_up_front: String).void }
798
+ def initialize(prorate_up_front: nil); end
799
+ end
800
+ # Defines how the subscription should behave when a trial ends.
801
+ sig {
802
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::TrialSettings::EndBehavior)
803
+ }
804
+ attr_accessor :end_behavior
805
+ sig {
806
+ params(end_behavior: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::TrialSettings::EndBehavior).void
807
+ }
808
+ def initialize(end_behavior: nil); end
809
+ end
810
+ # 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.
811
+ sig {
812
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::AmendmentEnd)
813
+ }
814
+ attr_accessor :amendment_end
815
+ # Details to identify the earliest timestamp where the proposed change should take effect.
816
+ sig {
817
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::AmendmentStart)
818
+ }
819
+ attr_accessor :amendment_start
820
+ # 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.
821
+ sig { returns(String) }
822
+ attr_accessor :billing_cycle_anchor
823
+ # Changes to the coupons being redeemed or discounts being applied during the amendment time span.
824
+ sig {
825
+ returns(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::DiscountAction])
826
+ }
827
+ attr_accessor :discount_actions
828
+ # Changes to the subscription items during the amendment time span.
829
+ sig {
830
+ returns(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction])
831
+ }
832
+ attr_accessor :item_actions
833
+ # Instructions for how to modify phase metadata
834
+ sig {
835
+ returns(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::MetadataAction])
836
+ }
837
+ attr_accessor :metadata_actions
838
+ # 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`.
839
+ sig { returns(String) }
840
+ attr_accessor :proration_behavior
841
+ # Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
842
+ sig {
843
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::SetPauseCollection)
844
+ }
845
+ attr_accessor :set_pause_collection
846
+ # Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
847
+ sig { returns(String) }
848
+ attr_accessor :set_schedule_end
849
+ # Settings related to subscription trials.
850
+ sig {
851
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::TrialSettings)
852
+ }
853
+ attr_accessor :trial_settings
854
+ sig {
855
+ params(amendment_end: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::AmendmentEnd, amendment_start: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::AmendmentStart, billing_cycle_anchor: String, discount_actions: T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::DiscountAction], item_actions: T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction], metadata_actions: T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::MetadataAction], proration_behavior: String, set_pause_collection: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::SetPauseCollection, set_schedule_end: String, trial_settings: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::TrialSettings).void
856
+ }
857
+ def initialize(
858
+ amendment_end: nil,
859
+ amendment_start: nil,
860
+ billing_cycle_anchor: nil,
861
+ discount_actions: nil,
862
+ item_actions: nil,
863
+ metadata_actions: nil,
864
+ proration_behavior: nil,
865
+ set_pause_collection: nil,
866
+ set_schedule_end: nil,
867
+ trial_settings: nil
868
+ ); end
869
+ end
870
+ class Phase < Stripe::RequestParams
871
+ class AddInvoiceItem < Stripe::RequestParams
872
+ class Discount < Stripe::RequestParams
873
+ class DiscountEnd < Stripe::RequestParams
874
+ class Duration < Stripe::RequestParams
875
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
876
+ sig { returns(String) }
877
+ attr_accessor :interval
878
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
879
+ sig { returns(Integer) }
880
+ attr_accessor :interval_count
881
+ sig { params(interval: String, interval_count: Integer).void }
882
+ def initialize(interval: nil, interval_count: nil); end
883
+ end
884
+ # Time span for the redeemed discount.
885
+ sig {
886
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::AddInvoiceItem::Discount::DiscountEnd::Duration)
887
+ }
888
+ attr_accessor :duration
889
+ # A precise Unix timestamp for the discount to end. Must be in the future.
890
+ sig { returns(Integer) }
891
+ attr_accessor :timestamp
892
+ # The type of calculation made to determine when the discount ends.
893
+ sig { returns(String) }
894
+ attr_accessor :type
895
+ sig {
896
+ params(duration: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::AddInvoiceItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
897
+ }
898
+ def initialize(duration: nil, timestamp: nil, type: nil); end
899
+ end
900
+ # ID of the coupon to create a new discount for.
901
+ sig { returns(String) }
902
+ attr_accessor :coupon
903
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
904
+ sig { returns(String) }
905
+ attr_accessor :discount
906
+ # Details to determine how long the discount should be applied for.
907
+ sig {
908
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::AddInvoiceItem::Discount::DiscountEnd)
909
+ }
910
+ attr_accessor :discount_end
911
+ # ID of the promotion code to create a new discount for.
912
+ sig { returns(String) }
913
+ attr_accessor :promotion_code
914
+ sig {
915
+ params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::AddInvoiceItem::Discount::DiscountEnd, promotion_code: String).void
916
+ }
917
+ def initialize(
918
+ coupon: nil,
919
+ discount: nil,
920
+ discount_end: nil,
921
+ promotion_code: nil
922
+ ); end
923
+ end
924
+ class PriceData < Stripe::RequestParams
925
+ # 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).
926
+ sig { returns(String) }
927
+ attr_accessor :currency
928
+ # The ID of the product that this price will belong to.
929
+ sig { returns(String) }
930
+ attr_accessor :product
931
+ # 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.
932
+ sig { returns(String) }
933
+ attr_accessor :tax_behavior
934
+ # 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.
935
+ sig { returns(Integer) }
936
+ attr_accessor :unit_amount
937
+ # 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.
938
+ sig { returns(String) }
939
+ attr_accessor :unit_amount_decimal
940
+ sig {
941
+ params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void
942
+ }
943
+ def initialize(
944
+ currency: nil,
945
+ product: nil,
946
+ tax_behavior: nil,
947
+ unit_amount: nil,
948
+ unit_amount_decimal: nil
949
+ ); end
950
+ end
951
+ # The coupons to redeem into discounts for the item.
952
+ sig {
953
+ returns(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::AddInvoiceItem::Discount])
954
+ }
955
+ attr_accessor :discounts
956
+ # The ID of the price object. One of `price` or `price_data` is required.
957
+ sig { returns(String) }
958
+ attr_accessor :price
959
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
960
+ sig {
961
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::AddInvoiceItem::PriceData)
962
+ }
963
+ attr_accessor :price_data
964
+ # Quantity for this item. Defaults to 1.
965
+ sig { returns(Integer) }
966
+ attr_accessor :quantity
967
+ # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
968
+ sig { returns(T.nilable(T::Array[String])) }
969
+ attr_accessor :tax_rates
970
+ sig {
971
+ params(discounts: T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::AddInvoiceItem::Discount], price: String, price_data: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::AddInvoiceItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void
972
+ }
973
+ def initialize(
974
+ discounts: nil,
975
+ price: nil,
976
+ price_data: nil,
977
+ quantity: nil,
978
+ tax_rates: nil
979
+ ); end
980
+ end
981
+ class AutomaticTax < Stripe::RequestParams
982
+ class Liability < Stripe::RequestParams
983
+ # The connected account being referenced when `type` is `account`.
984
+ sig { returns(String) }
985
+ attr_accessor :account
986
+ # Type of the account referenced in the request.
987
+ sig { returns(String) }
988
+ attr_accessor :type
989
+ sig { params(account: String, type: String).void }
990
+ def initialize(account: nil, type: nil); end
991
+ end
992
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
993
+ sig { returns(T::Boolean) }
994
+ attr_accessor :enabled
995
+ # 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.
996
+ sig {
997
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::AutomaticTax::Liability)
998
+ }
999
+ attr_accessor :liability
1000
+ sig {
1001
+ params(enabled: T::Boolean, liability: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::AutomaticTax::Liability).void
1002
+ }
1003
+ def initialize(enabled: nil, liability: nil); end
1004
+ end
1005
+ class BillingThresholds < Stripe::RequestParams
1006
+ # Monetary threshold that triggers the subscription to advance to a new billing period
1007
+ sig { returns(Integer) }
1008
+ attr_accessor :amount_gte
1009
+ # 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.
1010
+ sig { returns(T::Boolean) }
1011
+ attr_accessor :reset_billing_cycle_anchor
1012
+ sig { params(amount_gte: Integer, reset_billing_cycle_anchor: T::Boolean).void }
1013
+ def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
1014
+ end
1015
+ class Discount < Stripe::RequestParams
1016
+ class DiscountEnd < Stripe::RequestParams
1017
+ class Duration < Stripe::RequestParams
1018
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1019
+ sig { returns(String) }
1020
+ attr_accessor :interval
1021
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1022
+ sig { returns(Integer) }
1023
+ attr_accessor :interval_count
1024
+ sig { params(interval: String, interval_count: Integer).void }
1025
+ def initialize(interval: nil, interval_count: nil); end
1026
+ end
1027
+ # Time span for the redeemed discount.
1028
+ sig {
1029
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Discount::DiscountEnd::Duration)
1030
+ }
1031
+ attr_accessor :duration
1032
+ # A precise Unix timestamp for the discount to end. Must be in the future.
1033
+ sig { returns(Integer) }
1034
+ attr_accessor :timestamp
1035
+ # The type of calculation made to determine when the discount ends.
1036
+ sig { returns(String) }
1037
+ attr_accessor :type
1038
+ sig {
1039
+ params(duration: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
1040
+ }
1041
+ def initialize(duration: nil, timestamp: nil, type: nil); end
1042
+ end
1043
+ # ID of the coupon to create a new discount for.
1044
+ sig { returns(String) }
1045
+ attr_accessor :coupon
1046
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
1047
+ sig { returns(String) }
1048
+ attr_accessor :discount
1049
+ # Details to determine how long the discount should be applied for.
1050
+ sig {
1051
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Discount::DiscountEnd)
1052
+ }
1053
+ attr_accessor :discount_end
1054
+ # ID of the promotion code to create a new discount for.
1055
+ sig { returns(String) }
1056
+ attr_accessor :promotion_code
1057
+ sig {
1058
+ params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Discount::DiscountEnd, promotion_code: String).void
1059
+ }
1060
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end
1061
+ end
1062
+ class InvoiceSettings < Stripe::RequestParams
1063
+ class Issuer < Stripe::RequestParams
1064
+ # The connected account being referenced when `type` is `account`.
1065
+ sig { returns(String) }
1066
+ attr_accessor :account
1067
+ # Type of the account referenced in the request.
1068
+ sig { returns(String) }
1069
+ attr_accessor :type
1070
+ sig { params(account: String, type: String).void }
1071
+ def initialize(account: nil, type: nil); end
1072
+ end
1073
+ # 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.
1074
+ sig { returns(T.nilable(T::Array[String])) }
1075
+ attr_accessor :account_tax_ids
1076
+ # 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`.
1077
+ sig { returns(Integer) }
1078
+ attr_accessor :days_until_due
1079
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
1080
+ sig {
1081
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::InvoiceSettings::Issuer)
1082
+ }
1083
+ attr_accessor :issuer
1084
+ sig {
1085
+ params(account_tax_ids: T.nilable(T::Array[String]), days_until_due: Integer, issuer: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::InvoiceSettings::Issuer).void
1086
+ }
1087
+ def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
1088
+ end
1089
+ class Item < Stripe::RequestParams
1090
+ class BillingThresholds < Stripe::RequestParams
1091
+ # 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))
1092
+ sig { returns(Integer) }
1093
+ attr_accessor :usage_gte
1094
+ sig { params(usage_gte: Integer).void }
1095
+ def initialize(usage_gte: nil); end
1096
+ end
1097
+ class Discount < Stripe::RequestParams
1098
+ class DiscountEnd < Stripe::RequestParams
1099
+ class Duration < Stripe::RequestParams
1100
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1101
+ sig { returns(String) }
1102
+ attr_accessor :interval
1103
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1104
+ sig { returns(Integer) }
1105
+ attr_accessor :interval_count
1106
+ sig { params(interval: String, interval_count: Integer).void }
1107
+ def initialize(interval: nil, interval_count: nil); end
1108
+ end
1109
+ # Time span for the redeemed discount.
1110
+ sig {
1111
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Item::Discount::DiscountEnd::Duration)
1112
+ }
1113
+ attr_accessor :duration
1114
+ # A precise Unix timestamp for the discount to end. Must be in the future.
1115
+ sig { returns(Integer) }
1116
+ attr_accessor :timestamp
1117
+ # The type of calculation made to determine when the discount ends.
1118
+ sig { returns(String) }
1119
+ attr_accessor :type
1120
+ sig {
1121
+ params(duration: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Item::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
1122
+ }
1123
+ def initialize(duration: nil, timestamp: nil, type: nil); end
1124
+ end
1125
+ # ID of the coupon to create a new discount for.
1126
+ sig { returns(String) }
1127
+ attr_accessor :coupon
1128
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
1129
+ sig { returns(String) }
1130
+ attr_accessor :discount
1131
+ # Details to determine how long the discount should be applied for.
1132
+ sig {
1133
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Item::Discount::DiscountEnd)
1134
+ }
1135
+ attr_accessor :discount_end
1136
+ # ID of the promotion code to create a new discount for.
1137
+ sig { returns(String) }
1138
+ attr_accessor :promotion_code
1139
+ sig {
1140
+ params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Item::Discount::DiscountEnd, promotion_code: String).void
1141
+ }
1142
+ def initialize(
1143
+ coupon: nil,
1144
+ discount: nil,
1145
+ discount_end: nil,
1146
+ promotion_code: nil
1147
+ ); end
1148
+ end
1149
+ class PriceData < Stripe::RequestParams
1150
+ class Recurring < Stripe::RequestParams
1151
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
1152
+ sig { returns(String) }
1153
+ attr_accessor :interval
1154
+ # 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).
1155
+ sig { returns(Integer) }
1156
+ attr_accessor :interval_count
1157
+ sig { params(interval: String, interval_count: Integer).void }
1158
+ def initialize(interval: nil, interval_count: nil); end
1159
+ end
1160
+ # 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).
1161
+ sig { returns(String) }
1162
+ attr_accessor :currency
1163
+ # The ID of the product that this price will belong to.
1164
+ sig { returns(String) }
1165
+ attr_accessor :product
1166
+ # The recurring components of a price such as `interval` and `interval_count`.
1167
+ sig {
1168
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Item::PriceData::Recurring)
1169
+ }
1170
+ attr_accessor :recurring
1171
+ # 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.
1172
+ sig { returns(String) }
1173
+ attr_accessor :tax_behavior
1174
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
1175
+ sig { returns(Integer) }
1176
+ attr_accessor :unit_amount
1177
+ # 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.
1178
+ sig { returns(String) }
1179
+ attr_accessor :unit_amount_decimal
1180
+ sig {
1181
+ params(currency: String, product: String, recurring: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Item::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void
1182
+ }
1183
+ def initialize(
1184
+ currency: nil,
1185
+ product: nil,
1186
+ recurring: nil,
1187
+ tax_behavior: nil,
1188
+ unit_amount: nil,
1189
+ unit_amount_decimal: nil
1190
+ ); end
1191
+ end
1192
+ class Trial < Stripe::RequestParams
1193
+ # 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.
1194
+ sig { returns(T::Array[String]) }
1195
+ attr_accessor :converts_to
1196
+ # Determines the type of trial for this item.
1197
+ sig { returns(String) }
1198
+ attr_accessor :type
1199
+ sig { params(converts_to: T::Array[String], type: String).void }
1200
+ def initialize(converts_to: nil, type: nil); end
1201
+ end
1202
+ # 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.
1203
+ sig {
1204
+ returns(T.nilable(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Item::BillingThresholds))
1205
+ }
1206
+ attr_accessor :billing_thresholds
1207
+ # The coupons to redeem into discounts for the subscription item.
1208
+ sig {
1209
+ returns(T.nilable(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Item::Discount]))
1210
+ }
1211
+ attr_accessor :discounts
1212
+ # 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`.
1213
+ sig { returns(T::Hash[String, String]) }
1214
+ attr_accessor :metadata
1215
+ # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
1216
+ sig { returns(String) }
1217
+ attr_accessor :plan
1218
+ # The ID of the price object.
1219
+ sig { returns(String) }
1220
+ attr_accessor :price
1221
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
1222
+ sig {
1223
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Item::PriceData)
1224
+ }
1225
+ attr_accessor :price_data
1226
+ # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
1227
+ sig { returns(Integer) }
1228
+ attr_accessor :quantity
1229
+ # 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.
1230
+ sig { returns(T.nilable(T::Array[String])) }
1231
+ attr_accessor :tax_rates
1232
+ # Options that configure the trial on the subscription item.
1233
+ sig {
1234
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Item::Trial)
1235
+ }
1236
+ attr_accessor :trial
1237
+ sig {
1238
+ params(billing_thresholds: T.nilable(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Item::BillingThresholds), discounts: T.nilable(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Item::Discount]), metadata: T::Hash[String, String], plan: String, price: String, price_data: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Item::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String]), trial: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Item::Trial).void
1239
+ }
1240
+ def initialize(
1241
+ billing_thresholds: nil,
1242
+ discounts: nil,
1243
+ metadata: nil,
1244
+ plan: nil,
1245
+ price: nil,
1246
+ price_data: nil,
1247
+ quantity: nil,
1248
+ tax_rates: nil,
1249
+ trial: nil
1250
+ ); end
1251
+ end
1252
+ class PauseCollection < Stripe::RequestParams
1253
+ # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
1254
+ sig { returns(String) }
1255
+ attr_accessor :behavior
1256
+ sig { params(behavior: String).void }
1257
+ def initialize(behavior: nil); end
1258
+ end
1259
+ class TransferData < Stripe::RequestParams
1260
+ # 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.
1261
+ sig { returns(Float) }
1262
+ attr_accessor :amount_percent
1263
+ # ID of an existing, connected Stripe account.
1264
+ sig { returns(String) }
1265
+ attr_accessor :destination
1266
+ sig { params(amount_percent: Float, destination: String).void }
1267
+ def initialize(amount_percent: nil, destination: nil); end
1268
+ end
1269
+ class TrialSettings < Stripe::RequestParams
1270
+ class EndBehavior < Stripe::RequestParams
1271
+ # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
1272
+ sig { returns(String) }
1273
+ attr_accessor :prorate_up_front
1274
+ sig { params(prorate_up_front: String).void }
1275
+ def initialize(prorate_up_front: nil); end
1276
+ end
1277
+ # Defines how the subscription should behave when a trial ends.
1278
+ sig {
1279
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::TrialSettings::EndBehavior)
1280
+ }
1281
+ attr_accessor :end_behavior
1282
+ sig {
1283
+ params(end_behavior: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::TrialSettings::EndBehavior).void
1284
+ }
1285
+ def initialize(end_behavior: nil); end
1286
+ end
1287
+ # 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.
1288
+ sig {
1289
+ returns(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::AddInvoiceItem])
1290
+ }
1291
+ attr_accessor :add_invoice_items
1292
+ # 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).
1293
+ sig { returns(Float) }
1294
+ attr_accessor :application_fee_percent
1295
+ # Automatic tax settings for this phase.
1296
+ sig {
1297
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::AutomaticTax)
1298
+ }
1299
+ attr_accessor :automatic_tax
1300
+ # 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).
1301
+ sig { returns(String) }
1302
+ attr_accessor :billing_cycle_anchor
1303
+ # 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.
1304
+ sig {
1305
+ returns(T.nilable(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::BillingThresholds))
1306
+ }
1307
+ attr_accessor :billing_thresholds
1308
+ # 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.
1309
+ sig { returns(String) }
1310
+ attr_accessor :collection_method
1311
+ # 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.
1312
+ sig { returns(String) }
1313
+ attr_accessor :coupon
1314
+ # 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).
1315
+ sig { returns(String) }
1316
+ attr_accessor :currency
1317
+ # 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.
1318
+ sig { returns(String) }
1319
+ attr_accessor :default_payment_method
1320
+ # 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.
1321
+ sig { returns(T.nilable(T::Array[String])) }
1322
+ attr_accessor :default_tax_rates
1323
+ # 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.
1324
+ sig { returns(T.nilable(String)) }
1325
+ attr_accessor :description
1326
+ # 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.
1327
+ sig {
1328
+ returns(T.nilable(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Discount]))
1329
+ }
1330
+ attr_accessor :discounts
1331
+ # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
1332
+ sig { returns(T.any(Integer, String)) }
1333
+ attr_accessor :end_date
1334
+ # All invoices will be billed using the specified settings.
1335
+ sig {
1336
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::InvoiceSettings)
1337
+ }
1338
+ attr_accessor :invoice_settings
1339
+ # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
1340
+ sig {
1341
+ returns(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Item])
1342
+ }
1343
+ attr_accessor :items
1344
+ # 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.
1345
+ sig { returns(Integer) }
1346
+ attr_accessor :iterations
1347
+ # 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`.
1348
+ sig { returns(T::Hash[String, String]) }
1349
+ attr_accessor :metadata
1350
+ # The account on behalf of which to charge, for each of the associated subscription's invoices.
1351
+ sig { returns(String) }
1352
+ attr_accessor :on_behalf_of
1353
+ # 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).
1354
+ sig {
1355
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::PauseCollection)
1356
+ }
1357
+ attr_accessor :pause_collection
1358
+ # 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.
1359
+ sig { returns(String) }
1360
+ attr_accessor :proration_behavior
1361
+ # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
1362
+ sig { returns(T.any(Integer, String)) }
1363
+ attr_accessor :start_date
1364
+ # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
1365
+ sig {
1366
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::TransferData)
1367
+ }
1368
+ attr_accessor :transfer_data
1369
+ # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
1370
+ sig { returns(T::Boolean) }
1371
+ attr_accessor :trial
1372
+ # Specify trial behavior when crossing phase boundaries
1373
+ sig { returns(String) }
1374
+ attr_accessor :trial_continuation
1375
+ # 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`
1376
+ sig { returns(T.any(Integer, String)) }
1377
+ attr_accessor :trial_end
1378
+ # Settings related to subscription trials.
1379
+ sig {
1380
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::TrialSettings)
1381
+ }
1382
+ attr_accessor :trial_settings
1383
+ sig {
1384
+ params(add_invoice_items: T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::AddInvoiceItem], application_fee_percent: Float, automatic_tax: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::AutomaticTax, billing_cycle_anchor: String, billing_thresholds: T.nilable(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::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::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Discount]), end_date: T.any(Integer, String), invoice_settings: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::InvoiceSettings, items: T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Item], iterations: Integer, metadata: T::Hash[String, String], on_behalf_of: String, pause_collection: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::PauseCollection, proration_behavior: String, start_date: T.any(Integer, String), transfer_data: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::TransferData, trial: T::Boolean, trial_continuation: String, trial_end: T.any(Integer, String), trial_settings: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::TrialSettings).void
1385
+ }
1386
+ def initialize(
1387
+ add_invoice_items: nil,
1388
+ application_fee_percent: nil,
1389
+ automatic_tax: nil,
1390
+ billing_cycle_anchor: nil,
1391
+ billing_thresholds: nil,
1392
+ collection_method: nil,
1393
+ coupon: nil,
1394
+ currency: nil,
1395
+ default_payment_method: nil,
1396
+ default_tax_rates: nil,
1397
+ description: nil,
1398
+ discounts: nil,
1399
+ end_date: nil,
1400
+ invoice_settings: nil,
1401
+ items: nil,
1402
+ iterations: nil,
1403
+ metadata: nil,
1404
+ on_behalf_of: nil,
1405
+ pause_collection: nil,
1406
+ proration_behavior: nil,
1407
+ start_date: nil,
1408
+ transfer_data: nil,
1409
+ trial: nil,
1410
+ trial_continuation: nil,
1411
+ trial_end: nil,
1412
+ trial_settings: nil
1413
+ ); end
1414
+ end
1415
+ class Prebilling < Stripe::RequestParams
1416
+ class BillUntil < Stripe::RequestParams
1417
+ class AmendmentEnd < Stripe::RequestParams
1418
+ # 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.
1419
+ sig { returns(Integer) }
1420
+ attr_accessor :index
1421
+ sig { params(index: Integer).void }
1422
+ def initialize(index: nil); end
1423
+ end
1424
+ class Duration < Stripe::RequestParams
1425
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1426
+ sig { returns(String) }
1427
+ attr_accessor :interval
1428
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1429
+ sig { returns(Integer) }
1430
+ attr_accessor :interval_count
1431
+ sig { params(interval: String, interval_count: Integer).void }
1432
+ def initialize(interval: nil, interval_count: nil); end
1433
+ end
1434
+ # End the prebilled period when a specified amendment ends.
1435
+ sig {
1436
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Prebilling::BillUntil::AmendmentEnd)
1437
+ }
1438
+ attr_accessor :amendment_end
1439
+ # Time span for prebilling, starting from `bill_from`.
1440
+ sig {
1441
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Prebilling::BillUntil::Duration)
1442
+ }
1443
+ attr_accessor :duration
1444
+ # End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
1445
+ sig { returns(Integer) }
1446
+ attr_accessor :timestamp
1447
+ # Select one of several ways to pass the `bill_until` value.
1448
+ sig { returns(String) }
1449
+ attr_accessor :type
1450
+ sig {
1451
+ params(amendment_end: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Prebilling::BillUntil::AmendmentEnd, duration: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Prebilling::BillUntil::Duration, timestamp: Integer, type: String).void
1452
+ }
1453
+ def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil); end
1454
+ end
1455
+ # The end of the prebilled time period.
1456
+ sig {
1457
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Prebilling::BillUntil)
1458
+ }
1459
+ attr_accessor :bill_until
1460
+ # This is used to determine the number of billing cycles to prebill.
1461
+ sig { returns(Integer) }
1462
+ attr_accessor :iterations
1463
+ sig {
1464
+ params(bill_until: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Prebilling::BillUntil, iterations: Integer).void
1465
+ }
1466
+ def initialize(bill_until: nil, iterations: nil); end
1467
+ end
1468
+ # Changes to apply to the phases of the subscription schedule, in the order provided.
1469
+ sig {
1470
+ returns(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment])
1471
+ }
1472
+ attr_accessor :amendments
1473
+ # 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.
1474
+ sig { returns(String) }
1475
+ attr_accessor :billing_behavior
1476
+ # 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.
1477
+ sig { returns(String) }
1478
+ attr_accessor :end_behavior
1479
+ # 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.
1480
+ sig {
1481
+ returns(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase])
1482
+ }
1483
+ attr_accessor :phases
1484
+ # Provide any time periods to bill in advance.
1485
+ sig {
1486
+ returns(T.nilable(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Prebilling]))
1487
+ }
1488
+ attr_accessor :prebilling
1489
+ # In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
1490
+ sig { returns(String) }
1491
+ attr_accessor :proration_behavior
1492
+ sig {
1493
+ params(amendments: T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment], billing_behavior: String, end_behavior: String, phases: T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase], prebilling: T.nilable(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Prebilling]), proration_behavior: String).void
1494
+ }
1495
+ def initialize(
1496
+ amendments: nil,
1497
+ billing_behavior: nil,
1498
+ end_behavior: nil,
1499
+ phases: nil,
1500
+ prebilling: nil,
1501
+ proration_behavior: nil
1502
+ ); end
1503
+ end
1504
+ class SubscriptionDetails < Stripe::RequestParams
1505
+ class Item < Stripe::RequestParams
1506
+ class BillingThresholds < Stripe::RequestParams
1507
+ # 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))
1508
+ sig { returns(Integer) }
1509
+ attr_accessor :usage_gte
1510
+ sig { params(usage_gte: Integer).void }
1511
+ def initialize(usage_gte: nil); end
1512
+ end
1513
+ class Discount < Stripe::RequestParams
1514
+ class DiscountEnd < Stripe::RequestParams
1515
+ class Duration < Stripe::RequestParams
1516
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1517
+ sig { returns(String) }
1518
+ attr_accessor :interval
1519
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1520
+ sig { returns(Integer) }
1521
+ attr_accessor :interval_count
1522
+ sig { params(interval: String, interval_count: Integer).void }
1523
+ def initialize(interval: nil, interval_count: nil); end
1524
+ end
1525
+ # Time span for the redeemed discount.
1526
+ sig {
1527
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails::Item::Discount::DiscountEnd::Duration)
1528
+ }
1529
+ attr_accessor :duration
1530
+ # A precise Unix timestamp for the discount to end. Must be in the future.
1531
+ sig { returns(Integer) }
1532
+ attr_accessor :timestamp
1533
+ # The type of calculation made to determine when the discount ends.
1534
+ sig { returns(String) }
1535
+ attr_accessor :type
1536
+ sig {
1537
+ params(duration: ::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails::Item::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
1538
+ }
1539
+ def initialize(duration: nil, timestamp: nil, type: nil); end
1540
+ end
1541
+ # ID of the coupon to create a new discount for.
1542
+ sig { returns(String) }
1543
+ attr_accessor :coupon
1544
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
1545
+ sig { returns(String) }
1546
+ attr_accessor :discount
1547
+ # Details to determine how long the discount should be applied for.
1548
+ sig {
1549
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails::Item::Discount::DiscountEnd)
1550
+ }
1551
+ attr_accessor :discount_end
1552
+ # ID of the promotion code to create a new discount for.
1553
+ sig { returns(String) }
1554
+ attr_accessor :promotion_code
1555
+ sig {
1556
+ params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails::Item::Discount::DiscountEnd, promotion_code: String).void
1557
+ }
1558
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end
1559
+ end
1560
+ class PriceData < Stripe::RequestParams
1561
+ class Recurring < Stripe::RequestParams
1562
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
1563
+ sig { returns(String) }
1564
+ attr_accessor :interval
1565
+ # 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).
1566
+ sig { returns(Integer) }
1567
+ attr_accessor :interval_count
1568
+ sig { params(interval: String, interval_count: Integer).void }
1569
+ def initialize(interval: nil, interval_count: nil); end
1570
+ end
1571
+ # 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).
1572
+ sig { returns(String) }
1573
+ attr_accessor :currency
1574
+ # The ID of the product that this price will belong to.
1575
+ sig { returns(String) }
1576
+ attr_accessor :product
1577
+ # The recurring components of a price such as `interval` and `interval_count`.
1578
+ sig {
1579
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails::Item::PriceData::Recurring)
1580
+ }
1581
+ attr_accessor :recurring
1582
+ # 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.
1583
+ sig { returns(String) }
1584
+ attr_accessor :tax_behavior
1585
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
1586
+ sig { returns(Integer) }
1587
+ attr_accessor :unit_amount
1588
+ # 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.
1589
+ sig { returns(String) }
1590
+ attr_accessor :unit_amount_decimal
1591
+ sig {
1592
+ params(currency: String, product: String, recurring: ::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails::Item::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void
1593
+ }
1594
+ def initialize(
1595
+ currency: nil,
1596
+ product: nil,
1597
+ recurring: nil,
1598
+ tax_behavior: nil,
1599
+ unit_amount: nil,
1600
+ unit_amount_decimal: nil
1601
+ ); end
1602
+ end
1603
+ # 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.
1604
+ sig {
1605
+ returns(T.nilable(::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails::Item::BillingThresholds))
1606
+ }
1607
+ attr_accessor :billing_thresholds
1608
+ # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached.
1609
+ sig { returns(T::Boolean) }
1610
+ attr_accessor :clear_usage
1611
+ # A flag that, if set to `true`, will delete the specified item.
1612
+ sig { returns(T::Boolean) }
1613
+ attr_accessor :deleted
1614
+ # The coupons to redeem into discounts for the subscription item.
1615
+ sig {
1616
+ returns(T.nilable(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails::Item::Discount]))
1617
+ }
1618
+ attr_accessor :discounts
1619
+ # Subscription item to update.
1620
+ sig { returns(String) }
1621
+ attr_accessor :id
1622
+ # 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`.
1623
+ sig { returns(T.nilable(T::Hash[String, String])) }
1624
+ attr_accessor :metadata
1625
+ # Plan ID for this item, as a string.
1626
+ sig { returns(String) }
1627
+ attr_accessor :plan
1628
+ # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
1629
+ sig { returns(String) }
1630
+ attr_accessor :price
1631
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
1632
+ sig {
1633
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails::Item::PriceData)
1634
+ }
1635
+ attr_accessor :price_data
1636
+ # Quantity for this item.
1637
+ sig { returns(Integer) }
1638
+ attr_accessor :quantity
1639
+ # 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.
1640
+ sig { returns(T.nilable(T::Array[String])) }
1641
+ attr_accessor :tax_rates
1642
+ sig {
1643
+ params(billing_thresholds: T.nilable(::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails::Item::BillingThresholds), clear_usage: T::Boolean, deleted: T::Boolean, discounts: T.nilable(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails::Item::Discount]), id: String, metadata: T.nilable(T::Hash[String, String]), plan: String, price: String, price_data: ::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails::Item::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void
1644
+ }
1645
+ def initialize(
1646
+ billing_thresholds: nil,
1647
+ clear_usage: nil,
1648
+ deleted: nil,
1649
+ discounts: nil,
1650
+ id: nil,
1651
+ metadata: nil,
1652
+ plan: nil,
1653
+ price: nil,
1654
+ price_data: nil,
1655
+ quantity: nil,
1656
+ tax_rates: nil
1657
+ ); end
1658
+ end
1659
+ class Prebilling < Stripe::RequestParams
1660
+ # This is used to determine the number of billing cycles to prebill.
1661
+ sig { returns(Integer) }
1662
+ attr_accessor :iterations
1663
+ sig { params(iterations: Integer).void }
1664
+ def initialize(iterations: nil); end
1665
+ end
1666
+ # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`.
1667
+ sig { returns(T.any(String, Integer)) }
1668
+ attr_accessor :billing_cycle_anchor
1669
+ # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
1670
+ sig { returns(T.nilable(Integer)) }
1671
+ attr_accessor :cancel_at
1672
+ # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
1673
+ sig { returns(T::Boolean) }
1674
+ attr_accessor :cancel_at_period_end
1675
+ # This simulates the subscription being canceled or expired immediately.
1676
+ sig { returns(T::Boolean) }
1677
+ attr_accessor :cancel_now
1678
+ # If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set.
1679
+ sig { returns(T.nilable(T::Array[String])) }
1680
+ attr_accessor :default_tax_rates
1681
+ # A list of up to 20 subscription items, each with an attached price.
1682
+ sig {
1683
+ returns(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails::Item])
1684
+ }
1685
+ attr_accessor :items
1686
+ # The pre-billing to apply to the subscription as a preview.
1687
+ sig {
1688
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails::Prebilling)
1689
+ }
1690
+ attr_accessor :prebilling
1691
+ # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
1692
+ sig { returns(String) }
1693
+ attr_accessor :proration_behavior
1694
+ # If previewing an update to a subscription, and doing proration, `subscription_details.proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_details.items`, or `subscription_details.trial_end` are required. Also, `subscription_details.proration_behavior` cannot be set to 'none'.
1695
+ sig { returns(Integer) }
1696
+ attr_accessor :proration_date
1697
+ # For paused subscriptions, setting `subscription_details.resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed.
1698
+ sig { returns(String) }
1699
+ attr_accessor :resume_at
1700
+ # Date a subscription is intended to start (can be future or past).
1701
+ sig { returns(Integer) }
1702
+ attr_accessor :start_date
1703
+ # If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_details.items` or `subscription` is required.
1704
+ sig { returns(T.any(String, Integer)) }
1705
+ attr_accessor :trial_end
1706
+ sig {
1707
+ params(billing_cycle_anchor: T.any(String, Integer), cancel_at: T.nilable(Integer), cancel_at_period_end: T::Boolean, cancel_now: T::Boolean, default_tax_rates: T.nilable(T::Array[String]), items: T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails::Item], prebilling: ::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails::Prebilling, proration_behavior: String, proration_date: Integer, resume_at: String, start_date: Integer, trial_end: T.any(String, Integer)).void
1708
+ }
1709
+ def initialize(
1710
+ billing_cycle_anchor: nil,
1711
+ cancel_at: nil,
1712
+ cancel_at_period_end: nil,
1713
+ cancel_now: nil,
1714
+ default_tax_rates: nil,
1715
+ items: nil,
1716
+ prebilling: nil,
1717
+ proration_behavior: nil,
1718
+ proration_date: nil,
1719
+ resume_at: nil,
1720
+ start_date: nil,
1721
+ trial_end: nil
1722
+ ); end
1723
+ end
1724
+ class SubscriptionItem < Stripe::RequestParams
1725
+ class BillingThresholds < Stripe::RequestParams
1726
+ # 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))
1727
+ sig { returns(Integer) }
1728
+ attr_accessor :usage_gte
1729
+ sig { params(usage_gte: Integer).void }
1730
+ def initialize(usage_gte: nil); end
1731
+ end
1732
+ class Discount < Stripe::RequestParams
1733
+ class DiscountEnd < Stripe::RequestParams
1734
+ class Duration < Stripe::RequestParams
1735
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1736
+ sig { returns(String) }
1737
+ attr_accessor :interval
1738
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1739
+ sig { returns(Integer) }
1740
+ attr_accessor :interval_count
1741
+ sig { params(interval: String, interval_count: Integer).void }
1742
+ def initialize(interval: nil, interval_count: nil); end
1743
+ end
1744
+ # Time span for the redeemed discount.
1745
+ sig {
1746
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionItem::Discount::DiscountEnd::Duration)
1747
+ }
1748
+ attr_accessor :duration
1749
+ # A precise Unix timestamp for the discount to end. Must be in the future.
1750
+ sig { returns(Integer) }
1751
+ attr_accessor :timestamp
1752
+ # The type of calculation made to determine when the discount ends.
1753
+ sig { returns(String) }
1754
+ attr_accessor :type
1755
+ sig {
1756
+ params(duration: ::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
1757
+ }
1758
+ def initialize(duration: nil, timestamp: nil, type: nil); end
1759
+ end
1760
+ # ID of the coupon to create a new discount for.
1761
+ sig { returns(String) }
1762
+ attr_accessor :coupon
1763
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
1764
+ sig { returns(String) }
1765
+ attr_accessor :discount
1766
+ # Details to determine how long the discount should be applied for.
1767
+ sig {
1768
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionItem::Discount::DiscountEnd)
1769
+ }
1770
+ attr_accessor :discount_end
1771
+ # ID of the promotion code to create a new discount for.
1772
+ sig { returns(String) }
1773
+ attr_accessor :promotion_code
1774
+ sig {
1775
+ params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionItem::Discount::DiscountEnd, promotion_code: String).void
1776
+ }
1777
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end
1778
+ end
1779
+ class PriceData < Stripe::RequestParams
1780
+ class Recurring < Stripe::RequestParams
1781
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
1782
+ sig { returns(String) }
1783
+ attr_accessor :interval
1784
+ # 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).
1785
+ sig { returns(Integer) }
1786
+ attr_accessor :interval_count
1787
+ sig { params(interval: String, interval_count: Integer).void }
1788
+ def initialize(interval: nil, interval_count: nil); end
1789
+ end
1790
+ # 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).
1791
+ sig { returns(String) }
1792
+ attr_accessor :currency
1793
+ # The ID of the product that this price will belong to.
1794
+ sig { returns(String) }
1795
+ attr_accessor :product
1796
+ # The recurring components of a price such as `interval` and `interval_count`.
1797
+ sig {
1798
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionItem::PriceData::Recurring)
1799
+ }
1800
+ attr_accessor :recurring
1801
+ # 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.
1802
+ sig { returns(String) }
1803
+ attr_accessor :tax_behavior
1804
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
1805
+ sig { returns(Integer) }
1806
+ attr_accessor :unit_amount
1807
+ # 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.
1808
+ sig { returns(String) }
1809
+ attr_accessor :unit_amount_decimal
1810
+ sig {
1811
+ params(currency: String, product: String, recurring: ::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionItem::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void
1812
+ }
1813
+ def initialize(
1814
+ currency: nil,
1815
+ product: nil,
1816
+ recurring: nil,
1817
+ tax_behavior: nil,
1818
+ unit_amount: nil,
1819
+ unit_amount_decimal: nil
1820
+ ); end
1821
+ end
1822
+ # 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.
1823
+ sig {
1824
+ returns(T.nilable(::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionItem::BillingThresholds))
1825
+ }
1826
+ attr_accessor :billing_thresholds
1827
+ # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached.
1828
+ sig { returns(T::Boolean) }
1829
+ attr_accessor :clear_usage
1830
+ # A flag that, if set to `true`, will delete the specified item.
1831
+ sig { returns(T::Boolean) }
1832
+ attr_accessor :deleted
1833
+ # The coupons to redeem into discounts for the subscription item.
1834
+ sig {
1835
+ returns(T.nilable(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionItem::Discount]))
1836
+ }
1837
+ attr_accessor :discounts
1838
+ # Subscription item to update.
1839
+ sig { returns(String) }
1840
+ attr_accessor :id
1841
+ # 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`.
1842
+ sig { returns(T.nilable(T::Hash[String, String])) }
1843
+ attr_accessor :metadata
1844
+ # Plan ID for this item, as a string.
1845
+ sig { returns(String) }
1846
+ attr_accessor :plan
1847
+ # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
1848
+ sig { returns(String) }
1849
+ attr_accessor :price
1850
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
1851
+ sig {
1852
+ returns(::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionItem::PriceData)
1853
+ }
1854
+ attr_accessor :price_data
1855
+ # Quantity for this item.
1856
+ sig { returns(Integer) }
1857
+ attr_accessor :quantity
1858
+ # 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.
1859
+ sig { returns(T.nilable(T::Array[String])) }
1860
+ attr_accessor :tax_rates
1861
+ sig {
1862
+ params(billing_thresholds: T.nilable(::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionItem::BillingThresholds), clear_usage: T::Boolean, deleted: T::Boolean, discounts: T.nilable(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionItem::Discount]), id: String, metadata: T.nilable(T::Hash[String, String]), plan: String, price: String, price_data: ::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void
1863
+ }
1864
+ def initialize(
1865
+ billing_thresholds: nil,
1866
+ clear_usage: nil,
1867
+ deleted: nil,
1868
+ discounts: nil,
1869
+ id: nil,
1870
+ metadata: nil,
1871
+ plan: nil,
1872
+ price: nil,
1873
+ price_data: nil,
1874
+ quantity: nil,
1875
+ tax_rates: nil
1876
+ ); end
1877
+ end
1878
+ class SubscriptionPrebilling < Stripe::RequestParams
1879
+ # This is used to determine the number of billing cycles to prebill.
1880
+ sig { returns(Integer) }
1881
+ attr_accessor :iterations
1882
+ sig { params(iterations: Integer).void }
1883
+ def initialize(iterations: nil); end
1884
+ end
1885
+ # Settings for automatic tax lookup for this invoice preview.
1886
+ sig { returns(::Stripe::InvoiceUpcomingLinesService::ListParams::AutomaticTax) }
1887
+ attr_accessor :automatic_tax
1888
+ # 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.
1889
+ sig { returns(String) }
1890
+ attr_accessor :coupon
1891
+ # The currency to preview this invoice in. Defaults to that of `customer` if not specified.
1892
+ sig { returns(String) }
1893
+ attr_accessor :currency
1894
+ # The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
1895
+ sig { returns(String) }
1896
+ attr_accessor :customer
1897
+ # Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
1898
+ sig { returns(::Stripe::InvoiceUpcomingLinesService::ListParams::CustomerDetails) }
1899
+ attr_accessor :customer_details
1900
+ # The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts.
1901
+ sig {
1902
+ returns(T.nilable(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::Discount]))
1903
+ }
1904
+ attr_accessor :discounts
1905
+ # 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.
1906
+ sig { returns(String) }
1907
+ attr_accessor :ending_before
1908
+ # Specifies which fields in the response should be expanded.
1909
+ sig { returns(T::Array[String]) }
1910
+ attr_accessor :expand
1911
+ # List of invoice items to add or update in the upcoming invoice preview (up to 250).
1912
+ sig { returns(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::InvoiceItem]) }
1913
+ attr_accessor :invoice_items
1914
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
1915
+ sig { returns(::Stripe::InvoiceUpcomingLinesService::ListParams::Issuer) }
1916
+ attr_accessor :issuer
1917
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
1918
+ sig { returns(Integer) }
1919
+ attr_accessor :limit
1920
+ # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.
1921
+ sig { returns(T.nilable(String)) }
1922
+ attr_accessor :on_behalf_of
1923
+ # Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified.
1924
+ sig { returns(String) }
1925
+ attr_accessor :preview_mode
1926
+ # The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields.
1927
+ sig { returns(String) }
1928
+ attr_accessor :schedule
1929
+ # The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields.
1930
+ sig { returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails) }
1931
+ attr_accessor :schedule_details
1932
+ # 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.
1933
+ sig { returns(String) }
1934
+ attr_accessor :starting_after
1935
+ # The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions.
1936
+ sig { returns(String) }
1937
+ attr_accessor :subscription
1938
+ # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.billing_cycle_anchor` instead.
1939
+ sig { returns(T.any(String, Integer)) }
1940
+ attr_accessor :subscription_billing_cycle_anchor
1941
+ # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at` instead.
1942
+ sig { returns(T.nilable(Integer)) }
1943
+ attr_accessor :subscription_cancel_at
1944
+ # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at_period_end` instead.
1945
+ sig { returns(T::Boolean) }
1946
+ attr_accessor :subscription_cancel_at_period_end
1947
+ # This simulates the subscription being canceled or expired immediately. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_now` instead.
1948
+ sig { returns(T::Boolean) }
1949
+ attr_accessor :subscription_cancel_now
1950
+ # If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. This field has been deprecated and will be removed in a future API version. Use `subscription_details.default_tax_rates` instead.
1951
+ sig { returns(T.nilable(T::Array[String])) }
1952
+ attr_accessor :subscription_default_tax_rates
1953
+ # The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields.
1954
+ sig { returns(::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails) }
1955
+ attr_accessor :subscription_details
1956
+ # A list of up to 20 subscription items, each with an attached price. This field has been deprecated and will be removed in a future API version. Use `subscription_details.items` instead.
1957
+ sig { returns(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionItem]) }
1958
+ attr_accessor :subscription_items
1959
+ # The pre-billing to apply to the subscription as a preview. This field has been deprecated and will be removed in a future API version. Use `subscription_details.prebilling` instead.
1960
+ sig { returns(::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionPrebilling) }
1961
+ attr_accessor :subscription_prebilling
1962
+ # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_behavior` instead.
1963
+ sig { returns(String) }
1964
+ attr_accessor :subscription_proration_behavior
1965
+ # If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_date` instead.
1966
+ sig { returns(Integer) }
1967
+ attr_accessor :subscription_proration_date
1968
+ # For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. This field has been deprecated and will be removed in a future API version. Use `subscription_details.resume_at` instead.
1969
+ sig { returns(String) }
1970
+ attr_accessor :subscription_resume_at
1971
+ # Date a subscription is intended to start (can be future or past). This field has been deprecated and will be removed in a future API version. Use `subscription_details.start_date` instead.
1972
+ sig { returns(Integer) }
1973
+ attr_accessor :subscription_start_date
1974
+ # If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. This field has been deprecated and will be removed in a future API version. Use `subscription_details.trial_end` instead.
1975
+ sig { returns(T.any(String, Integer)) }
1976
+ attr_accessor :subscription_trial_end
1977
+ # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
1978
+ sig { returns(T::Boolean) }
1979
+ attr_accessor :subscription_trial_from_plan
1980
+ sig {
1981
+ params(automatic_tax: ::Stripe::InvoiceUpcomingLinesService::ListParams::AutomaticTax, coupon: String, currency: String, customer: String, customer_details: ::Stripe::InvoiceUpcomingLinesService::ListParams::CustomerDetails, discounts: T.nilable(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::Discount]), ending_before: String, expand: T::Array[String], invoice_items: T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::InvoiceItem], issuer: ::Stripe::InvoiceUpcomingLinesService::ListParams::Issuer, limit: Integer, on_behalf_of: T.nilable(String), preview_mode: String, schedule: String, schedule_details: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails, starting_after: String, subscription: String, subscription_billing_cycle_anchor: T.any(String, Integer), subscription_cancel_at: T.nilable(Integer), subscription_cancel_at_period_end: T::Boolean, subscription_cancel_now: T::Boolean, subscription_default_tax_rates: T.nilable(T::Array[String]), subscription_details: ::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails, subscription_items: T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionItem], subscription_prebilling: ::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionPrebilling, subscription_proration_behavior: String, subscription_proration_date: Integer, subscription_resume_at: String, subscription_start_date: Integer, subscription_trial_end: T.any(String, Integer), subscription_trial_from_plan: T::Boolean).void
1982
+ }
1983
+ def initialize(
1984
+ automatic_tax: nil,
1985
+ coupon: nil,
1986
+ currency: nil,
1987
+ customer: nil,
1988
+ customer_details: nil,
1989
+ discounts: nil,
1990
+ ending_before: nil,
1991
+ expand: nil,
1992
+ invoice_items: nil,
1993
+ issuer: nil,
1994
+ limit: nil,
1995
+ on_behalf_of: nil,
1996
+ preview_mode: nil,
1997
+ schedule: nil,
1998
+ schedule_details: nil,
1999
+ starting_after: nil,
2000
+ subscription: nil,
2001
+ subscription_billing_cycle_anchor: nil,
2002
+ subscription_cancel_at: nil,
2003
+ subscription_cancel_at_period_end: nil,
2004
+ subscription_cancel_now: nil,
2005
+ subscription_default_tax_rates: nil,
2006
+ subscription_details: nil,
2007
+ subscription_items: nil,
2008
+ subscription_prebilling: nil,
2009
+ subscription_proration_behavior: nil,
2010
+ subscription_proration_date: nil,
2011
+ subscription_resume_at: nil,
2012
+ subscription_start_date: nil,
2013
+ subscription_trial_end: nil,
2014
+ subscription_trial_from_plan: nil
2015
+ ); end
2016
+ end
2017
+ # When retrieving an upcoming invoice, you'll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
2018
+ sig {
2019
+ params(params: T.any(::Stripe::InvoiceUpcomingLinesService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
2020
+ }
2021
+ def list(params = {}, opts = {}); end
2022
+ end
2023
+ end