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
@@ -3,6 +3,1870 @@
3
3
 
4
4
  module Stripe
5
5
  class InvoiceUpcomingLinesService < StripeService
6
+ class ListParams < Stripe::RequestParams
7
+ class AutomaticTax < Stripe::RequestParams
8
+ class Liability < Stripe::RequestParams
9
+ # The connected account being referenced when `type` is `account`.
10
+ attr_accessor :account
11
+ # Type of the account referenced in the request.
12
+ attr_accessor :type
13
+
14
+ def initialize(account: nil, type: nil)
15
+ @account = account
16
+ @type = type
17
+ 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
+ attr_accessor :enabled
21
+ # 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.
22
+ attr_accessor :liability
23
+
24
+ def initialize(enabled: nil, liability: nil)
25
+ @enabled = enabled
26
+ @liability = liability
27
+ end
28
+ end
29
+
30
+ class CustomerDetails < Stripe::RequestParams
31
+ class Address < Stripe::RequestParams
32
+ # City, district, suburb, town, or village.
33
+ attr_accessor :city
34
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
35
+ attr_accessor :country
36
+ # Address line 1 (e.g., street, PO Box, or company name).
37
+ attr_accessor :line1
38
+ # Address line 2 (e.g., apartment, suite, unit, or building).
39
+ attr_accessor :line2
40
+ # ZIP or postal code.
41
+ attr_accessor :postal_code
42
+ # State, county, province, or region.
43
+ attr_accessor :state
44
+
45
+ def initialize(
46
+ city: nil,
47
+ country: nil,
48
+ line1: nil,
49
+ line2: nil,
50
+ postal_code: nil,
51
+ state: nil
52
+ )
53
+ @city = city
54
+ @country = country
55
+ @line1 = line1
56
+ @line2 = line2
57
+ @postal_code = postal_code
58
+ @state = state
59
+ end
60
+ end
61
+
62
+ class Shipping < Stripe::RequestParams
63
+ class Address < Stripe::RequestParams
64
+ # City, district, suburb, town, or village.
65
+ attr_accessor :city
66
+ # 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)).
67
+ attr_accessor :country
68
+ # Address line 1 (e.g., street, PO Box, or company name).
69
+ attr_accessor :line1
70
+ # Address line 2 (e.g., apartment, suite, unit, or building).
71
+ attr_accessor :line2
72
+ # ZIP or postal code.
73
+ attr_accessor :postal_code
74
+ # State, county, province, or region.
75
+ attr_accessor :state
76
+
77
+ def initialize(
78
+ city: nil,
79
+ country: nil,
80
+ line1: nil,
81
+ line2: nil,
82
+ postal_code: nil,
83
+ state: nil
84
+ )
85
+ @city = city
86
+ @country = country
87
+ @line1 = line1
88
+ @line2 = line2
89
+ @postal_code = postal_code
90
+ @state = state
91
+ end
92
+ end
93
+ # Customer shipping address.
94
+ attr_accessor :address
95
+ # Customer name.
96
+ attr_accessor :name
97
+ # Customer phone (including extension).
98
+ attr_accessor :phone
99
+
100
+ def initialize(address: nil, name: nil, phone: nil)
101
+ @address = address
102
+ @name = name
103
+ @phone = phone
104
+ end
105
+ end
106
+
107
+ class Tax < Stripe::RequestParams
108
+ # 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.
109
+ attr_accessor :ip_address
110
+
111
+ def initialize(ip_address: nil)
112
+ @ip_address = ip_address
113
+ end
114
+ end
115
+
116
+ class TaxId < Stripe::RequestParams
117
+ # 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`
118
+ attr_accessor :type
119
+ # Value of the tax ID.
120
+ attr_accessor :value
121
+
122
+ def initialize(type: nil, value: nil)
123
+ @type = type
124
+ @value = value
125
+ end
126
+ end
127
+ # The customer's address.
128
+ attr_accessor :address
129
+ # The customer's shipping information. Appears on invoices emailed to this customer.
130
+ attr_accessor :shipping
131
+ # Tax details about the customer.
132
+ attr_accessor :tax
133
+ # The customer's tax exemption. One of `none`, `exempt`, or `reverse`.
134
+ attr_accessor :tax_exempt
135
+ # The customer's tax IDs.
136
+ attr_accessor :tax_ids
137
+
138
+ def initialize(address: nil, shipping: nil, tax: nil, tax_exempt: nil, tax_ids: nil)
139
+ @address = address
140
+ @shipping = shipping
141
+ @tax = tax
142
+ @tax_exempt = tax_exempt
143
+ @tax_ids = tax_ids
144
+ end
145
+ end
146
+
147
+ class Discount < Stripe::RequestParams
148
+ class DiscountEnd < Stripe::RequestParams
149
+ class Duration < Stripe::RequestParams
150
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
151
+ attr_accessor :interval
152
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
153
+ attr_accessor :interval_count
154
+
155
+ def initialize(interval: nil, interval_count: nil)
156
+ @interval = interval
157
+ @interval_count = interval_count
158
+ end
159
+ end
160
+ # Time span for the redeemed discount.
161
+ attr_accessor :duration
162
+ # A precise Unix timestamp for the discount to end. Must be in the future.
163
+ attr_accessor :timestamp
164
+ # The type of calculation made to determine when the discount ends.
165
+ attr_accessor :type
166
+
167
+ def initialize(duration: nil, timestamp: nil, type: nil)
168
+ @duration = duration
169
+ @timestamp = timestamp
170
+ @type = type
171
+ end
172
+ end
173
+ # ID of the coupon to create a new discount for.
174
+ attr_accessor :coupon
175
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
176
+ attr_accessor :discount
177
+ # Details to determine how long the discount should be applied for.
178
+ attr_accessor :discount_end
179
+ # ID of the promotion code to create a new discount for.
180
+ attr_accessor :promotion_code
181
+
182
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
183
+ @coupon = coupon
184
+ @discount = discount
185
+ @discount_end = discount_end
186
+ @promotion_code = promotion_code
187
+ end
188
+ end
189
+
190
+ class InvoiceItem < Stripe::RequestParams
191
+ class Discount < Stripe::RequestParams
192
+ class DiscountEnd < Stripe::RequestParams
193
+ class Duration < Stripe::RequestParams
194
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
195
+ attr_accessor :interval
196
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
197
+ attr_accessor :interval_count
198
+
199
+ def initialize(interval: nil, interval_count: nil)
200
+ @interval = interval
201
+ @interval_count = interval_count
202
+ end
203
+ end
204
+ # Time span for the redeemed discount.
205
+ attr_accessor :duration
206
+ # A precise Unix timestamp for the discount to end. Must be in the future.
207
+ attr_accessor :timestamp
208
+ # The type of calculation made to determine when the discount ends.
209
+ attr_accessor :type
210
+
211
+ def initialize(duration: nil, timestamp: nil, type: nil)
212
+ @duration = duration
213
+ @timestamp = timestamp
214
+ @type = type
215
+ end
216
+ end
217
+ # ID of the coupon to create a new discount for.
218
+ attr_accessor :coupon
219
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
220
+ attr_accessor :discount
221
+ # Details to determine how long the discount should be applied for.
222
+ attr_accessor :discount_end
223
+ # ID of the promotion code to create a new discount for.
224
+ attr_accessor :promotion_code
225
+
226
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
227
+ @coupon = coupon
228
+ @discount = discount
229
+ @discount_end = discount_end
230
+ @promotion_code = promotion_code
231
+ end
232
+ end
233
+
234
+ class Period < Stripe::RequestParams
235
+ # The end of the period, which must be greater than or equal to the start. This value is inclusive.
236
+ attr_accessor :end
237
+ # The start of the period. This value is inclusive.
238
+ attr_accessor :start
239
+
240
+ def initialize(end_: nil, start: nil)
241
+ @end = end_
242
+ @start = start
243
+ end
244
+ end
245
+
246
+ class PriceData < Stripe::RequestParams
247
+ # 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).
248
+ attr_accessor :currency
249
+ # The ID of the product that this price will belong to.
250
+ attr_accessor :product
251
+ # 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.
252
+ attr_accessor :tax_behavior
253
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
254
+ attr_accessor :unit_amount
255
+ # 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.
256
+ attr_accessor :unit_amount_decimal
257
+
258
+ def initialize(
259
+ currency: nil,
260
+ product: nil,
261
+ tax_behavior: nil,
262
+ unit_amount: nil,
263
+ unit_amount_decimal: nil
264
+ )
265
+ @currency = currency
266
+ @product = product
267
+ @tax_behavior = tax_behavior
268
+ @unit_amount = unit_amount
269
+ @unit_amount_decimal = unit_amount_decimal
270
+ end
271
+ end
272
+ # The integer amount in cents (or local equivalent) of previewed invoice item.
273
+ attr_accessor :amount
274
+ # 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.
275
+ attr_accessor :currency
276
+ # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
277
+ attr_accessor :description
278
+ # Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items.
279
+ attr_accessor :discountable
280
+ # The coupons to redeem into discounts for the invoice item in the preview.
281
+ attr_accessor :discounts
282
+ # 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.
283
+ attr_accessor :invoiceitem
284
+ # 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`.
285
+ attr_accessor :metadata
286
+ # 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.
287
+ attr_accessor :period
288
+ # The ID of the price object. One of `price` or `price_data` is required.
289
+ attr_accessor :price
290
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
291
+ attr_accessor :price_data
292
+ # Non-negative integer. The quantity of units for the invoice item.
293
+ attr_accessor :quantity
294
+ # 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.
295
+ attr_accessor :tax_behavior
296
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
297
+ attr_accessor :tax_code
298
+ # The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item.
299
+ attr_accessor :tax_rates
300
+ # 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.
301
+ attr_accessor :unit_amount
302
+ # 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.
303
+ attr_accessor :unit_amount_decimal
304
+
305
+ def initialize(
306
+ amount: nil,
307
+ currency: nil,
308
+ description: nil,
309
+ discountable: nil,
310
+ discounts: nil,
311
+ invoiceitem: nil,
312
+ metadata: nil,
313
+ period: nil,
314
+ price: nil,
315
+ price_data: nil,
316
+ quantity: nil,
317
+ tax_behavior: nil,
318
+ tax_code: nil,
319
+ tax_rates: nil,
320
+ unit_amount: nil,
321
+ unit_amount_decimal: nil
322
+ )
323
+ @amount = amount
324
+ @currency = currency
325
+ @description = description
326
+ @discountable = discountable
327
+ @discounts = discounts
328
+ @invoiceitem = invoiceitem
329
+ @metadata = metadata
330
+ @period = period
331
+ @price = price
332
+ @price_data = price_data
333
+ @quantity = quantity
334
+ @tax_behavior = tax_behavior
335
+ @tax_code = tax_code
336
+ @tax_rates = tax_rates
337
+ @unit_amount = unit_amount
338
+ @unit_amount_decimal = unit_amount_decimal
339
+ end
340
+ end
341
+
342
+ class Issuer < Stripe::RequestParams
343
+ # The connected account being referenced when `type` is `account`.
344
+ attr_accessor :account
345
+ # Type of the account referenced in the request.
346
+ attr_accessor :type
347
+
348
+ def initialize(account: nil, type: nil)
349
+ @account = account
350
+ @type = type
351
+ end
352
+ end
353
+
354
+ class ScheduleDetails < Stripe::RequestParams
355
+ class Amendment < Stripe::RequestParams
356
+ class AmendmentEnd < Stripe::RequestParams
357
+ class DiscountEnd < Stripe::RequestParams
358
+ # The ID of a specific discount.
359
+ attr_accessor :discount
360
+
361
+ def initialize(discount: nil)
362
+ @discount = discount
363
+ end
364
+ end
365
+
366
+ class Duration < Stripe::RequestParams
367
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
368
+ attr_accessor :interval
369
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
370
+ attr_accessor :interval_count
371
+
372
+ def initialize(interval: nil, interval_count: nil)
373
+ @interval = interval
374
+ @interval_count = interval_count
375
+ end
376
+ end
377
+ # Use the `end` time of a given discount.
378
+ attr_accessor :discount_end
379
+ # Time span for the amendment starting from the `amendment_start`.
380
+ attr_accessor :duration
381
+ # A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
382
+ attr_accessor :timestamp
383
+ # Select one of three ways to pass the `amendment_end`.
384
+ attr_accessor :type
385
+
386
+ def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
387
+ @discount_end = discount_end
388
+ @duration = duration
389
+ @timestamp = timestamp
390
+ @type = type
391
+ end
392
+ end
393
+
394
+ class AmendmentStart < Stripe::RequestParams
395
+ class AmendmentEnd < Stripe::RequestParams
396
+ # 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.
397
+ attr_accessor :index
398
+
399
+ def initialize(index: nil)
400
+ @index = index
401
+ end
402
+ end
403
+
404
+ class DiscountEnd < Stripe::RequestParams
405
+ # The ID of a specific discount.
406
+ attr_accessor :discount
407
+
408
+ def initialize(discount: nil)
409
+ @discount = discount
410
+ end
411
+ end
412
+ # Details of another amendment in the same array, immediately after which this amendment should begin.
413
+ attr_accessor :amendment_end
414
+ # Use the `end` time of a given discount.
415
+ attr_accessor :discount_end
416
+ # A precise Unix timestamp for the amendment to start.
417
+ attr_accessor :timestamp
418
+ # Select one of three ways to pass the `amendment_start`.
419
+ attr_accessor :type
420
+
421
+ def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
422
+ @amendment_end = amendment_end
423
+ @discount_end = discount_end
424
+ @timestamp = timestamp
425
+ @type = type
426
+ end
427
+ end
428
+
429
+ class DiscountAction < Stripe::RequestParams
430
+ class Add < Stripe::RequestParams
431
+ class DiscountEnd < Stripe::RequestParams
432
+ # The type of calculation made to determine when the discount ends.
433
+ attr_accessor :type
434
+
435
+ def initialize(type: nil)
436
+ @type = type
437
+ end
438
+ end
439
+ # The coupon code to redeem.
440
+ attr_accessor :coupon
441
+ # An ID of an existing discount for a coupon that was already redeemed.
442
+ attr_accessor :discount
443
+ # Details to determine how long the discount should be applied for.
444
+ attr_accessor :discount_end
445
+ # 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.
446
+ attr_accessor :index
447
+ # The promotion code to redeem.
448
+ attr_accessor :promotion_code
449
+
450
+ def initialize(
451
+ coupon: nil,
452
+ discount: nil,
453
+ discount_end: nil,
454
+ index: nil,
455
+ promotion_code: nil
456
+ )
457
+ @coupon = coupon
458
+ @discount = discount
459
+ @discount_end = discount_end
460
+ @index = index
461
+ @promotion_code = promotion_code
462
+ end
463
+ end
464
+
465
+ class Remove < Stripe::RequestParams
466
+ # The coupon code to remove from the `discounts` array.
467
+ attr_accessor :coupon
468
+ # The ID of a discount to remove from the `discounts` array.
469
+ attr_accessor :discount
470
+ # The ID of a promotion code to remove from the `discounts` array.
471
+ attr_accessor :promotion_code
472
+
473
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
474
+ @coupon = coupon
475
+ @discount = discount
476
+ @promotion_code = promotion_code
477
+ end
478
+ end
479
+
480
+ class Set < Stripe::RequestParams
481
+ # The coupon code to replace the `discounts` array with.
482
+ attr_accessor :coupon
483
+ # An ID of an existing discount to replace the `discounts` array with.
484
+ attr_accessor :discount
485
+ # An ID of an existing promotion code to replace the `discounts` array with.
486
+ attr_accessor :promotion_code
487
+
488
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
489
+ @coupon = coupon
490
+ @discount = discount
491
+ @promotion_code = promotion_code
492
+ end
493
+ end
494
+ # Details of the discount to add.
495
+ attr_accessor :add
496
+ # Details of the discount to remove.
497
+ attr_accessor :remove
498
+ # Details of the discount to replace the existing discounts with.
499
+ attr_accessor :set
500
+ # Determines the type of discount action.
501
+ attr_accessor :type
502
+
503
+ def initialize(add: nil, remove: nil, set: nil, type: nil)
504
+ @add = add
505
+ @remove = remove
506
+ @set = set
507
+ @type = type
508
+ end
509
+ end
510
+
511
+ class ItemAction < Stripe::RequestParams
512
+ class Add < Stripe::RequestParams
513
+ class Discount < Stripe::RequestParams
514
+ class DiscountEnd < Stripe::RequestParams
515
+ class Duration < Stripe::RequestParams
516
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
517
+ attr_accessor :interval
518
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
519
+ attr_accessor :interval_count
520
+
521
+ def initialize(interval: nil, interval_count: nil)
522
+ @interval = interval
523
+ @interval_count = interval_count
524
+ end
525
+ end
526
+ # Time span for the redeemed discount.
527
+ attr_accessor :duration
528
+ # A precise Unix timestamp for the discount to end. Must be in the future.
529
+ attr_accessor :timestamp
530
+ # The type of calculation made to determine when the discount ends.
531
+ attr_accessor :type
532
+
533
+ def initialize(duration: nil, timestamp: nil, type: nil)
534
+ @duration = duration
535
+ @timestamp = timestamp
536
+ @type = type
537
+ end
538
+ end
539
+ # ID of the coupon to create a new discount for.
540
+ attr_accessor :coupon
541
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
542
+ attr_accessor :discount
543
+ # Details to determine how long the discount should be applied for.
544
+ attr_accessor :discount_end
545
+ # ID of the promotion code to create a new discount for.
546
+ attr_accessor :promotion_code
547
+
548
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
549
+ @coupon = coupon
550
+ @discount = discount
551
+ @discount_end = discount_end
552
+ @promotion_code = promotion_code
553
+ end
554
+ end
555
+
556
+ class Trial < Stripe::RequestParams
557
+ # 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.
558
+ attr_accessor :converts_to
559
+ # Determines the type of trial for this item.
560
+ attr_accessor :type
561
+
562
+ def initialize(converts_to: nil, type: nil)
563
+ @converts_to = converts_to
564
+ @type = type
565
+ end
566
+ end
567
+ # The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
568
+ attr_accessor :discounts
569
+ # 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`.
570
+ attr_accessor :metadata
571
+ # The ID of the price object.
572
+ attr_accessor :price
573
+ # Quantity for this item.
574
+ attr_accessor :quantity
575
+ # 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`.
576
+ attr_accessor :tax_rates
577
+ # Options that configure the trial on the subscription item.
578
+ attr_accessor :trial
579
+
580
+ def initialize(
581
+ discounts: nil,
582
+ metadata: nil,
583
+ price: nil,
584
+ quantity: nil,
585
+ tax_rates: nil,
586
+ trial: nil
587
+ )
588
+ @discounts = discounts
589
+ @metadata = metadata
590
+ @price = price
591
+ @quantity = quantity
592
+ @tax_rates = tax_rates
593
+ @trial = trial
594
+ end
595
+ end
596
+
597
+ class Remove < Stripe::RequestParams
598
+ # ID of a price to remove.
599
+ attr_accessor :price
600
+
601
+ def initialize(price: nil)
602
+ @price = price
603
+ end
604
+ end
605
+
606
+ class Set < Stripe::RequestParams
607
+ class Discount < Stripe::RequestParams
608
+ class DiscountEnd < Stripe::RequestParams
609
+ class Duration < Stripe::RequestParams
610
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
611
+ attr_accessor :interval
612
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
613
+ attr_accessor :interval_count
614
+
615
+ def initialize(interval: nil, interval_count: nil)
616
+ @interval = interval
617
+ @interval_count = interval_count
618
+ end
619
+ end
620
+ # Time span for the redeemed discount.
621
+ attr_accessor :duration
622
+ # A precise Unix timestamp for the discount to end. Must be in the future.
623
+ attr_accessor :timestamp
624
+ # The type of calculation made to determine when the discount ends.
625
+ attr_accessor :type
626
+
627
+ def initialize(duration: nil, timestamp: nil, type: nil)
628
+ @duration = duration
629
+ @timestamp = timestamp
630
+ @type = type
631
+ end
632
+ end
633
+ # ID of the coupon to create a new discount for.
634
+ attr_accessor :coupon
635
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
636
+ attr_accessor :discount
637
+ # Details to determine how long the discount should be applied for.
638
+ attr_accessor :discount_end
639
+ # ID of the promotion code to create a new discount for.
640
+ attr_accessor :promotion_code
641
+
642
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
643
+ @coupon = coupon
644
+ @discount = discount
645
+ @discount_end = discount_end
646
+ @promotion_code = promotion_code
647
+ end
648
+ end
649
+
650
+ class Trial < Stripe::RequestParams
651
+ # 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.
652
+ attr_accessor :converts_to
653
+ # Determines the type of trial for this item.
654
+ attr_accessor :type
655
+
656
+ def initialize(converts_to: nil, type: nil)
657
+ @converts_to = converts_to
658
+ @type = type
659
+ end
660
+ end
661
+ # 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`.
662
+ attr_accessor :discounts
663
+ # 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`.
664
+ attr_accessor :metadata
665
+ # The ID of the price object.
666
+ attr_accessor :price
667
+ # 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`.
668
+ attr_accessor :quantity
669
+ # 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`.
670
+ attr_accessor :tax_rates
671
+ # 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`.
672
+ attr_accessor :trial
673
+
674
+ def initialize(
675
+ discounts: nil,
676
+ metadata: nil,
677
+ price: nil,
678
+ quantity: nil,
679
+ tax_rates: nil,
680
+ trial: nil
681
+ )
682
+ @discounts = discounts
683
+ @metadata = metadata
684
+ @price = price
685
+ @quantity = quantity
686
+ @tax_rates = tax_rates
687
+ @trial = trial
688
+ end
689
+ end
690
+ # 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.
691
+ attr_accessor :add
692
+ # Details of the subscription item to remove.
693
+ attr_accessor :remove
694
+ # 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.
695
+ attr_accessor :set
696
+ # Determines the type of item action.
697
+ attr_accessor :type
698
+
699
+ def initialize(add: nil, remove: nil, set: nil, type: nil)
700
+ @add = add
701
+ @remove = remove
702
+ @set = set
703
+ @type = type
704
+ end
705
+ end
706
+
707
+ class MetadataAction < Stripe::RequestParams
708
+ # Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
709
+ attr_accessor :add
710
+ # Keys to remove from schedule phase metadata.
711
+ attr_accessor :remove
712
+ # Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
713
+ attr_accessor :set
714
+ # Select one of three ways to update phase-level `metadata` on subscription schedules.
715
+ attr_accessor :type
716
+
717
+ def initialize(add: nil, remove: nil, set: nil, type: nil)
718
+ @add = add
719
+ @remove = remove
720
+ @set = set
721
+ @type = type
722
+ end
723
+ end
724
+
725
+ class SetPauseCollection < Stripe::RequestParams
726
+ class Set < Stripe::RequestParams
727
+ # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
728
+ attr_accessor :behavior
729
+
730
+ def initialize(behavior: nil)
731
+ @behavior = behavior
732
+ end
733
+ end
734
+ # Details of the pause_collection behavior to apply to the amendment.
735
+ attr_accessor :set
736
+ # Determines the type of the pause_collection amendment.
737
+ attr_accessor :type
738
+
739
+ def initialize(set: nil, type: nil)
740
+ @set = set
741
+ @type = type
742
+ end
743
+ end
744
+
745
+ class TrialSettings < Stripe::RequestParams
746
+ class EndBehavior < Stripe::RequestParams
747
+ # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
748
+ attr_accessor :prorate_up_front
749
+
750
+ def initialize(prorate_up_front: nil)
751
+ @prorate_up_front = prorate_up_front
752
+ end
753
+ end
754
+ # Defines how the subscription should behave when a trial ends.
755
+ attr_accessor :end_behavior
756
+
757
+ def initialize(end_behavior: nil)
758
+ @end_behavior = end_behavior
759
+ end
760
+ end
761
+ # 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.
762
+ attr_accessor :amendment_end
763
+ # Details to identify the earliest timestamp where the proposed change should take effect.
764
+ attr_accessor :amendment_start
765
+ # 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.
766
+ attr_accessor :billing_cycle_anchor
767
+ # Changes to the coupons being redeemed or discounts being applied during the amendment time span.
768
+ attr_accessor :discount_actions
769
+ # Changes to the subscription items during the amendment time span.
770
+ attr_accessor :item_actions
771
+ # Instructions for how to modify phase metadata
772
+ attr_accessor :metadata_actions
773
+ # 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`.
774
+ attr_accessor :proration_behavior
775
+ # Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
776
+ attr_accessor :set_pause_collection
777
+ # Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
778
+ attr_accessor :set_schedule_end
779
+ # Settings related to subscription trials.
780
+ attr_accessor :trial_settings
781
+
782
+ def initialize(
783
+ amendment_end: nil,
784
+ amendment_start: nil,
785
+ billing_cycle_anchor: nil,
786
+ discount_actions: nil,
787
+ item_actions: nil,
788
+ metadata_actions: nil,
789
+ proration_behavior: nil,
790
+ set_pause_collection: nil,
791
+ set_schedule_end: nil,
792
+ trial_settings: nil
793
+ )
794
+ @amendment_end = amendment_end
795
+ @amendment_start = amendment_start
796
+ @billing_cycle_anchor = billing_cycle_anchor
797
+ @discount_actions = discount_actions
798
+ @item_actions = item_actions
799
+ @metadata_actions = metadata_actions
800
+ @proration_behavior = proration_behavior
801
+ @set_pause_collection = set_pause_collection
802
+ @set_schedule_end = set_schedule_end
803
+ @trial_settings = trial_settings
804
+ end
805
+ end
806
+
807
+ class Phase < Stripe::RequestParams
808
+ class AddInvoiceItem < Stripe::RequestParams
809
+ class Discount < Stripe::RequestParams
810
+ class DiscountEnd < Stripe::RequestParams
811
+ class Duration < Stripe::RequestParams
812
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
813
+ attr_accessor :interval
814
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
815
+ attr_accessor :interval_count
816
+
817
+ def initialize(interval: nil, interval_count: nil)
818
+ @interval = interval
819
+ @interval_count = interval_count
820
+ end
821
+ end
822
+ # Time span for the redeemed discount.
823
+ attr_accessor :duration
824
+ # A precise Unix timestamp for the discount to end. Must be in the future.
825
+ attr_accessor :timestamp
826
+ # The type of calculation made to determine when the discount ends.
827
+ attr_accessor :type
828
+
829
+ def initialize(duration: nil, timestamp: nil, type: nil)
830
+ @duration = duration
831
+ @timestamp = timestamp
832
+ @type = type
833
+ end
834
+ end
835
+ # ID of the coupon to create a new discount for.
836
+ attr_accessor :coupon
837
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
838
+ attr_accessor :discount
839
+ # Details to determine how long the discount should be applied for.
840
+ attr_accessor :discount_end
841
+ # ID of the promotion code to create a new discount for.
842
+ attr_accessor :promotion_code
843
+
844
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
845
+ @coupon = coupon
846
+ @discount = discount
847
+ @discount_end = discount_end
848
+ @promotion_code = promotion_code
849
+ end
850
+ end
851
+
852
+ class PriceData < Stripe::RequestParams
853
+ # 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).
854
+ attr_accessor :currency
855
+ # The ID of the product that this price will belong to.
856
+ attr_accessor :product
857
+ # 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.
858
+ attr_accessor :tax_behavior
859
+ # 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.
860
+ attr_accessor :unit_amount
861
+ # 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.
862
+ attr_accessor :unit_amount_decimal
863
+
864
+ def initialize(
865
+ currency: nil,
866
+ product: nil,
867
+ tax_behavior: nil,
868
+ unit_amount: nil,
869
+ unit_amount_decimal: nil
870
+ )
871
+ @currency = currency
872
+ @product = product
873
+ @tax_behavior = tax_behavior
874
+ @unit_amount = unit_amount
875
+ @unit_amount_decimal = unit_amount_decimal
876
+ end
877
+ end
878
+ # The coupons to redeem into discounts for the item.
879
+ attr_accessor :discounts
880
+ # The ID of the price object. One of `price` or `price_data` is required.
881
+ attr_accessor :price
882
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
883
+ attr_accessor :price_data
884
+ # Quantity for this item. Defaults to 1.
885
+ attr_accessor :quantity
886
+ # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
887
+ attr_accessor :tax_rates
888
+
889
+ def initialize(
890
+ discounts: nil,
891
+ price: nil,
892
+ price_data: nil,
893
+ quantity: nil,
894
+ tax_rates: nil
895
+ )
896
+ @discounts = discounts
897
+ @price = price
898
+ @price_data = price_data
899
+ @quantity = quantity
900
+ @tax_rates = tax_rates
901
+ end
902
+ end
903
+
904
+ class AutomaticTax < Stripe::RequestParams
905
+ class Liability < Stripe::RequestParams
906
+ # The connected account being referenced when `type` is `account`.
907
+ attr_accessor :account
908
+ # Type of the account referenced in the request.
909
+ attr_accessor :type
910
+
911
+ def initialize(account: nil, type: nil)
912
+ @account = account
913
+ @type = type
914
+ end
915
+ end
916
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
917
+ attr_accessor :enabled
918
+ # 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.
919
+ attr_accessor :liability
920
+
921
+ def initialize(enabled: nil, liability: nil)
922
+ @enabled = enabled
923
+ @liability = liability
924
+ end
925
+ end
926
+
927
+ class BillingThresholds < Stripe::RequestParams
928
+ # Monetary threshold that triggers the subscription to advance to a new billing period
929
+ attr_accessor :amount_gte
930
+ # 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.
931
+ attr_accessor :reset_billing_cycle_anchor
932
+
933
+ def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil)
934
+ @amount_gte = amount_gte
935
+ @reset_billing_cycle_anchor = reset_billing_cycle_anchor
936
+ end
937
+ end
938
+
939
+ class Discount < Stripe::RequestParams
940
+ class DiscountEnd < Stripe::RequestParams
941
+ class Duration < Stripe::RequestParams
942
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
943
+ attr_accessor :interval
944
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
945
+ attr_accessor :interval_count
946
+
947
+ def initialize(interval: nil, interval_count: nil)
948
+ @interval = interval
949
+ @interval_count = interval_count
950
+ end
951
+ end
952
+ # Time span for the redeemed discount.
953
+ attr_accessor :duration
954
+ # A precise Unix timestamp for the discount to end. Must be in the future.
955
+ attr_accessor :timestamp
956
+ # The type of calculation made to determine when the discount ends.
957
+ attr_accessor :type
958
+
959
+ def initialize(duration: nil, timestamp: nil, type: nil)
960
+ @duration = duration
961
+ @timestamp = timestamp
962
+ @type = type
963
+ end
964
+ end
965
+ # ID of the coupon to create a new discount for.
966
+ attr_accessor :coupon
967
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
968
+ attr_accessor :discount
969
+ # Details to determine how long the discount should be applied for.
970
+ attr_accessor :discount_end
971
+ # ID of the promotion code to create a new discount for.
972
+ attr_accessor :promotion_code
973
+
974
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
975
+ @coupon = coupon
976
+ @discount = discount
977
+ @discount_end = discount_end
978
+ @promotion_code = promotion_code
979
+ end
980
+ end
981
+
982
+ class InvoiceSettings < Stripe::RequestParams
983
+ class Issuer < Stripe::RequestParams
984
+ # The connected account being referenced when `type` is `account`.
985
+ attr_accessor :account
986
+ # Type of the account referenced in the request.
987
+ attr_accessor :type
988
+
989
+ def initialize(account: nil, type: nil)
990
+ @account = account
991
+ @type = type
992
+ end
993
+ end
994
+ # 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.
995
+ attr_accessor :account_tax_ids
996
+ # 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`.
997
+ attr_accessor :days_until_due
998
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
999
+ attr_accessor :issuer
1000
+
1001
+ def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil)
1002
+ @account_tax_ids = account_tax_ids
1003
+ @days_until_due = days_until_due
1004
+ @issuer = issuer
1005
+ end
1006
+ end
1007
+
1008
+ class Item < Stripe::RequestParams
1009
+ class BillingThresholds < Stripe::RequestParams
1010
+ # 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))
1011
+ attr_accessor :usage_gte
1012
+
1013
+ def initialize(usage_gte: nil)
1014
+ @usage_gte = usage_gte
1015
+ end
1016
+ end
1017
+
1018
+ class Discount < Stripe::RequestParams
1019
+ class DiscountEnd < Stripe::RequestParams
1020
+ class Duration < Stripe::RequestParams
1021
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1022
+ attr_accessor :interval
1023
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1024
+ attr_accessor :interval_count
1025
+
1026
+ def initialize(interval: nil, interval_count: nil)
1027
+ @interval = interval
1028
+ @interval_count = interval_count
1029
+ end
1030
+ end
1031
+ # Time span for the redeemed discount.
1032
+ attr_accessor :duration
1033
+ # A precise Unix timestamp for the discount to end. Must be in the future.
1034
+ attr_accessor :timestamp
1035
+ # The type of calculation made to determine when the discount ends.
1036
+ attr_accessor :type
1037
+
1038
+ def initialize(duration: nil, timestamp: nil, type: nil)
1039
+ @duration = duration
1040
+ @timestamp = timestamp
1041
+ @type = type
1042
+ end
1043
+ end
1044
+ # ID of the coupon to create a new discount for.
1045
+ attr_accessor :coupon
1046
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
1047
+ attr_accessor :discount
1048
+ # Details to determine how long the discount should be applied for.
1049
+ attr_accessor :discount_end
1050
+ # ID of the promotion code to create a new discount for.
1051
+ attr_accessor :promotion_code
1052
+
1053
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1054
+ @coupon = coupon
1055
+ @discount = discount
1056
+ @discount_end = discount_end
1057
+ @promotion_code = promotion_code
1058
+ end
1059
+ end
1060
+
1061
+ class PriceData < Stripe::RequestParams
1062
+ class Recurring < Stripe::RequestParams
1063
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
1064
+ attr_accessor :interval
1065
+ # 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).
1066
+ attr_accessor :interval_count
1067
+
1068
+ def initialize(interval: nil, interval_count: nil)
1069
+ @interval = interval
1070
+ @interval_count = interval_count
1071
+ end
1072
+ end
1073
+ # 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).
1074
+ attr_accessor :currency
1075
+ # The ID of the product that this price will belong to.
1076
+ attr_accessor :product
1077
+ # The recurring components of a price such as `interval` and `interval_count`.
1078
+ attr_accessor :recurring
1079
+ # 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.
1080
+ attr_accessor :tax_behavior
1081
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
1082
+ attr_accessor :unit_amount
1083
+ # 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.
1084
+ attr_accessor :unit_amount_decimal
1085
+
1086
+ def initialize(
1087
+ currency: nil,
1088
+ product: nil,
1089
+ recurring: nil,
1090
+ tax_behavior: nil,
1091
+ unit_amount: nil,
1092
+ unit_amount_decimal: nil
1093
+ )
1094
+ @currency = currency
1095
+ @product = product
1096
+ @recurring = recurring
1097
+ @tax_behavior = tax_behavior
1098
+ @unit_amount = unit_amount
1099
+ @unit_amount_decimal = unit_amount_decimal
1100
+ end
1101
+ end
1102
+
1103
+ class Trial < Stripe::RequestParams
1104
+ # 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.
1105
+ attr_accessor :converts_to
1106
+ # Determines the type of trial for this item.
1107
+ attr_accessor :type
1108
+
1109
+ def initialize(converts_to: nil, type: nil)
1110
+ @converts_to = converts_to
1111
+ @type = type
1112
+ end
1113
+ end
1114
+ # 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.
1115
+ attr_accessor :billing_thresholds
1116
+ # The coupons to redeem into discounts for the subscription item.
1117
+ attr_accessor :discounts
1118
+ # 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`.
1119
+ attr_accessor :metadata
1120
+ # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
1121
+ attr_accessor :plan
1122
+ # The ID of the price object.
1123
+ attr_accessor :price
1124
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
1125
+ attr_accessor :price_data
1126
+ # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
1127
+ attr_accessor :quantity
1128
+ # 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.
1129
+ attr_accessor :tax_rates
1130
+ # Options that configure the trial on the subscription item.
1131
+ attr_accessor :trial
1132
+
1133
+ def initialize(
1134
+ billing_thresholds: nil,
1135
+ discounts: nil,
1136
+ metadata: nil,
1137
+ plan: nil,
1138
+ price: nil,
1139
+ price_data: nil,
1140
+ quantity: nil,
1141
+ tax_rates: nil,
1142
+ trial: nil
1143
+ )
1144
+ @billing_thresholds = billing_thresholds
1145
+ @discounts = discounts
1146
+ @metadata = metadata
1147
+ @plan = plan
1148
+ @price = price
1149
+ @price_data = price_data
1150
+ @quantity = quantity
1151
+ @tax_rates = tax_rates
1152
+ @trial = trial
1153
+ end
1154
+ end
1155
+
1156
+ class PauseCollection < Stripe::RequestParams
1157
+ # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
1158
+ attr_accessor :behavior
1159
+
1160
+ def initialize(behavior: nil)
1161
+ @behavior = behavior
1162
+ end
1163
+ end
1164
+
1165
+ class TransferData < Stripe::RequestParams
1166
+ # 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.
1167
+ attr_accessor :amount_percent
1168
+ # ID of an existing, connected Stripe account.
1169
+ attr_accessor :destination
1170
+
1171
+ def initialize(amount_percent: nil, destination: nil)
1172
+ @amount_percent = amount_percent
1173
+ @destination = destination
1174
+ end
1175
+ end
1176
+
1177
+ class TrialSettings < Stripe::RequestParams
1178
+ class EndBehavior < Stripe::RequestParams
1179
+ # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
1180
+ attr_accessor :prorate_up_front
1181
+
1182
+ def initialize(prorate_up_front: nil)
1183
+ @prorate_up_front = prorate_up_front
1184
+ end
1185
+ end
1186
+ # Defines how the subscription should behave when a trial ends.
1187
+ attr_accessor :end_behavior
1188
+
1189
+ def initialize(end_behavior: nil)
1190
+ @end_behavior = end_behavior
1191
+ end
1192
+ end
1193
+ # 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.
1194
+ attr_accessor :add_invoice_items
1195
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the 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).
1196
+ attr_accessor :application_fee_percent
1197
+ # Automatic tax settings for this phase.
1198
+ attr_accessor :automatic_tax
1199
+ # 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).
1200
+ attr_accessor :billing_cycle_anchor
1201
+ # 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.
1202
+ attr_accessor :billing_thresholds
1203
+ # 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.
1204
+ attr_accessor :collection_method
1205
+ # 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.
1206
+ attr_accessor :coupon
1207
+ # 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).
1208
+ attr_accessor :currency
1209
+ # 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.
1210
+ attr_accessor :default_payment_method
1211
+ # 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.
1212
+ attr_accessor :default_tax_rates
1213
+ # 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.
1214
+ attr_accessor :description
1215
+ # 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.
1216
+ attr_accessor :discounts
1217
+ # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
1218
+ attr_accessor :end_date
1219
+ # All invoices will be billed using the specified settings.
1220
+ attr_accessor :invoice_settings
1221
+ # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
1222
+ attr_accessor :items
1223
+ # 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.
1224
+ attr_accessor :iterations
1225
+ # 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`.
1226
+ attr_accessor :metadata
1227
+ # The account on behalf of which to charge, for each of the associated subscription's invoices.
1228
+ attr_accessor :on_behalf_of
1229
+ # 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).
1230
+ attr_accessor :pause_collection
1231
+ # 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.
1232
+ attr_accessor :proration_behavior
1233
+ # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
1234
+ attr_accessor :start_date
1235
+ # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
1236
+ attr_accessor :transfer_data
1237
+ # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
1238
+ attr_accessor :trial
1239
+ # Specify trial behavior when crossing phase boundaries
1240
+ attr_accessor :trial_continuation
1241
+ # 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`
1242
+ attr_accessor :trial_end
1243
+ # Settings related to subscription trials.
1244
+ attr_accessor :trial_settings
1245
+
1246
+ def initialize(
1247
+ add_invoice_items: nil,
1248
+ application_fee_percent: nil,
1249
+ automatic_tax: nil,
1250
+ billing_cycle_anchor: nil,
1251
+ billing_thresholds: nil,
1252
+ collection_method: nil,
1253
+ coupon: nil,
1254
+ currency: nil,
1255
+ default_payment_method: nil,
1256
+ default_tax_rates: nil,
1257
+ description: nil,
1258
+ discounts: nil,
1259
+ end_date: nil,
1260
+ invoice_settings: nil,
1261
+ items: nil,
1262
+ iterations: nil,
1263
+ metadata: nil,
1264
+ on_behalf_of: nil,
1265
+ pause_collection: nil,
1266
+ proration_behavior: nil,
1267
+ start_date: nil,
1268
+ transfer_data: nil,
1269
+ trial: nil,
1270
+ trial_continuation: nil,
1271
+ trial_end: nil,
1272
+ trial_settings: nil
1273
+ )
1274
+ @add_invoice_items = add_invoice_items
1275
+ @application_fee_percent = application_fee_percent
1276
+ @automatic_tax = automatic_tax
1277
+ @billing_cycle_anchor = billing_cycle_anchor
1278
+ @billing_thresholds = billing_thresholds
1279
+ @collection_method = collection_method
1280
+ @coupon = coupon
1281
+ @currency = currency
1282
+ @default_payment_method = default_payment_method
1283
+ @default_tax_rates = default_tax_rates
1284
+ @description = description
1285
+ @discounts = discounts
1286
+ @end_date = end_date
1287
+ @invoice_settings = invoice_settings
1288
+ @items = items
1289
+ @iterations = iterations
1290
+ @metadata = metadata
1291
+ @on_behalf_of = on_behalf_of
1292
+ @pause_collection = pause_collection
1293
+ @proration_behavior = proration_behavior
1294
+ @start_date = start_date
1295
+ @transfer_data = transfer_data
1296
+ @trial = trial
1297
+ @trial_continuation = trial_continuation
1298
+ @trial_end = trial_end
1299
+ @trial_settings = trial_settings
1300
+ end
1301
+ end
1302
+
1303
+ class Prebilling < Stripe::RequestParams
1304
+ class BillUntil < Stripe::RequestParams
1305
+ class AmendmentEnd < Stripe::RequestParams
1306
+ # 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.
1307
+ attr_accessor :index
1308
+
1309
+ def initialize(index: nil)
1310
+ @index = index
1311
+ end
1312
+ end
1313
+
1314
+ class Duration < Stripe::RequestParams
1315
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1316
+ attr_accessor :interval
1317
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1318
+ attr_accessor :interval_count
1319
+
1320
+ def initialize(interval: nil, interval_count: nil)
1321
+ @interval = interval
1322
+ @interval_count = interval_count
1323
+ end
1324
+ end
1325
+ # End the prebilled period when a specified amendment ends.
1326
+ attr_accessor :amendment_end
1327
+ # Time span for prebilling, starting from `bill_from`.
1328
+ attr_accessor :duration
1329
+ # End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
1330
+ attr_accessor :timestamp
1331
+ # Select one of several ways to pass the `bill_until` value.
1332
+ attr_accessor :type
1333
+
1334
+ def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
1335
+ @amendment_end = amendment_end
1336
+ @duration = duration
1337
+ @timestamp = timestamp
1338
+ @type = type
1339
+ end
1340
+ end
1341
+ # The end of the prebilled time period.
1342
+ attr_accessor :bill_until
1343
+ # This is used to determine the number of billing cycles to prebill.
1344
+ attr_accessor :iterations
1345
+
1346
+ def initialize(bill_until: nil, iterations: nil)
1347
+ @bill_until = bill_until
1348
+ @iterations = iterations
1349
+ end
1350
+ end
1351
+ # Changes to apply to the phases of the subscription schedule, in the order provided.
1352
+ attr_accessor :amendments
1353
+ # 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.
1354
+ attr_accessor :billing_behavior
1355
+ # 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.
1356
+ attr_accessor :end_behavior
1357
+ # 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.
1358
+ attr_accessor :phases
1359
+ # Provide any time periods to bill in advance.
1360
+ attr_accessor :prebilling
1361
+ # In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
1362
+ attr_accessor :proration_behavior
1363
+
1364
+ def initialize(
1365
+ amendments: nil,
1366
+ billing_behavior: nil,
1367
+ end_behavior: nil,
1368
+ phases: nil,
1369
+ prebilling: nil,
1370
+ proration_behavior: nil
1371
+ )
1372
+ @amendments = amendments
1373
+ @billing_behavior = billing_behavior
1374
+ @end_behavior = end_behavior
1375
+ @phases = phases
1376
+ @prebilling = prebilling
1377
+ @proration_behavior = proration_behavior
1378
+ end
1379
+ end
1380
+
1381
+ class SubscriptionDetails < Stripe::RequestParams
1382
+ class Item < Stripe::RequestParams
1383
+ class BillingThresholds < Stripe::RequestParams
1384
+ # 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))
1385
+ attr_accessor :usage_gte
1386
+
1387
+ def initialize(usage_gte: nil)
1388
+ @usage_gte = usage_gte
1389
+ end
1390
+ end
1391
+
1392
+ class Discount < Stripe::RequestParams
1393
+ class DiscountEnd < Stripe::RequestParams
1394
+ class Duration < Stripe::RequestParams
1395
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1396
+ attr_accessor :interval
1397
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1398
+ attr_accessor :interval_count
1399
+
1400
+ def initialize(interval: nil, interval_count: nil)
1401
+ @interval = interval
1402
+ @interval_count = interval_count
1403
+ end
1404
+ end
1405
+ # Time span for the redeemed discount.
1406
+ attr_accessor :duration
1407
+ # A precise Unix timestamp for the discount to end. Must be in the future.
1408
+ attr_accessor :timestamp
1409
+ # The type of calculation made to determine when the discount ends.
1410
+ attr_accessor :type
1411
+
1412
+ def initialize(duration: nil, timestamp: nil, type: nil)
1413
+ @duration = duration
1414
+ @timestamp = timestamp
1415
+ @type = type
1416
+ end
1417
+ end
1418
+ # ID of the coupon to create a new discount for.
1419
+ attr_accessor :coupon
1420
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
1421
+ attr_accessor :discount
1422
+ # Details to determine how long the discount should be applied for.
1423
+ attr_accessor :discount_end
1424
+ # ID of the promotion code to create a new discount for.
1425
+ attr_accessor :promotion_code
1426
+
1427
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1428
+ @coupon = coupon
1429
+ @discount = discount
1430
+ @discount_end = discount_end
1431
+ @promotion_code = promotion_code
1432
+ end
1433
+ end
1434
+
1435
+ class PriceData < Stripe::RequestParams
1436
+ class Recurring < Stripe::RequestParams
1437
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
1438
+ attr_accessor :interval
1439
+ # 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).
1440
+ attr_accessor :interval_count
1441
+
1442
+ def initialize(interval: nil, interval_count: nil)
1443
+ @interval = interval
1444
+ @interval_count = interval_count
1445
+ end
1446
+ end
1447
+ # 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).
1448
+ attr_accessor :currency
1449
+ # The ID of the product that this price will belong to.
1450
+ attr_accessor :product
1451
+ # The recurring components of a price such as `interval` and `interval_count`.
1452
+ attr_accessor :recurring
1453
+ # 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.
1454
+ attr_accessor :tax_behavior
1455
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
1456
+ attr_accessor :unit_amount
1457
+ # 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.
1458
+ attr_accessor :unit_amount_decimal
1459
+
1460
+ def initialize(
1461
+ currency: nil,
1462
+ product: nil,
1463
+ recurring: nil,
1464
+ tax_behavior: nil,
1465
+ unit_amount: nil,
1466
+ unit_amount_decimal: nil
1467
+ )
1468
+ @currency = currency
1469
+ @product = product
1470
+ @recurring = recurring
1471
+ @tax_behavior = tax_behavior
1472
+ @unit_amount = unit_amount
1473
+ @unit_amount_decimal = unit_amount_decimal
1474
+ end
1475
+ end
1476
+ # 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.
1477
+ attr_accessor :billing_thresholds
1478
+ # 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.
1479
+ attr_accessor :clear_usage
1480
+ # A flag that, if set to `true`, will delete the specified item.
1481
+ attr_accessor :deleted
1482
+ # The coupons to redeem into discounts for the subscription item.
1483
+ attr_accessor :discounts
1484
+ # Subscription item to update.
1485
+ attr_accessor :id
1486
+ # 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`.
1487
+ attr_accessor :metadata
1488
+ # Plan ID for this item, as a string.
1489
+ attr_accessor :plan
1490
+ # 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.
1491
+ attr_accessor :price
1492
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
1493
+ attr_accessor :price_data
1494
+ # Quantity for this item.
1495
+ attr_accessor :quantity
1496
+ # 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.
1497
+ attr_accessor :tax_rates
1498
+
1499
+ def initialize(
1500
+ billing_thresholds: nil,
1501
+ clear_usage: nil,
1502
+ deleted: nil,
1503
+ discounts: nil,
1504
+ id: nil,
1505
+ metadata: nil,
1506
+ plan: nil,
1507
+ price: nil,
1508
+ price_data: nil,
1509
+ quantity: nil,
1510
+ tax_rates: nil
1511
+ )
1512
+ @billing_thresholds = billing_thresholds
1513
+ @clear_usage = clear_usage
1514
+ @deleted = deleted
1515
+ @discounts = discounts
1516
+ @id = id
1517
+ @metadata = metadata
1518
+ @plan = plan
1519
+ @price = price
1520
+ @price_data = price_data
1521
+ @quantity = quantity
1522
+ @tax_rates = tax_rates
1523
+ end
1524
+ end
1525
+
1526
+ class Prebilling < Stripe::RequestParams
1527
+ # This is used to determine the number of billing cycles to prebill.
1528
+ attr_accessor :iterations
1529
+
1530
+ def initialize(iterations: nil)
1531
+ @iterations = iterations
1532
+ end
1533
+ end
1534
+ # 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`.
1535
+ attr_accessor :billing_cycle_anchor
1536
+ # 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.
1537
+ attr_accessor :cancel_at
1538
+ # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
1539
+ attr_accessor :cancel_at_period_end
1540
+ # This simulates the subscription being canceled or expired immediately.
1541
+ attr_accessor :cancel_now
1542
+ # 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.
1543
+ attr_accessor :default_tax_rates
1544
+ # A list of up to 20 subscription items, each with an attached price.
1545
+ attr_accessor :items
1546
+ # The pre-billing to apply to the subscription as a preview.
1547
+ attr_accessor :prebilling
1548
+ # 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`.
1549
+ attr_accessor :proration_behavior
1550
+ # 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'.
1551
+ attr_accessor :proration_date
1552
+ # For paused subscriptions, setting `subscription_details.resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed.
1553
+ attr_accessor :resume_at
1554
+ # Date a subscription is intended to start (can be future or past).
1555
+ attr_accessor :start_date
1556
+ # 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.
1557
+ attr_accessor :trial_end
1558
+
1559
+ def initialize(
1560
+ billing_cycle_anchor: nil,
1561
+ cancel_at: nil,
1562
+ cancel_at_period_end: nil,
1563
+ cancel_now: nil,
1564
+ default_tax_rates: nil,
1565
+ items: nil,
1566
+ prebilling: nil,
1567
+ proration_behavior: nil,
1568
+ proration_date: nil,
1569
+ resume_at: nil,
1570
+ start_date: nil,
1571
+ trial_end: nil
1572
+ )
1573
+ @billing_cycle_anchor = billing_cycle_anchor
1574
+ @cancel_at = cancel_at
1575
+ @cancel_at_period_end = cancel_at_period_end
1576
+ @cancel_now = cancel_now
1577
+ @default_tax_rates = default_tax_rates
1578
+ @items = items
1579
+ @prebilling = prebilling
1580
+ @proration_behavior = proration_behavior
1581
+ @proration_date = proration_date
1582
+ @resume_at = resume_at
1583
+ @start_date = start_date
1584
+ @trial_end = trial_end
1585
+ end
1586
+ end
1587
+
1588
+ class SubscriptionItem < Stripe::RequestParams
1589
+ class BillingThresholds < Stripe::RequestParams
1590
+ # 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))
1591
+ attr_accessor :usage_gte
1592
+
1593
+ def initialize(usage_gte: nil)
1594
+ @usage_gte = usage_gte
1595
+ end
1596
+ end
1597
+
1598
+ class Discount < Stripe::RequestParams
1599
+ class DiscountEnd < Stripe::RequestParams
1600
+ class Duration < Stripe::RequestParams
1601
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1602
+ attr_accessor :interval
1603
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1604
+ attr_accessor :interval_count
1605
+
1606
+ def initialize(interval: nil, interval_count: nil)
1607
+ @interval = interval
1608
+ @interval_count = interval_count
1609
+ end
1610
+ end
1611
+ # Time span for the redeemed discount.
1612
+ attr_accessor :duration
1613
+ # A precise Unix timestamp for the discount to end. Must be in the future.
1614
+ attr_accessor :timestamp
1615
+ # The type of calculation made to determine when the discount ends.
1616
+ attr_accessor :type
1617
+
1618
+ def initialize(duration: nil, timestamp: nil, type: nil)
1619
+ @duration = duration
1620
+ @timestamp = timestamp
1621
+ @type = type
1622
+ end
1623
+ end
1624
+ # ID of the coupon to create a new discount for.
1625
+ attr_accessor :coupon
1626
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
1627
+ attr_accessor :discount
1628
+ # Details to determine how long the discount should be applied for.
1629
+ attr_accessor :discount_end
1630
+ # ID of the promotion code to create a new discount for.
1631
+ attr_accessor :promotion_code
1632
+
1633
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1634
+ @coupon = coupon
1635
+ @discount = discount
1636
+ @discount_end = discount_end
1637
+ @promotion_code = promotion_code
1638
+ end
1639
+ end
1640
+
1641
+ class PriceData < Stripe::RequestParams
1642
+ class Recurring < Stripe::RequestParams
1643
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
1644
+ attr_accessor :interval
1645
+ # 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).
1646
+ attr_accessor :interval_count
1647
+
1648
+ def initialize(interval: nil, interval_count: nil)
1649
+ @interval = interval
1650
+ @interval_count = interval_count
1651
+ end
1652
+ end
1653
+ # 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).
1654
+ attr_accessor :currency
1655
+ # The ID of the product that this price will belong to.
1656
+ attr_accessor :product
1657
+ # The recurring components of a price such as `interval` and `interval_count`.
1658
+ attr_accessor :recurring
1659
+ # 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.
1660
+ attr_accessor :tax_behavior
1661
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
1662
+ attr_accessor :unit_amount
1663
+ # 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.
1664
+ attr_accessor :unit_amount_decimal
1665
+
1666
+ def initialize(
1667
+ currency: nil,
1668
+ product: nil,
1669
+ recurring: nil,
1670
+ tax_behavior: nil,
1671
+ unit_amount: nil,
1672
+ unit_amount_decimal: nil
1673
+ )
1674
+ @currency = currency
1675
+ @product = product
1676
+ @recurring = recurring
1677
+ @tax_behavior = tax_behavior
1678
+ @unit_amount = unit_amount
1679
+ @unit_amount_decimal = unit_amount_decimal
1680
+ end
1681
+ end
1682
+ # 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.
1683
+ attr_accessor :billing_thresholds
1684
+ # 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.
1685
+ attr_accessor :clear_usage
1686
+ # A flag that, if set to `true`, will delete the specified item.
1687
+ attr_accessor :deleted
1688
+ # The coupons to redeem into discounts for the subscription item.
1689
+ attr_accessor :discounts
1690
+ # Subscription item to update.
1691
+ attr_accessor :id
1692
+ # 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`.
1693
+ attr_accessor :metadata
1694
+ # Plan ID for this item, as a string.
1695
+ attr_accessor :plan
1696
+ # 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.
1697
+ attr_accessor :price
1698
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
1699
+ attr_accessor :price_data
1700
+ # Quantity for this item.
1701
+ attr_accessor :quantity
1702
+ # 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.
1703
+ attr_accessor :tax_rates
1704
+
1705
+ def initialize(
1706
+ billing_thresholds: nil,
1707
+ clear_usage: nil,
1708
+ deleted: nil,
1709
+ discounts: nil,
1710
+ id: nil,
1711
+ metadata: nil,
1712
+ plan: nil,
1713
+ price: nil,
1714
+ price_data: nil,
1715
+ quantity: nil,
1716
+ tax_rates: nil
1717
+ )
1718
+ @billing_thresholds = billing_thresholds
1719
+ @clear_usage = clear_usage
1720
+ @deleted = deleted
1721
+ @discounts = discounts
1722
+ @id = id
1723
+ @metadata = metadata
1724
+ @plan = plan
1725
+ @price = price
1726
+ @price_data = price_data
1727
+ @quantity = quantity
1728
+ @tax_rates = tax_rates
1729
+ end
1730
+ end
1731
+
1732
+ class SubscriptionPrebilling < Stripe::RequestParams
1733
+ # This is used to determine the number of billing cycles to prebill.
1734
+ attr_accessor :iterations
1735
+
1736
+ def initialize(iterations: nil)
1737
+ @iterations = iterations
1738
+ end
1739
+ end
1740
+ # Settings for automatic tax lookup for this invoice preview.
1741
+ attr_accessor :automatic_tax
1742
+ # 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.
1743
+ attr_accessor :coupon
1744
+ # The currency to preview this invoice in. Defaults to that of `customer` if not specified.
1745
+ attr_accessor :currency
1746
+ # 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.
1747
+ attr_accessor :customer
1748
+ # 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.
1749
+ attr_accessor :customer_details
1750
+ # 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.
1751
+ attr_accessor :discounts
1752
+ # 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.
1753
+ attr_accessor :ending_before
1754
+ # Specifies which fields in the response should be expanded.
1755
+ attr_accessor :expand
1756
+ # List of invoice items to add or update in the upcoming invoice preview (up to 250).
1757
+ attr_accessor :invoice_items
1758
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
1759
+ attr_accessor :issuer
1760
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
1761
+ attr_accessor :limit
1762
+ # 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.
1763
+ attr_accessor :on_behalf_of
1764
+ # Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified.
1765
+ attr_accessor :preview_mode
1766
+ # The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields.
1767
+ attr_accessor :schedule
1768
+ # The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields.
1769
+ attr_accessor :schedule_details
1770
+ # 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.
1771
+ attr_accessor :starting_after
1772
+ # 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.
1773
+ attr_accessor :subscription
1774
+ # 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.
1775
+ attr_accessor :subscription_billing_cycle_anchor
1776
+ # 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.
1777
+ attr_accessor :subscription_cancel_at
1778
+ # 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.
1779
+ attr_accessor :subscription_cancel_at_period_end
1780
+ # 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.
1781
+ attr_accessor :subscription_cancel_now
1782
+ # 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.
1783
+ attr_accessor :subscription_default_tax_rates
1784
+ # The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields.
1785
+ attr_accessor :subscription_details
1786
+ # 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.
1787
+ attr_accessor :subscription_items
1788
+ # 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.
1789
+ attr_accessor :subscription_prebilling
1790
+ # 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.
1791
+ attr_accessor :subscription_proration_behavior
1792
+ # 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.
1793
+ attr_accessor :subscription_proration_date
1794
+ # 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.
1795
+ attr_accessor :subscription_resume_at
1796
+ # 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.
1797
+ attr_accessor :subscription_start_date
1798
+ # 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.
1799
+ attr_accessor :subscription_trial_end
1800
+ # 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.
1801
+ attr_accessor :subscription_trial_from_plan
1802
+
1803
+ def initialize(
1804
+ automatic_tax: nil,
1805
+ coupon: nil,
1806
+ currency: nil,
1807
+ customer: nil,
1808
+ customer_details: nil,
1809
+ discounts: nil,
1810
+ ending_before: nil,
1811
+ expand: nil,
1812
+ invoice_items: nil,
1813
+ issuer: nil,
1814
+ limit: nil,
1815
+ on_behalf_of: nil,
1816
+ preview_mode: nil,
1817
+ schedule: nil,
1818
+ schedule_details: nil,
1819
+ starting_after: nil,
1820
+ subscription: nil,
1821
+ subscription_billing_cycle_anchor: nil,
1822
+ subscription_cancel_at: nil,
1823
+ subscription_cancel_at_period_end: nil,
1824
+ subscription_cancel_now: nil,
1825
+ subscription_default_tax_rates: nil,
1826
+ subscription_details: nil,
1827
+ subscription_items: nil,
1828
+ subscription_prebilling: nil,
1829
+ subscription_proration_behavior: nil,
1830
+ subscription_proration_date: nil,
1831
+ subscription_resume_at: nil,
1832
+ subscription_start_date: nil,
1833
+ subscription_trial_end: nil,
1834
+ subscription_trial_from_plan: nil
1835
+ )
1836
+ @automatic_tax = automatic_tax
1837
+ @coupon = coupon
1838
+ @currency = currency
1839
+ @customer = customer
1840
+ @customer_details = customer_details
1841
+ @discounts = discounts
1842
+ @ending_before = ending_before
1843
+ @expand = expand
1844
+ @invoice_items = invoice_items
1845
+ @issuer = issuer
1846
+ @limit = limit
1847
+ @on_behalf_of = on_behalf_of
1848
+ @preview_mode = preview_mode
1849
+ @schedule = schedule
1850
+ @schedule_details = schedule_details
1851
+ @starting_after = starting_after
1852
+ @subscription = subscription
1853
+ @subscription_billing_cycle_anchor = subscription_billing_cycle_anchor
1854
+ @subscription_cancel_at = subscription_cancel_at
1855
+ @subscription_cancel_at_period_end = subscription_cancel_at_period_end
1856
+ @subscription_cancel_now = subscription_cancel_now
1857
+ @subscription_default_tax_rates = subscription_default_tax_rates
1858
+ @subscription_details = subscription_details
1859
+ @subscription_items = subscription_items
1860
+ @subscription_prebilling = subscription_prebilling
1861
+ @subscription_proration_behavior = subscription_proration_behavior
1862
+ @subscription_proration_date = subscription_proration_date
1863
+ @subscription_resume_at = subscription_resume_at
1864
+ @subscription_start_date = subscription_start_date
1865
+ @subscription_trial_end = subscription_trial_end
1866
+ @subscription_trial_from_plan = subscription_trial_from_plan
1867
+ end
1868
+ end
1869
+
6
1870
  # 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.
7
1871
  def list(params = {}, opts = {})
8
1872
  request(