stripe 15.2.0.pre.beta.1 → 15.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (648) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +718 -1556
  3. data/CONTRIBUTING.md +25 -0
  4. data/OPENAPI_VERSION +1 -1
  5. data/README.md +10 -7
  6. data/VERSION +1 -1
  7. data/lib/stripe/api_requestor.rb +0 -28
  8. data/lib/stripe/api_version.rb +1 -1
  9. data/lib/stripe/errors.rb +0 -54
  10. data/lib/stripe/event_types.rb +0 -89
  11. data/lib/stripe/object_types.rb +0 -52
  12. data/lib/stripe/resources/account.rb +32 -657
  13. data/lib/stripe/resources/account_session.rb +59 -253
  14. data/lib/stripe/resources/apple_pay_domain.rb +1 -2
  15. data/lib/stripe/resources/balance.rb +42 -0
  16. data/lib/stripe/resources/balance_transaction.rb +2 -0
  17. data/lib/stripe/resources/bank_account.rb +2 -2
  18. data/lib/stripe/resources/billing/credit_balance_summary.rb +0 -2
  19. data/lib/stripe/resources/billing/credit_balance_transaction.rb +0 -4
  20. data/lib/stripe/resources/billing/credit_grant.rb +0 -10
  21. data/lib/stripe/resources/billing_portal/session.rb +1 -7
  22. data/lib/stripe/resources/capability.rb +1 -1
  23. data/lib/stripe/resources/card.rb +0 -2
  24. data/lib/stripe/resources/cash_balance.rb +0 -2
  25. data/lib/stripe/resources/charge.rb +13 -1475
  26. data/lib/stripe/resources/checkout/session.rb +21 -333
  27. data/lib/stripe/resources/confirmation_token.rb +33 -263
  28. data/lib/stripe/resources/country_spec.rb +1 -1
  29. data/lib/stripe/resources/coupon.rb +2 -32
  30. data/lib/stripe/resources/credit_note.rb +10 -17
  31. data/lib/stripe/resources/credit_note_line_item.rb +0 -9
  32. data/lib/stripe/resources/customer.rb +2 -6
  33. data/lib/stripe/resources/customer_balance_transaction.rb +0 -2
  34. data/lib/stripe/resources/customer_cash_balance_transaction.rb +0 -2
  35. data/lib/stripe/resources/customer_session.rb +4 -9
  36. data/lib/stripe/resources/discount.rb +0 -2
  37. data/lib/stripe/resources/dispute.rb +2 -2
  38. data/lib/stripe/resources/event.rb +1 -32
  39. data/lib/stripe/resources/file.rb +1 -1
  40. data/lib/stripe/resources/financial_connections/account.rb +1 -20
  41. data/lib/stripe/resources/financial_connections/session.rb +2 -62
  42. data/lib/stripe/resources/identity/verification_report.rb +6 -0
  43. data/lib/stripe/resources/identity/verification_session.rb +17 -21
  44. data/lib/stripe/resources/invoice.rb +79 -1106
  45. data/lib/stripe/resources/invoice_item.rb +4 -81
  46. data/lib/stripe/resources/invoice_line_item.rb +2 -56
  47. data/lib/stripe/resources/invoice_payment.rb +62 -4
  48. data/lib/stripe/resources/issuing/authorization.rb +8 -8
  49. data/lib/stripe/resources/issuing/card.rb +1 -1
  50. data/lib/stripe/resources/issuing/cardholder.rb +1 -2
  51. data/lib/stripe/resources/issuing/dispute.rb +3 -3
  52. data/lib/stripe/resources/issuing/transaction.rb +0 -6
  53. data/lib/stripe/resources/line_item.rb +0 -37
  54. data/lib/stripe/resources/mandate.rb +0 -24
  55. data/lib/stripe/resources/payment_intent.rb +1912 -6840
  56. data/lib/stripe/resources/payment_method.rb +47 -301
  57. data/lib/stripe/resources/payment_method_configuration.rb +112 -112
  58. data/lib/stripe/resources/payment_method_domain.rb +2 -2
  59. data/lib/stripe/resources/payout.rb +4 -10
  60. data/lib/stripe/resources/person.rb +2 -2
  61. data/lib/stripe/resources/plan.rb +2 -3
  62. data/lib/stripe/resources/price.rb +1 -31
  63. data/lib/stripe/resources/product.rb +1 -61
  64. data/lib/stripe/resources/promotion_code.rb +0 -10
  65. data/lib/stripe/resources/quote.rb +6 -2046
  66. data/lib/stripe/resources/radar/value_list.rb +1 -2
  67. data/lib/stripe/resources/radar/value_list_item.rb +1 -2
  68. data/lib/stripe/resources/refund.rb +6 -10
  69. data/lib/stripe/resources/reversal.rb +1 -1
  70. data/lib/stripe/resources/review.rb +1 -1
  71. data/lib/stripe/resources/setup_attempt.rb +0 -21
  72. data/lib/stripe/resources/setup_intent.rb +120 -877
  73. data/lib/stripe/resources/source.rb +1 -30
  74. data/lib/stripe/resources/subscription.rb +97 -326
  75. data/lib/stripe/resources/subscription_item.rb +32 -80
  76. data/lib/stripe/resources/subscription_schedule.rb +127 -1015
  77. data/lib/stripe/resources/tax/calculation.rb +4 -0
  78. data/lib/stripe/resources/tax/calculation_line_item.rb +2 -0
  79. data/lib/stripe/resources/tax/registration.rb +1 -1
  80. data/lib/stripe/resources/tax_id.rb +3 -14
  81. data/lib/stripe/resources/tax_rate.rb +2 -2
  82. data/lib/stripe/resources/terminal/configuration.rb +1 -2
  83. data/lib/stripe/resources/terminal/location.rb +2 -3
  84. data/lib/stripe/resources/terminal/reader.rb +8 -142
  85. data/lib/stripe/resources/test_helpers/test_clock.rb +1 -2
  86. data/lib/stripe/resources/token.rb +2 -2
  87. data/lib/stripe/resources/transfer.rb +1 -7
  88. data/lib/stripe/resources/treasury/financial_account.rb +3 -22
  89. data/lib/stripe/resources/treasury/financial_account_features.rb +0 -2
  90. data/lib/stripe/resources/treasury/outbound_transfer.rb +0 -37
  91. data/lib/stripe/resources/treasury/received_credit.rb +1 -38
  92. data/lib/stripe/resources/treasury/received_debit.rb +1 -40
  93. data/lib/stripe/resources/webhook_endpoint.rb +1 -2
  94. data/lib/stripe/resources.rb +0 -99
  95. data/lib/stripe/services/account_external_account_service.rb +2 -3
  96. data/lib/stripe/services/account_login_link_service.rb +1 -1
  97. data/lib/stripe/services/account_person_service.rb +1 -2
  98. data/lib/stripe/services/account_service.rb +23 -559
  99. data/lib/stripe/services/account_session_service.rb +29 -229
  100. data/lib/stripe/services/apple_pay_domain_service.rb +1 -2
  101. data/lib/stripe/services/balance_service.rb +1 -1
  102. data/lib/stripe/services/billing/credit_balance_summary_service.rb +1 -4
  103. data/lib/stripe/services/billing/credit_balance_transaction_service.rb +0 -4
  104. data/lib/stripe/services/billing/credit_grant_service.rb +0 -8
  105. data/lib/stripe/services/billing_portal/session_service.rb +0 -4
  106. data/lib/stripe/services/charge_service.rb +4 -1354
  107. data/lib/stripe/services/checkout/session_service.rb +13 -250
  108. data/lib/stripe/services/coupon_service.rb +2 -19
  109. data/lib/stripe/services/credit_note_service.rb +7 -12
  110. data/lib/stripe/services/customer_balance_transaction_service.rb +3 -3
  111. data/lib/stripe/services/customer_cash_balance_transaction_service.rb +2 -2
  112. data/lib/stripe/services/customer_payment_source_service.rb +1 -1
  113. data/lib/stripe/services/customer_service.rb +3 -5
  114. data/lib/stripe/services/customer_session_service.rb +1 -4
  115. data/lib/stripe/services/customer_tax_id_service.rb +1 -2
  116. data/lib/stripe/services/dispute_service.rb +1 -1
  117. data/lib/stripe/services/file_service.rb +1 -1
  118. data/lib/stripe/services/financial_connections/account_service.rb +2 -7
  119. data/lib/stripe/services/financial_connections/session_service.rb +2 -34
  120. data/lib/stripe/services/financial_connections_service.rb +1 -2
  121. data/lib/stripe/services/identity/verification_session_service.rb +5 -13
  122. data/lib/stripe/services/invoice_item_service.rb +3 -76
  123. data/lib/stripe/services/invoice_line_item_service.rb +1 -33
  124. data/lib/stripe/services/invoice_payment_service.rb +83 -0
  125. data/lib/stripe/services/invoice_service.rb +74 -1049
  126. data/lib/stripe/services/issuing/authorization_service.rb +4 -4
  127. data/lib/stripe/services/issuing/card_service.rb +1 -1
  128. data/lib/stripe/services/issuing/cardholder_service.rb +1 -2
  129. data/lib/stripe/services/issuing/dispute_service.rb +2 -2
  130. data/lib/stripe/services/issuing/transaction_service.rb +0 -4
  131. data/lib/stripe/services/issuing_service.rb +1 -5
  132. data/lib/stripe/services/payment_intent_service.rb +439 -4928
  133. data/lib/stripe/services/payment_method_configuration_service.rb +82 -82
  134. data/lib/stripe/services/payment_method_domain_service.rb +1 -1
  135. data/lib/stripe/services/payment_method_service.rb +44 -226
  136. data/lib/stripe/services/payout_service.rb +2 -6
  137. data/lib/stripe/services/plan_service.rb +2 -3
  138. data/lib/stripe/services/price_service.rb +2 -21
  139. data/lib/stripe/services/product_feature_service.rb +1 -2
  140. data/lib/stripe/services/product_service.rb +2 -41
  141. data/lib/stripe/services/promotion_code_service.rb +1 -9
  142. data/lib/stripe/services/quote_service.rb +7 -1730
  143. data/lib/stripe/services/radar/early_fraud_warning_service.rb +1 -1
  144. data/lib/stripe/services/radar/value_list_item_service.rb +1 -2
  145. data/lib/stripe/services/radar/value_list_service.rb +1 -2
  146. data/lib/stripe/services/setup_intent_service.rb +119 -836
  147. data/lib/stripe/services/source_service.rb +1 -1
  148. data/lib/stripe/services/subscription_item_service.rb +27 -73
  149. data/lib/stripe/services/subscription_schedule_service.rb +101 -916
  150. data/lib/stripe/services/subscription_service.rb +85 -282
  151. data/lib/stripe/services/tax/calculation_service.rb +4 -0
  152. data/lib/stripe/services/tax/registration_service.rb +1 -1
  153. data/lib/stripe/services/tax_id_service.rb +3 -10
  154. data/lib/stripe/services/tax_service.rb +1 -3
  155. data/lib/stripe/services/terminal/configuration_service.rb +1 -2
  156. data/lib/stripe/services/terminal/location_service.rb +2 -3
  157. data/lib/stripe/services/terminal/reader_service.rb +5 -81
  158. data/lib/stripe/services/terminal_service.rb +1 -2
  159. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +33 -190
  160. data/lib/stripe/services/test_helpers/test_clock_service.rb +1 -2
  161. data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +1 -25
  162. data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +1 -25
  163. data/lib/stripe/services/token_service.rb +1 -1
  164. data/lib/stripe/services/transfer_service.rb +1 -5
  165. data/lib/stripe/services/treasury/financial_account_features_service.rb +1 -4
  166. data/lib/stripe/services/treasury/financial_account_service.rb +2 -16
  167. data/lib/stripe/services/treasury/outbound_transfer_service.rb +0 -24
  168. data/lib/stripe/services/v1_services.rb +2 -12
  169. data/lib/stripe/services/v2/billing/meter_event_session_service.rb +1 -2
  170. data/lib/stripe/services/v2/core/event_destination_service.rb +4 -10
  171. data/lib/stripe/services/v2/core/event_service.rb +1 -2
  172. data/lib/stripe/services/v2/core_service.rb +1 -4
  173. data/lib/stripe/services/v2_services.rb +2 -4
  174. data/lib/stripe/services/webhook_endpoint_service.rb +1 -2
  175. data/lib/stripe/services.rb +1 -54
  176. data/lib/stripe/stripe_configuration.rb +1 -3
  177. data/lib/stripe/stripe_object.rb +1 -1
  178. data/lib/stripe/util.rb +1 -7
  179. data/lib/stripe/version.rb +1 -1
  180. data/lib/stripe.rb +0 -53
  181. data/rbi/stripe/resources/account.rbi +4926 -0
  182. data/rbi/stripe/resources/account_link.rbi +74 -0
  183. data/rbi/stripe/resources/account_session.rbi +1013 -0
  184. data/rbi/stripe/resources/apple_pay_domain.rbi +88 -0
  185. data/rbi/stripe/resources/application.rbi +20 -0
  186. data/rbi/stripe/resources/application_fee.rbi +118 -0
  187. data/rbi/stripe/resources/application_fee_refund.rbi +37 -0
  188. data/rbi/stripe/resources/apps/secret.rbi +195 -0
  189. data/rbi/stripe/resources/balance.rbi +235 -0
  190. data/rbi/stripe/resources/balance_transaction.rbi +147 -0
  191. data/rbi/stripe/resources/bank_account.rbi +127 -0
  192. data/rbi/stripe/resources/billing/alert.rbi +201 -0
  193. data/rbi/stripe/resources/billing/alert_triggered.rbi +28 -0
  194. data/rbi/stripe/resources/billing/credit_balance_summary.rbi +63 -0
  195. data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +147 -0
  196. data/rbi/stripe/resources/billing/credit_grant.rbi +291 -0
  197. data/rbi/stripe/resources/billing/meter.rbi +226 -0
  198. data/rbi/stripe/resources/billing/meter_event.rbi +64 -0
  199. data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +64 -0
  200. data/rbi/stripe/resources/billing/meter_event_summary.rbi +35 -0
  201. data/rbi/stripe/resources/billing_portal/configuration.rbi +645 -0
  202. data/rbi/stripe/resources/billing_portal/session.rbi +345 -0
  203. data/rbi/stripe/resources/capability.rbi +125 -0
  204. data/rbi/stripe/resources/card.rbi +125 -0
  205. data/rbi/stripe/resources/cash_balance.rbi +32 -0
  206. data/rbi/stripe/resources/charge.rbi +2069 -0
  207. data/rbi/stripe/resources/checkout/session.rbi +4004 -0
  208. data/rbi/stripe/resources/climate/order.rbi +245 -0
  209. data/rbi/stripe/resources/climate/product.rbi +75 -0
  210. data/rbi/stripe/resources/climate/supplier.rbi +72 -0
  211. data/rbi/stripe/resources/confirmation_token.rbi +1807 -0
  212. data/rbi/stripe/resources/connect_collection_transfer.rbi +26 -0
  213. data/rbi/stripe/resources/country_spec.rbi +85 -0
  214. data/rbi/stripe/resources/coupon.rbi +250 -0
  215. data/rbi/stripe/resources/credit_note.rbi +752 -0
  216. data/rbi/stripe/resources/credit_note_line_item.rbi +101 -0
  217. data/rbi/stripe/resources/customer.rbi +1005 -0
  218. data/rbi/stripe/resources/customer_balance_transaction.rbi +56 -0
  219. data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +151 -0
  220. data/rbi/stripe/resources/customer_session.rbi +200 -0
  221. data/rbi/stripe/resources/discount.rbi +53 -0
  222. data/rbi/stripe/resources/dispute.rbi +761 -0
  223. data/rbi/stripe/resources/entitlements/active_entitlement.rbi +58 -0
  224. data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +23 -0
  225. data/rbi/stripe/resources/entitlements/feature.rbi +117 -0
  226. data/rbi/stripe/resources/ephemeral_key.rbi +44 -0
  227. data/rbi/stripe/resources/event.rbi +149 -0
  228. data/rbi/stripe/resources/exchange_rate.rbi +66 -0
  229. data/rbi/stripe/resources/file.rbi +143 -0
  230. data/rbi/stripe/resources/file_link.rbi +141 -0
  231. data/rbi/stripe/resources/financial_connections/account.rbi +339 -0
  232. data/rbi/stripe/resources/financial_connections/account_owner.rbi +35 -0
  233. data/rbi/stripe/resources/financial_connections/account_ownership.rbi +23 -0
  234. data/rbi/stripe/resources/financial_connections/session.rbi +123 -0
  235. data/rbi/stripe/resources/financial_connections/transaction.rbi +124 -0
  236. data/rbi/stripe/resources/forwarding/request.rbi +216 -0
  237. data/rbi/stripe/resources/funding_instructions.rbi +437 -0
  238. data/rbi/stripe/resources/identity/verification_report.rbi +360 -0
  239. data/rbi/stripe/resources/identity/verification_session.rbi +526 -0
  240. data/rbi/stripe/resources/invoice.rbi +3812 -0
  241. data/rbi/stripe/resources/invoice_item.rbi +473 -0
  242. data/rbi/stripe/resources/invoice_line_item.rbi +432 -0
  243. data/rbi/stripe/resources/invoice_payment.rbi +121 -0
  244. data/rbi/stripe/resources/invoice_rendering_template.rbi +104 -0
  245. data/rbi/stripe/resources/issuing/authorization.rbi +1283 -0
  246. data/rbi/stripe/resources/issuing/card.rbi +741 -0
  247. data/rbi/stripe/resources/issuing/cardholder.rbi +744 -0
  248. data/rbi/stripe/resources/issuing/dispute.rbi +913 -0
  249. data/rbi/stripe/resources/issuing/personalization_design.rbi +338 -0
  250. data/rbi/stripe/resources/issuing/physical_bundle.rbi +79 -0
  251. data/rbi/stripe/resources/issuing/token.rbi +226 -0
  252. data/rbi/stripe/resources/issuing/transaction.rbi +1061 -0
  253. data/rbi/stripe/resources/line_item.rbi +72 -0
  254. data/rbi/stripe/resources/login_link.rbi +19 -0
  255. data/rbi/stripe/resources/mandate.rbi +187 -0
  256. data/rbi/stripe/resources/payment_intent.rbi +9647 -0
  257. data/rbi/stripe/resources/payment_link.rbi +1801 -0
  258. data/rbi/stripe/resources/payment_method.rbi +1761 -0
  259. data/rbi/stripe/resources/payment_method_configuration.rbi +3550 -0
  260. data/rbi/stripe/resources/payment_method_domain.rbi +228 -0
  261. data/rbi/stripe/resources/payout.rbi +300 -0
  262. data/rbi/stripe/resources/person.rbi +401 -0
  263. data/rbi/stripe/resources/plan.rbi +371 -0
  264. data/rbi/stripe/resources/price.rbi +694 -0
  265. data/rbi/stripe/resources/product.rbi +555 -0
  266. data/rbi/stripe/resources/product_feature.rbi +26 -0
  267. data/rbi/stripe/resources/promotion_code.rbi +261 -0
  268. data/rbi/stripe/resources/quote.rbi +1126 -0
  269. data/rbi/stripe/resources/radar/early_fraud_warning.rbi +98 -0
  270. data/rbi/stripe/resources/radar/value_list.rbi +168 -0
  271. data/rbi/stripe/resources/radar/value_list_item.rbi +129 -0
  272. data/rbi/stripe/resources/refund.rbi +523 -0
  273. data/rbi/stripe/resources/reporting/report_run.rbi +191 -0
  274. data/rbi/stripe/resources/reporting/report_type.rbi +57 -0
  275. data/rbi/stripe/resources/reserve_transaction.rbi +23 -0
  276. data/rbi/stripe/resources/reversal.rbi +51 -0
  277. data/rbi/stripe/resources/review.rbi +154 -0
  278. data/rbi/stripe/resources/setup_attempt.rbi +477 -0
  279. data/rbi/stripe/resources/setup_intent.rbi +3655 -0
  280. data/rbi/stripe/resources/shipping_rate.rbi +305 -0
  281. data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +75 -0
  282. data/rbi/stripe/resources/source.rbi +1496 -0
  283. data/rbi/stripe/resources/source_mandate_notification.rbi +77 -0
  284. data/rbi/stripe/resources/source_transaction.rbi +127 -0
  285. data/rbi/stripe/resources/subscription.rbi +2027 -0
  286. data/rbi/stripe/resources/subscription_item.rbi +404 -0
  287. data/rbi/stripe/resources/subscription_schedule.rbi +1623 -0
  288. data/rbi/stripe/resources/tax/calculation.rbi +478 -0
  289. data/rbi/stripe/resources/tax/calculation_line_item.rbi +91 -0
  290. data/rbi/stripe/resources/tax/registration.rbi +2713 -0
  291. data/rbi/stripe/resources/tax/settings.rbi +141 -0
  292. data/rbi/stripe/resources/tax/transaction.rbi +351 -0
  293. data/rbi/stripe/resources/tax/transaction_line_item.rbi +54 -0
  294. data/rbi/stripe/resources/tax_code.rbi +44 -0
  295. data/rbi/stripe/resources/tax_deducted_at_source.rbi +23 -0
  296. data/rbi/stripe/resources/tax_id.rbi +165 -0
  297. data/rbi/stripe/resources/tax_rate.rbi +239 -0
  298. data/rbi/stripe/resources/terminal/configuration.rbi +1386 -0
  299. data/rbi/stripe/resources/terminal/connection_token.rbi +37 -0
  300. data/rbi/stripe/resources/terminal/location.rbi +222 -0
  301. data/rbi/stripe/resources/terminal/reader.rbi +847 -0
  302. data/rbi/stripe/resources/test_helpers/test_clock.rbi +132 -0
  303. data/rbi/stripe/resources/token.rbi +1283 -0
  304. data/rbi/stripe/resources/topup.rbi +222 -0
  305. data/rbi/stripe/resources/transfer.rbi +199 -0
  306. data/rbi/stripe/resources/treasury/credit_reversal.rbi +119 -0
  307. data/rbi/stripe/resources/treasury/debit_reversal.rbi +131 -0
  308. data/rbi/stripe/resources/treasury/financial_account.rbi +865 -0
  309. data/rbi/stripe/resources/treasury/financial_account_features.rbi +260 -0
  310. data/rbi/stripe/resources/treasury/inbound_transfer.rbi +295 -0
  311. data/rbi/stripe/resources/treasury/outbound_payment.rbi +592 -0
  312. data/rbi/stripe/resources/treasury/outbound_transfer.rbi +431 -0
  313. data/rbi/stripe/resources/treasury/received_credit.rbi +302 -0
  314. data/rbi/stripe/resources/treasury/received_debit.rbi +256 -0
  315. data/rbi/stripe/resources/treasury/transaction.rbi +215 -0
  316. data/rbi/stripe/resources/treasury/transaction_entry.rbi +192 -0
  317. data/rbi/stripe/resources/v2/amount.rbi +14 -0
  318. data/rbi/stripe/resources/v2/billing/meter_event.rbi +37 -0
  319. data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +41 -0
  320. data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +31 -0
  321. data/rbi/stripe/resources/v2/event.rbi +48 -0
  322. data/rbi/stripe/resources/v2/event_destination.rbi +91 -0
  323. data/rbi/stripe/resources/webhook_endpoint.rbi +168 -0
  324. data/rbi/stripe/services/account_capability_service.rbi +51 -0
  325. data/{lib/stripe/services/external_account_service.rb → rbi/stripe/services/account_external_account_service.rbi} +124 -138
  326. data/rbi/stripe/services/account_link_service.rbi +58 -0
  327. data/rbi/stripe/services/account_login_link_service.rbi +22 -0
  328. data/rbi/stripe/services/account_person_service.rbi +1011 -0
  329. data/rbi/stripe/services/account_service.rbi +4213 -0
  330. data/rbi/stripe/services/account_session_service.rbi +646 -0
  331. data/rbi/stripe/services/apple_pay_domain_service.rbi +76 -0
  332. data/rbi/stripe/services/application_fee_refund_service.rbi +93 -0
  333. data/rbi/stripe/services/application_fee_service.rbi +78 -0
  334. data/rbi/stripe/services/apps/secret_service.rbi +151 -0
  335. data/rbi/stripe/services/apps_service.rbi +9 -0
  336. data/rbi/stripe/services/balance_service.rbi +21 -0
  337. data/rbi/stripe/services/balance_transaction_service.rbi +93 -0
  338. data/rbi/stripe/services/billing/alert_service.rbi +152 -0
  339. data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +68 -0
  340. data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +59 -0
  341. data/rbi/stripe/services/billing/credit_grant_service.rbi +211 -0
  342. data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +42 -0
  343. data/rbi/stripe/services/billing/meter_event_service.rbi +42 -0
  344. data/rbi/stripe/services/billing/meter_event_summary_service.rbi +54 -0
  345. data/rbi/stripe/services/billing/meter_service.rbi +163 -0
  346. data/rbi/stripe/services/billing_portal/configuration_service.rbi +511 -0
  347. data/rbi/stripe/services/billing_portal/session_service.rbi +204 -0
  348. data/rbi/stripe/services/billing_portal_service.rbi +10 -0
  349. data/rbi/stripe/services/billing_service.rbi +15 -0
  350. data/rbi/stripe/services/charge_service.rbi +448 -0
  351. data/rbi/stripe/services/checkout/session_line_item_service.rbi +33 -0
  352. data/rbi/stripe/services/checkout/session_service.rbi +2614 -0
  353. data/rbi/stripe/services/checkout_service.rbi +9 -0
  354. data/rbi/stripe/services/climate/order_service.rbi +142 -0
  355. data/rbi/stripe/services/climate/product_service.rbi +46 -0
  356. data/{lib/stripe/services/financial_connections/institution_service.rb → rbi/stripe/services/climate/supplier_service.rbi} +25 -36
  357. data/rbi/stripe/services/climate_service.rbi +11 -0
  358. data/rbi/stripe/services/confirmation_token_service.rbi +20 -0
  359. data/rbi/stripe/services/country_spec_service.rbi +44 -0
  360. data/rbi/stripe/services/coupon_service.rbi +194 -0
  361. data/{lib/stripe/services/quote_preview_invoice_service.rb → rbi/stripe/services/credit_note_line_item_service.rbi} +16 -20
  362. data/rbi/stripe/services/credit_note_preview_lines_service.rbi +167 -0
  363. data/rbi/stripe/services/credit_note_service.rbi +415 -0
  364. data/rbi/stripe/services/customer_balance_transaction_service.rbi +92 -0
  365. data/rbi/stripe/services/customer_cash_balance_service.rbi +45 -0
  366. data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +44 -0
  367. data/rbi/stripe/services/customer_funding_instructions_service.rbi +59 -0
  368. data/rbi/stripe/services/customer_payment_method_service.rbi +57 -0
  369. data/rbi/stripe/services/customer_payment_source_service.rbi +232 -0
  370. data/rbi/stripe/services/customer_service.rbi +647 -0
  371. data/rbi/stripe/services/customer_session_service.rbi +116 -0
  372. data/rbi/stripe/services/customer_tax_id_service.rbi +70 -0
  373. data/rbi/stripe/services/dispute_service.rbi +424 -0
  374. data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +55 -0
  375. data/rbi/stripe/services/entitlements/feature_service.rbi +107 -0
  376. data/rbi/stripe/services/entitlements_service.rbi +10 -0
  377. data/rbi/stripe/services/ephemeral_key_service.rbi +53 -0
  378. data/rbi/stripe/services/event_service.rbi +83 -0
  379. data/rbi/stripe/services/exchange_rate_service.rbi +44 -0
  380. data/rbi/stripe/services/file_link_service.rbi +124 -0
  381. data/rbi/stripe/services/file_service.rbi +116 -0
  382. data/rbi/stripe/services/financial_connections/account_owner_service.rbi +42 -0
  383. data/rbi/stripe/services/financial_connections/account_service.rbi +133 -0
  384. data/rbi/stripe/services/financial_connections/session_service.rbi +88 -0
  385. data/rbi/stripe/services/financial_connections/transaction_service.rbi +92 -0
  386. data/rbi/stripe/services/financial_connections_service.rbi +11 -0
  387. data/rbi/stripe/services/forwarding/request_service.rbi +134 -0
  388. data/rbi/stripe/services/forwarding_service.rbi +9 -0
  389. data/rbi/stripe/services/identity/verification_report_service.rbi +87 -0
  390. data/rbi/stripe/services/identity/verification_session_service.rbi +323 -0
  391. data/rbi/stripe/services/identity_service.rbi +10 -0
  392. data/rbi/stripe/services/invoice_item_service.rbi +366 -0
  393. data/rbi/stripe/services/invoice_line_item_service.rbi +259 -0
  394. data/rbi/stripe/services/invoice_payment_service.rbi +71 -0
  395. data/rbi/stripe/services/invoice_rendering_template_service.rbi +82 -0
  396. data/rbi/stripe/services/invoice_service.rbi +2981 -0
  397. data/rbi/stripe/services/issuing/authorization_service.rbi +146 -0
  398. data/rbi/stripe/services/issuing/card_service.rbi +495 -0
  399. data/rbi/stripe/services/issuing/cardholder_service.rbi +587 -0
  400. data/rbi/stripe/services/issuing/dispute_service.rbi +707 -0
  401. data/rbi/stripe/services/issuing/personalization_design_service.rbi +243 -0
  402. data/rbi/stripe/services/issuing/physical_bundle_service.rbi +59 -0
  403. data/rbi/stripe/services/issuing/token_service.rbi +99 -0
  404. data/rbi/stripe/services/issuing/transaction_service.rbi +105 -0
  405. data/rbi/stripe/services/issuing_service.rbi +16 -0
  406. data/rbi/stripe/services/mandate_service.rbi +20 -0
  407. data/rbi/stripe/services/payment_intent_service.rbi +7659 -0
  408. data/{lib/stripe/services/payment_intent_amount_details_line_item_service.rb → rbi/stripe/services/payment_link_line_item_service.rbi} +16 -20
  409. data/rbi/stripe/services/payment_link_service.rbi +1352 -0
  410. data/rbi/stripe/services/payment_method_configuration_service.rbi +2487 -0
  411. data/rbi/stripe/services/payment_method_domain_service.rbi +112 -0
  412. data/rbi/stripe/services/payment_method_service.rbi +776 -0
  413. data/rbi/stripe/services/payout_service.rbi +205 -0
  414. data/rbi/stripe/services/plan_service.rbi +282 -0
  415. data/rbi/stripe/services/price_service.rbi +546 -0
  416. data/rbi/stripe/services/product_feature_service.rbi +67 -0
  417. data/rbi/stripe/services/product_service.rbi +477 -0
  418. data/rbi/stripe/services/promotion_code_service.rbi +214 -0
  419. data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +31 -0
  420. data/{lib/stripe/services/order_line_item_service.rb → rbi/stripe/services/quote_line_item_service.rbi} +16 -20
  421. data/rbi/stripe/services/quote_service.rbi +686 -0
  422. data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +85 -0
  423. data/rbi/stripe/services/radar/value_list_item_service.rbi +109 -0
  424. data/rbi/stripe/services/radar/value_list_service.rbi +141 -0
  425. data/rbi/stripe/services/radar_service.rbi +11 -0
  426. data/rbi/stripe/services/refund_service.rbi +185 -0
  427. data/rbi/stripe/services/reporting/report_run_service.rbi +135 -0
  428. data/rbi/stripe/services/reporting/report_type_service.rbi +35 -0
  429. data/rbi/stripe/services/reporting_service.rbi +10 -0
  430. data/rbi/stripe/services/review_service.rbi +84 -0
  431. data/rbi/stripe/services/setup_attempt_service.rbi +65 -0
  432. data/rbi/stripe/services/setup_intent_service.rbi +3391 -0
  433. data/rbi/stripe/services/shipping_rate_service.rbi +241 -0
  434. data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +46 -0
  435. data/rbi/stripe/services/sigma_service.rbi +9 -0
  436. data/rbi/stripe/services/source_service.rbi +663 -0
  437. data/{lib/stripe/services/quote_line_service.rb → rbi/stripe/services/source_transaction_service.rbi} +16 -20
  438. data/rbi/stripe/services/subscription_item_service.rbi +350 -0
  439. data/rbi/stripe/services/subscription_schedule_service.rbi +1290 -0
  440. data/rbi/stripe/services/subscription_service.rbi +1648 -0
  441. data/{lib/stripe/services/financial_connections/account_inferred_balance_service.rb → rbi/stripe/services/tax/calculation_line_item_service.rbi} +17 -21
  442. data/rbi/stripe/services/tax/calculation_service.rbi +234 -0
  443. data/rbi/stripe/services/tax/registration_service.rbi +1845 -0
  444. data/rbi/stripe/services/tax/settings_service.rbi +93 -0
  445. data/{lib/stripe/services/privacy/redaction_job_validation_error_service.rb → rbi/stripe/services/tax/transaction_line_item_service.rbi} +17 -21
  446. data/rbi/stripe/services/tax/transaction_service.rbi +146 -0
  447. data/rbi/stripe/services/tax_code_service.rbi +44 -0
  448. data/rbi/stripe/services/tax_id_service.rbi +110 -0
  449. data/rbi/stripe/services/tax_rate_service.rbi +185 -0
  450. data/rbi/stripe/services/tax_service.rbi +12 -0
  451. data/rbi/stripe/services/terminal/configuration_service.rbi +1118 -0
  452. data/rbi/stripe/services/terminal/connection_token_service.rbi +25 -0
  453. data/rbi/stripe/services/terminal/location_service.rbi +182 -0
  454. data/rbi/stripe/services/terminal/reader_service.rbi +455 -0
  455. data/rbi/stripe/services/terminal_service.rbi +12 -0
  456. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +739 -0
  457. data/rbi/stripe/services/test_helpers/customer_service.rbi +33 -0
  458. data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +848 -0
  459. data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +76 -0
  460. data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +69 -0
  461. data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +711 -0
  462. data/rbi/stripe/services/test_helpers/issuing_service.rbi +14 -0
  463. data/rbi/stripe/services/test_helpers/refund_service.rbi +22 -0
  464. data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +93 -0
  465. data/rbi/stripe/services/test_helpers/terminal_service.rbi +11 -0
  466. data/rbi/stripe/services/test_helpers/test_clock_service.rbi +90 -0
  467. data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +64 -0
  468. data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +125 -0
  469. data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +125 -0
  470. data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +87 -0
  471. data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +87 -0
  472. data/rbi/stripe/services/test_helpers/treasury_service.rbi +15 -0
  473. data/rbi/stripe/services/test_helpers_service.rbi +15 -0
  474. data/rbi/stripe/services/token_service.rbi +1257 -0
  475. data/rbi/stripe/services/topup_service.rbi +176 -0
  476. data/rbi/stripe/services/transfer_reversal_service.rbi +101 -0
  477. data/rbi/stripe/services/transfer_service.rbi +152 -0
  478. data/rbi/stripe/services/treasury/credit_reversal_service.rbi +84 -0
  479. data/rbi/stripe/services/treasury/debit_reversal_service.rbi +88 -0
  480. data/rbi/stripe/services/treasury/financial_account_features_service.rbi +198 -0
  481. data/rbi/stripe/services/treasury/financial_account_service.rbi +562 -0
  482. data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +117 -0
  483. data/rbi/stripe/services/treasury/outbound_payment_service.rbi +304 -0
  484. data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +157 -0
  485. data/rbi/stripe/services/treasury/received_credit_service.rbi +72 -0
  486. data/rbi/stripe/services/treasury/received_debit_service.rbi +59 -0
  487. data/rbi/stripe/services/treasury/transaction_entry_service.rbi +111 -0
  488. data/rbi/stripe/services/treasury/transaction_service.rbi +122 -0
  489. data/rbi/stripe/services/treasury_service.rbi +18 -0
  490. data/rbi/stripe/services/v1_services.rbi +77 -0
  491. data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +39 -0
  492. data/rbi/stripe/services/v2/billing/meter_event_service.rbi +42 -0
  493. data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +18 -0
  494. data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +55 -0
  495. data/rbi/stripe/services/v2/billing_service.rbi +14 -0
  496. data/rbi/stripe/services/v2/core/event_destination_service.rbi +192 -0
  497. data/rbi/stripe/services/v2/core/event_service.rbi +36 -0
  498. data/rbi/stripe/services/v2/core_service.rbi +12 -0
  499. data/rbi/stripe/services/v2_services.rbi +10 -0
  500. data/rbi/stripe/services/webhook_endpoint_service.rbi +129 -0
  501. data/stripe.gemspec +1 -4
  502. metadata +326 -158
  503. data/lib/stripe/events/v2_core_account_closed_event.rb +0 -21
  504. data/lib/stripe/events/v2_core_account_created_event.rb +0 -21
  505. data/lib/stripe/events/v2_core_account_including_configuration_customer_capability_status_updated_event.rb +0 -23
  506. data/lib/stripe/events/v2_core_account_including_configuration_customer_updated_event.rb +0 -21
  507. data/lib/stripe/events/v2_core_account_including_configuration_merchant_capability_status_updated_event.rb +0 -23
  508. data/lib/stripe/events/v2_core_account_including_configuration_merchant_updated_event.rb +0 -21
  509. data/lib/stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event.rb +0 -23
  510. data/lib/stripe/events/v2_core_account_including_configuration_recipient_updated_event.rb +0 -21
  511. data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +0 -21
  512. data/lib/stripe/events/v2_core_account_including_identity_updated_event.rb +0 -21
  513. data/lib/stripe/events/v2_core_account_including_requirements_updated_event.rb +0 -21
  514. data/lib/stripe/events/v2_core_account_link_completed_event.rb +0 -13
  515. data/lib/stripe/events/v2_core_account_person_created_event.rb +0 -23
  516. data/lib/stripe/events/v2_core_account_person_deleted_event.rb +0 -23
  517. data/lib/stripe/events/v2_core_account_person_updated_event.rb +0 -23
  518. data/lib/stripe/events/v2_core_account_updated_event.rb +0 -21
  519. data/lib/stripe/events/v2_money_management_adjustment_created_event.rb +0 -21
  520. data/lib/stripe/events/v2_money_management_financial_account_created_event.rb +0 -21
  521. data/lib/stripe/events/v2_money_management_financial_account_updated_event.rb +0 -21
  522. data/lib/stripe/events/v2_money_management_financial_address_activated_event.rb +0 -21
  523. data/lib/stripe/events/v2_money_management_financial_address_failed_event.rb +0 -21
  524. data/lib/stripe/events/v2_money_management_inbound_transfer_available_event.rb +0 -23
  525. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +0 -21
  526. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +0 -21
  527. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +0 -21
  528. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +0 -21
  529. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +0 -21
  530. data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +0 -21
  531. data/lib/stripe/events/v2_money_management_outbound_payment_created_event.rb +0 -21
  532. data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +0 -21
  533. data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +0 -21
  534. data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +0 -21
  535. data/lib/stripe/events/v2_money_management_outbound_payment_updated_event.rb +0 -21
  536. data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +0 -21
  537. data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +0 -21
  538. data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +0 -21
  539. data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +0 -21
  540. data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +0 -21
  541. data/lib/stripe/events/v2_money_management_outbound_transfer_updated_event.rb +0 -21
  542. data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +0 -23
  543. data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +0 -21
  544. data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +0 -21
  545. data/lib/stripe/events/v2_money_management_received_credit_succeeded_event.rb +0 -21
  546. data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +0 -21
  547. data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +0 -21
  548. data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +0 -21
  549. data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +0 -21
  550. data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +0 -21
  551. data/lib/stripe/events/v2_money_management_transaction_created_event.rb +0 -21
  552. data/lib/stripe/events/v2_money_management_transaction_updated_event.rb +0 -21
  553. data/lib/stripe/resources/account_notice.rb +0 -123
  554. data/lib/stripe/resources/balance_settings.rb +0 -105
  555. data/lib/stripe/resources/billing/meter_error_report.rb +0 -59
  556. data/lib/stripe/resources/capital/financing_offer.rb +0 -179
  557. data/lib/stripe/resources/capital/financing_summary.rb +0 -55
  558. data/lib/stripe/resources/capital/financing_transaction.rb +0 -114
  559. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -27
  560. data/lib/stripe/resources/financial_connections/institution.rb +0 -90
  561. data/lib/stripe/resources/fx_quote.rb +0 -184
  562. data/lib/stripe/resources/gift_cards/card.rb +0 -208
  563. data/lib/stripe/resources/gift_cards/transaction.rb +0 -272
  564. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -602
  565. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +0 -82
  566. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +0 -86
  567. data/lib/stripe/resources/issuing/settlement.rb +0 -53
  568. data/lib/stripe/resources/margin.rb +0 -115
  569. data/lib/stripe/resources/order.rb +0 -2859
  570. data/lib/stripe/resources/payment_attempt_record.rb +0 -1078
  571. data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +0 -65
  572. data/lib/stripe/resources/payment_record.rb +0 -1607
  573. data/lib/stripe/resources/privacy/redaction_job.rb +0 -275
  574. data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +0 -25
  575. data/lib/stripe/resources/quote_line.rb +0 -274
  576. data/lib/stripe/resources/quote_preview_invoice.rb +0 -663
  577. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -339
  578. data/lib/stripe/resources/tax/association.rb +0 -89
  579. data/lib/stripe/resources/tax/form.rb +0 -211
  580. data/lib/stripe/resources/terminal/reader_collected_data.rb +0 -31
  581. data/lib/stripe/resources/v2/core/account.rb +0 -1746
  582. data/lib/stripe/resources/v2/core/account_link.rb +0 -56
  583. data/lib/stripe/resources/v2/core/person.rb +0 -276
  584. data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +0 -74
  585. data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +0 -39
  586. data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +0 -20
  587. data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +0 -22
  588. data/lib/stripe/resources/v2/money_management/adjustment.rb +0 -51
  589. data/lib/stripe/resources/v2/money_management/financial_account.rb +0 -58
  590. data/lib/stripe/resources/v2/money_management/financial_address.rb +0 -68
  591. data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +0 -94
  592. data/lib/stripe/resources/v2/money_management/outbound_payment.rb +0 -129
  593. data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +0 -82
  594. data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +0 -45
  595. data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +0 -117
  596. data/lib/stripe/resources/v2/money_management/payout_method.rb +0 -75
  597. data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +0 -49
  598. data/lib/stripe/resources/v2/money_management/received_credit.rb +0 -136
  599. data/lib/stripe/resources/v2/money_management/received_debit.rb +0 -108
  600. data/lib/stripe/resources/v2/money_management/transaction.rb +0 -78
  601. data/lib/stripe/resources/v2/money_management/transaction_entry.rb +0 -68
  602. data/lib/stripe/services/account_notice_service.rb +0 -101
  603. data/lib/stripe/services/balance_settings_service.rb +0 -96
  604. data/lib/stripe/services/capital/financing_offer_service.rb +0 -112
  605. data/lib/stripe/services/capital/financing_summary_service.rb +0 -28
  606. data/lib/stripe/services/capital/financing_transaction_service.rb +0 -79
  607. data/lib/stripe/services/capital_service.rb +0 -15
  608. data/lib/stripe/services/fx_quote_service.rb +0 -123
  609. data/lib/stripe/services/gift_cards/card_service.rb +0 -170
  610. data/lib/stripe/services/gift_cards/transaction_service.rb +0 -209
  611. data/lib/stripe/services/gift_cards_service.rb +0 -14
  612. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +0 -504
  613. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +0 -66
  614. data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +0 -83
  615. data/lib/stripe/services/margin_service.rb +0 -119
  616. data/lib/stripe/services/order_service.rb +0 -2268
  617. data/lib/stripe/services/payment_attempt_record_service.rb +0 -49
  618. data/lib/stripe/services/payment_record_service.rb +0 -542
  619. data/lib/stripe/services/privacy/redaction_job_service.rb +0 -231
  620. data/lib/stripe/services/privacy_service.rb +0 -13
  621. data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +0 -35
  622. data/lib/stripe/services/tax/association_service.rb +0 -31
  623. data/lib/stripe/services/tax/form_service.rb +0 -100
  624. data/lib/stripe/services/terminal/reader_collected_data_service.rb +0 -28
  625. data/lib/stripe/services/v2/core/account_link_service.rb +0 -76
  626. data/lib/stripe/services/v2/core/account_service.rb +0 -4138
  627. data/lib/stripe/services/v2/core/accounts/person_service.rb +0 -1048
  628. data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +0 -135
  629. data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +0 -109
  630. data/lib/stripe/services/v2/core/vault_service.rb +0 -18
  631. data/lib/stripe/services/v2/money_management/adjustment_service.rb +0 -75
  632. data/lib/stripe/services/v2/money_management/financial_account_service.rb +0 -44
  633. data/lib/stripe/services/v2/money_management/financial_address_service.rb +0 -81
  634. data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +0 -126
  635. data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +0 -96
  636. data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +0 -202
  637. data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +0 -237
  638. data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +0 -174
  639. data/lib/stripe/services/v2/money_management/payout_method_service.rb +0 -95
  640. data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +0 -32
  641. data/lib/stripe/services/v2/money_management/received_credit_service.rb +0 -71
  642. data/lib/stripe/services/v2/money_management/received_debit_service.rb +0 -44
  643. data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +0 -70
  644. data/lib/stripe/services/v2/money_management/transaction_service.rb +0 -74
  645. data/lib/stripe/services/v2/money_management_service.rb +0 -31
  646. data/lib/stripe/services/v2/test_helper_service.rb +0 -15
  647. data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +0 -50
  648. data/rbi/stripe.rbi +0 -191867
@@ -7,7 +7,6 @@ module Stripe
7
7
  class Quote < APIResource
8
8
  extend Stripe::APIOperations::Create
9
9
  extend Stripe::APIOperations::List
10
- extend Stripe::APIOperations::NestedResource
11
10
  include Stripe::APIOperations::Save
12
11
 
13
12
  OBJECT_NAME = "quote"
@@ -15,9 +14,6 @@ module Stripe
15
14
  "quote"
16
15
  end
17
16
 
18
- nested_resource_class_methods :preview_invoice, operations: %i[list]
19
- nested_resource_class_methods :preview_subscription_schedule, operations: %i[list]
20
-
21
17
  class AutomaticTax < Stripe::StripeObject
22
18
  class Liability < Stripe::StripeObject
23
19
  # The connected account being referenced when `type` is `account`.
@@ -36,21 +32,6 @@ module Stripe
36
32
  end
37
33
 
38
34
  class Computed < Stripe::StripeObject
39
- class LastReestimationDetails < Stripe::StripeObject
40
- class Failed < Stripe::StripeObject
41
- # The failure `code` is more granular than the `reason` provided and may correspond to a Stripe error code. For automation errors, this field is one of: `reverse_api_failure`, `reverse_api_deadline_exceeeded`, or `reverse_api_response_validation_error`, which are Stripe error codes and map to the error `message` field.
42
- attr_reader :failure_code
43
- # Information derived from the `failure_code` or a freeform message that explains the error as a human-readable English string. For example, "margin ID is not a valid ID".
44
- attr_reader :message
45
- # The reason the reestimation failed.
46
- attr_reader :reason
47
- end
48
- # When `status` is `failed`, provides details about the quote reestimation failure.
49
- attr_reader :failed
50
- # Latest status of the reestimation.
51
- attr_reader :status
52
- end
53
-
54
35
  class Recurring < Stripe::StripeObject
55
36
  class TotalDetails < Stripe::StripeObject
56
37
  class Breakdown < Stripe::StripeObject
@@ -150,12 +131,8 @@ module Stripe
150
131
  # Attribute for field total_details
151
132
  attr_reader :total_details
152
133
  end
153
- # Details of the most recent reestimate of the quote's preview schedules and upcoming invoices, including the status of Stripe's calculation.
154
- attr_reader :last_reestimation_details
155
134
  # The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices.
156
135
  attr_reader :recurring
157
- # The time at which the quote's estimated schedules and upcoming invoices were generated.
158
- attr_reader :updated_at
159
136
  # Attribute for field upfront
160
137
  attr_reader :upfront
161
138
  end
@@ -180,68 +157,6 @@ module Stripe
180
157
  attr_reader :issuer
181
158
  end
182
159
 
183
- class StatusDetails < Stripe::StripeObject
184
- class Canceled < Stripe::StripeObject
185
- # The reason this quote was marked as canceled.
186
- attr_reader :reason
187
- # Time at which the quote was marked as canceled. Measured in seconds since the Unix epoch.
188
- attr_reader :transitioned_at
189
- end
190
-
191
- class Stale < Stripe::StripeObject
192
- class LastReason < Stripe::StripeObject
193
- class LinesInvalid < Stripe::StripeObject
194
- # The timestamp at which the lines were marked as invalid.
195
- attr_reader :invalid_at
196
- # The list of lines that became invalid at the given timestamp.
197
- attr_reader :lines
198
- end
199
-
200
- class SubscriptionChanged < Stripe::StripeObject
201
- # The subscription's state before the quote was marked as stale.
202
- attr_reader :previous_subscription
203
- end
204
-
205
- class SubscriptionScheduleChanged < Stripe::StripeObject
206
- # The subscription schedule's state before the quote was marked as stale.
207
- attr_reader :previous_subscription_schedule
208
- end
209
- # The ID of the line that is invalid if the stale reason type is `line_invalid`.
210
- attr_reader :line_invalid
211
- # The IDs of the lines that are invalid if the stale reason type is `lines_invalid`.
212
- attr_reader :lines_invalid
213
- # The user supplied mark stale reason.
214
- attr_reader :marked_stale
215
- # The ID of the subscription that was canceled.
216
- attr_reader :subscription_canceled
217
- # Attribute for field subscription_changed
218
- attr_reader :subscription_changed
219
- # The ID of the subscription that was expired.
220
- attr_reader :subscription_expired
221
- # The ID of the subscription schedule that was canceled.
222
- attr_reader :subscription_schedule_canceled
223
- # Attribute for field subscription_schedule_changed
224
- attr_reader :subscription_schedule_changed
225
- # The ID of the subscription schedule that was released.
226
- attr_reader :subscription_schedule_released
227
- # The reason the quote was marked as stale.
228
- attr_reader :type
229
- end
230
- # Time at which the quote expires. Measured in seconds since the Unix epoch.
231
- attr_reader :expires_at
232
- # The most recent reason this quote was marked as stale.
233
- attr_reader :last_reason
234
- # Time at which the stale reason was updated. Measured in seconds since the Unix epoch.
235
- attr_reader :last_updated_at
236
- # Time at which the quote was marked as stale. Measured in seconds since the Unix epoch.
237
- attr_reader :transitioned_at
238
- end
239
- # Attribute for field canceled
240
- attr_reader :canceled
241
- # Attribute for field stale
242
- attr_reader :stale
243
- end
244
-
245
160
  class StatusTransitions < Stripe::StripeObject
246
161
  # The time that the quote was accepted. Measured in seconds since Unix epoch.
247
162
  attr_reader :accepted_at
@@ -252,166 +167,16 @@ module Stripe
252
167
  end
253
168
 
254
169
  class SubscriptionData < Stripe::StripeObject
255
- class BillOnAcceptance < Stripe::StripeObject
256
- class BillFrom < Stripe::StripeObject
257
- class LineStartsAt < Stripe::StripeObject
258
- # Unique identifier for the object.
259
- attr_reader :id
260
- end
261
- # The materialized time.
262
- attr_reader :computed
263
- # The timestamp the given line starts at.
264
- attr_reader :line_starts_at
265
- # A precise Unix timestamp.
266
- attr_reader :timestamp
267
- # The type of method to specify the `bill_from` time.
268
- attr_reader :type
269
- end
270
-
271
- class BillUntil < Stripe::StripeObject
272
- class Duration < Stripe::StripeObject
273
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
274
- attr_reader :interval
275
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
276
- attr_reader :interval_count
277
- end
278
-
279
- class LineEndsAt < Stripe::StripeObject
280
- # Unique identifier for the object.
281
- attr_reader :id
282
- end
283
- # The materialized time.
284
- attr_reader :computed
285
- # Time span for the quote line starting from the `starts_at` date.
286
- attr_reader :duration
287
- # The timestamp the given line ends at.
288
- attr_reader :line_ends_at
289
- # A precise Unix timestamp.
290
- attr_reader :timestamp
291
- # The type of method to specify the `bill_until` time.
292
- attr_reader :type
293
- end
294
- # The start of the period to bill from when the Quote is accepted.
295
- attr_reader :bill_from
296
- # The end of the period to bill until when the Quote is accepted.
297
- attr_reader :bill_until
298
- end
299
-
300
- class Prebilling < Stripe::StripeObject
301
- # Attribute for field iterations
302
- attr_reader :iterations
303
- end
304
- # Describes the period to bill for upon accepting the quote.
305
- attr_reader :bill_on_acceptance
306
- # 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.
307
- attr_reader :billing_behavior
308
- # Whether the subscription will always start a new billing period when the quote is accepted.
309
- attr_reader :billing_cycle_anchor
310
- # The [billing mode](/api/subscriptions/create#create_subscription-billing_mode) that will be set on the subscription once the quote is accepted.
311
- attr_reader :billing_mode
312
170
  # The subscription's 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.
313
171
  attr_reader :description
314
172
  # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch.
315
173
  attr_reader :effective_date
316
- # Behavior of the subscription schedule and underlying subscription when it ends.
317
- attr_reader :end_behavior
318
- # The id of the subscription that will be updated when the quote is accepted.
319
- attr_reader :from_subscription
320
174
  # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
321
175
  attr_reader :metadata
322
- # If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
323
- attr_reader :prebilling
324
- # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted.
325
- attr_reader :proration_behavior
326
176
  # Integer representing the number of trial period days before the customer is charged for the first time.
327
177
  attr_reader :trial_period_days
328
178
  end
329
179
 
330
- class SubscriptionDataOverride < Stripe::StripeObject
331
- class AppliesTo < Stripe::StripeObject
332
- # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
333
- attr_reader :new_reference
334
- # The ID of the schedule the line applies to.
335
- attr_reader :subscription_schedule
336
- # Describes whether the quote line is affecting a new schedule or an existing schedule.
337
- attr_reader :type
338
- end
339
-
340
- class BillOnAcceptance < Stripe::StripeObject
341
- class BillFrom < Stripe::StripeObject
342
- class LineStartsAt < Stripe::StripeObject
343
- # Unique identifier for the object.
344
- attr_reader :id
345
- end
346
- # The materialized time.
347
- attr_reader :computed
348
- # The timestamp the given line starts at.
349
- attr_reader :line_starts_at
350
- # A precise Unix timestamp.
351
- attr_reader :timestamp
352
- # The type of method to specify the `bill_from` time.
353
- attr_reader :type
354
- end
355
-
356
- class BillUntil < Stripe::StripeObject
357
- class Duration < Stripe::StripeObject
358
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
359
- attr_reader :interval
360
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
361
- attr_reader :interval_count
362
- end
363
-
364
- class LineEndsAt < Stripe::StripeObject
365
- # Unique identifier for the object.
366
- attr_reader :id
367
- end
368
- # The materialized time.
369
- attr_reader :computed
370
- # Time span for the quote line starting from the `starts_at` date.
371
- attr_reader :duration
372
- # The timestamp the given line ends at.
373
- attr_reader :line_ends_at
374
- # A precise Unix timestamp.
375
- attr_reader :timestamp
376
- # The type of method to specify the `bill_until` time.
377
- attr_reader :type
378
- end
379
- # The start of the period to bill from when the Quote is accepted.
380
- attr_reader :bill_from
381
- # The end of the period to bill until when the Quote is accepted.
382
- attr_reader :bill_until
383
- end
384
- # Attribute for field applies_to
385
- attr_reader :applies_to
386
- # Describes the period to bill for upon accepting the quote.
387
- attr_reader :bill_on_acceptance
388
- # 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.
389
- attr_reader :billing_behavior
390
- # The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
391
- attr_reader :customer
392
- # The subscription's 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.
393
- attr_reader :description
394
- # Behavior of the subscription schedule and underlying subscription when it ends.
395
- attr_reader :end_behavior
396
- # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted.
397
- attr_reader :proration_behavior
398
- end
399
-
400
- class SubscriptionSchedule < Stripe::StripeObject
401
- class AppliesTo < Stripe::StripeObject
402
- # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
403
- attr_reader :new_reference
404
- # The ID of the schedule the line applies to.
405
- attr_reader :subscription_schedule
406
- # Describes whether the quote line is affecting a new schedule or an existing schedule.
407
- attr_reader :type
408
- end
409
- # Attribute for field applies_to
410
- attr_reader :applies_to
411
- # The subscription schedule that was created or updated from this quote.
412
- attr_reader :subscription_schedule
413
- end
414
-
415
180
  class TotalDetails < Stripe::StripeObject
416
181
  class Breakdown < Stripe::StripeObject
417
182
  class Discount < Stripe::StripeObject
@@ -463,14 +228,10 @@ module Stripe
463
228
  class ListParams < Stripe::RequestParams
464
229
  # The ID of the customer whose quotes will be retrieved.
465
230
  attr_accessor :customer
466
- # The ID of the account whose quotes will be retrieved.
467
- attr_accessor :customer_account
468
231
  # 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.
469
232
  attr_accessor :ending_before
470
233
  # Specifies which fields in the response should be expanded.
471
234
  attr_accessor :expand
472
- # The subscription which the quote updates.
473
- attr_accessor :from_subscription
474
235
  # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
475
236
  attr_accessor :limit
476
237
  # 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.
@@ -482,20 +243,16 @@ module Stripe
482
243
 
483
244
  def initialize(
484
245
  customer: nil,
485
- customer_account: nil,
486
246
  ending_before: nil,
487
247
  expand: nil,
488
- from_subscription: nil,
489
248
  limit: nil,
490
249
  starting_after: nil,
491
250
  status: nil,
492
251
  test_clock: nil
493
252
  )
494
253
  @customer = customer
495
- @customer_account = customer_account
496
254
  @ending_before = ending_before
497
255
  @expand = expand
498
- @from_subscription = from_subscription
499
256
  @limit = limit
500
257
  @starting_after = starting_after
501
258
  @status = status
@@ -528,44 +285,16 @@ module Stripe
528
285
  end
529
286
 
530
287
  class Discount < Stripe::RequestParams
531
- class DiscountEnd < Stripe::RequestParams
532
- class Duration < Stripe::RequestParams
533
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
534
- attr_accessor :interval
535
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
536
- attr_accessor :interval_count
537
-
538
- def initialize(interval: nil, interval_count: nil)
539
- @interval = interval
540
- @interval_count = interval_count
541
- end
542
- end
543
- # Time span for the redeemed discount.
544
- attr_accessor :duration
545
- # A precise Unix timestamp for the discount to end. Must be in the future.
546
- attr_accessor :timestamp
547
- # The type of calculation made to determine when the discount ends.
548
- attr_accessor :type
549
-
550
- def initialize(duration: nil, timestamp: nil, type: nil)
551
- @duration = duration
552
- @timestamp = timestamp
553
- @type = type
554
- end
555
- end
556
288
  # ID of the coupon to create a new discount for.
557
289
  attr_accessor :coupon
558
290
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
559
291
  attr_accessor :discount
560
- # Details to determine how long the discount should be applied for.
561
- attr_accessor :discount_end
562
292
  # ID of the promotion code to create a new discount for.
563
293
  attr_accessor :promotion_code
564
294
 
565
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
295
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
566
296
  @coupon = coupon
567
297
  @discount = discount
568
- @discount_end = discount_end
569
298
  @promotion_code = promotion_code
570
299
  end
571
300
  end
@@ -605,522 +334,18 @@ module Stripe
605
334
  end
606
335
  end
607
336
 
608
- class Line < Stripe::RequestParams
609
- class Action < Stripe::RequestParams
610
- class AddDiscount < Stripe::RequestParams
611
- class DiscountEnd < Stripe::RequestParams
612
- # The type of calculation made to determine when the discount ends.
613
- attr_accessor :type
614
-
615
- def initialize(type: nil)
616
- @type = type
617
- end
618
- end
619
- # The coupon code to redeem.
620
- attr_accessor :coupon
621
- # An ID of an existing discount for a coupon that was already redeemed.
622
- attr_accessor :discount
623
- # Details to determine how long the discount should be applied for.
624
- attr_accessor :discount_end
625
- # 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.
626
- attr_accessor :index
627
- # The promotion code to redeem.
628
- attr_accessor :promotion_code
629
-
630
- def initialize(
631
- coupon: nil,
632
- discount: nil,
633
- discount_end: nil,
634
- index: nil,
635
- promotion_code: nil
636
- )
637
- @coupon = coupon
638
- @discount = discount
639
- @discount_end = discount_end
640
- @index = index
641
- @promotion_code = promotion_code
642
- end
643
- end
644
-
645
- class AddItem < Stripe::RequestParams
646
- class Discount < Stripe::RequestParams
647
- class DiscountEnd < Stripe::RequestParams
648
- class Duration < Stripe::RequestParams
649
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
650
- attr_accessor :interval
651
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
652
- attr_accessor :interval_count
653
-
654
- def initialize(interval: nil, interval_count: nil)
655
- @interval = interval
656
- @interval_count = interval_count
657
- end
658
- end
659
- # Time span for the redeemed discount.
660
- attr_accessor :duration
661
- # A precise Unix timestamp for the discount to end. Must be in the future.
662
- attr_accessor :timestamp
663
- # The type of calculation made to determine when the discount ends.
664
- attr_accessor :type
665
-
666
- def initialize(duration: nil, timestamp: nil, type: nil)
667
- @duration = duration
668
- @timestamp = timestamp
669
- @type = type
670
- end
671
- end
672
- # ID of the coupon to create a new discount for.
673
- attr_accessor :coupon
674
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
675
- attr_accessor :discount
676
- # Details to determine how long the discount should be applied for.
677
- attr_accessor :discount_end
678
- # ID of the promotion code to create a new discount for.
679
- attr_accessor :promotion_code
680
-
681
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
682
- @coupon = coupon
683
- @discount = discount
684
- @discount_end = discount_end
685
- @promotion_code = promotion_code
686
- end
687
- end
688
-
689
- class Trial < Stripe::RequestParams
690
- # 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.
691
- attr_accessor :converts_to
692
- # Determines the type of trial for this item.
693
- attr_accessor :type
694
-
695
- def initialize(converts_to: nil, type: nil)
696
- @converts_to = converts_to
697
- @type = type
698
- end
699
- end
700
- # The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
701
- attr_accessor :discounts
702
- # 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`.
703
- attr_accessor :metadata
704
- # The ID of the price object.
705
- attr_accessor :price
706
- # Quantity for this item.
707
- attr_accessor :quantity
708
- # 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`.
709
- attr_accessor :tax_rates
710
- # Options that configure the trial on the subscription item.
711
- attr_accessor :trial
712
-
713
- def initialize(
714
- discounts: nil,
715
- metadata: nil,
716
- price: nil,
717
- quantity: nil,
718
- tax_rates: nil,
719
- trial: nil
720
- )
721
- @discounts = discounts
722
- @metadata = metadata
723
- @price = price
724
- @quantity = quantity
725
- @tax_rates = tax_rates
726
- @trial = trial
727
- end
728
- end
729
-
730
- class RemoveDiscount < Stripe::RequestParams
731
- # The coupon code to remove from the `discounts` array.
732
- attr_accessor :coupon
733
- # The ID of a discount to remove from the `discounts` array.
734
- attr_accessor :discount
735
- # The ID of a promotion code to remove from the `discounts` array.
736
- attr_accessor :promotion_code
737
-
738
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
739
- @coupon = coupon
740
- @discount = discount
741
- @promotion_code = promotion_code
742
- end
743
- end
744
-
745
- class RemoveItem < Stripe::RequestParams
746
- # ID of a price to remove.
747
- attr_accessor :price
748
-
749
- def initialize(price: nil)
750
- @price = price
751
- end
752
- end
753
-
754
- class SetDiscount < Stripe::RequestParams
755
- # The coupon code to replace the `discounts` array with.
756
- attr_accessor :coupon
757
- # An ID of an existing discount to replace the `discounts` array with.
758
- attr_accessor :discount
759
- # An ID of an existing promotion code to replace the `discounts` array with.
760
- attr_accessor :promotion_code
761
-
762
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
763
- @coupon = coupon
764
- @discount = discount
765
- @promotion_code = promotion_code
766
- end
767
- end
768
-
769
- class SetItem < Stripe::RequestParams
770
- class Discount < Stripe::RequestParams
771
- class DiscountEnd < Stripe::RequestParams
772
- class Duration < Stripe::RequestParams
773
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
774
- attr_accessor :interval
775
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
776
- attr_accessor :interval_count
777
-
778
- def initialize(interval: nil, interval_count: nil)
779
- @interval = interval
780
- @interval_count = interval_count
781
- end
782
- end
783
- # Time span for the redeemed discount.
784
- attr_accessor :duration
785
- # A precise Unix timestamp for the discount to end. Must be in the future.
786
- attr_accessor :timestamp
787
- # The type of calculation made to determine when the discount ends.
788
- attr_accessor :type
789
-
790
- def initialize(duration: nil, timestamp: nil, type: nil)
791
- @duration = duration
792
- @timestamp = timestamp
793
- @type = type
794
- end
795
- end
796
- # ID of the coupon to create a new discount for.
797
- attr_accessor :coupon
798
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
799
- attr_accessor :discount
800
- # Details to determine how long the discount should be applied for.
801
- attr_accessor :discount_end
802
- # ID of the promotion code to create a new discount for.
803
- attr_accessor :promotion_code
804
-
805
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
806
- @coupon = coupon
807
- @discount = discount
808
- @discount_end = discount_end
809
- @promotion_code = promotion_code
810
- end
811
- end
812
-
813
- class Trial < Stripe::RequestParams
814
- # 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.
815
- attr_accessor :converts_to
816
- # Determines the type of trial for this item.
817
- attr_accessor :type
818
-
819
- def initialize(converts_to: nil, type: nil)
820
- @converts_to = converts_to
821
- @type = type
822
- end
823
- end
824
- # 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`.
825
- attr_accessor :discounts
826
- # 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`.
827
- attr_accessor :metadata
828
- # The ID of the price object.
829
- attr_accessor :price
830
- # 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`.
831
- attr_accessor :quantity
832
- # 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`.
833
- attr_accessor :tax_rates
834
- # 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`.
835
- attr_accessor :trial
836
-
837
- def initialize(
838
- discounts: nil,
839
- metadata: nil,
840
- price: nil,
841
- quantity: nil,
842
- tax_rates: nil,
843
- trial: nil
844
- )
845
- @discounts = discounts
846
- @metadata = metadata
847
- @price = price
848
- @quantity = quantity
849
- @tax_rates = tax_rates
850
- @trial = trial
851
- end
852
- end
853
- # Details for the `add_discount` type.
854
- attr_accessor :add_discount
855
- # Details for the `add_item` type.
856
- attr_accessor :add_item
857
- # Details for the `add_metadata` type: specify a hash of key-value pairs.
858
- attr_accessor :add_metadata
859
- # Details for the `remove_discount` type.
860
- attr_accessor :remove_discount
861
- # Details for the `remove_item` type.
862
- attr_accessor :remove_item
863
- # Details for the `remove_metadata` type: specify an array of metadata keys.
864
- attr_accessor :remove_metadata
865
- # Details for the `set_discounts` type.
866
- attr_accessor :set_discounts
867
- # Details for the `set_items` type.
868
- attr_accessor :set_items
869
- # Details for the `set_metadata` type: specify an array of key-value pairs.
870
- attr_accessor :set_metadata
871
- # The type of action the quote line performs.
872
- attr_accessor :type
873
-
874
- def initialize(
875
- add_discount: nil,
876
- add_item: nil,
877
- add_metadata: nil,
878
- remove_discount: nil,
879
- remove_item: nil,
880
- remove_metadata: nil,
881
- set_discounts: nil,
882
- set_items: nil,
883
- set_metadata: nil,
884
- type: nil
885
- )
886
- @add_discount = add_discount
887
- @add_item = add_item
888
- @add_metadata = add_metadata
889
- @remove_discount = remove_discount
890
- @remove_item = remove_item
891
- @remove_metadata = remove_metadata
892
- @set_discounts = set_discounts
893
- @set_items = set_items
894
- @set_metadata = set_metadata
895
- @type = type
896
- end
897
- end
898
-
899
- class AppliesTo < Stripe::RequestParams
900
- # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
901
- attr_accessor :new_reference
902
- # The ID of the schedule the line applies to.
903
- attr_accessor :subscription_schedule
904
- # Describes whether the quote line is affecting a new schedule or an existing schedule.
905
- attr_accessor :type
906
-
907
- def initialize(new_reference: nil, subscription_schedule: nil, type: nil)
908
- @new_reference = new_reference
909
- @subscription_schedule = subscription_schedule
910
- @type = type
911
- end
912
- end
913
-
914
- class CancelSubscriptionSchedule < Stripe::RequestParams
915
- # Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
916
- attr_accessor :cancel_at
917
- # If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`.
918
- attr_accessor :invoice_now
919
- # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
920
- attr_accessor :prorate
921
-
922
- def initialize(cancel_at: nil, invoice_now: nil, prorate: nil)
923
- @cancel_at = cancel_at
924
- @invoice_now = invoice_now
925
- @prorate = prorate
926
- end
927
- end
928
-
929
- class EndsAt < Stripe::RequestParams
930
- class DiscountEnd < Stripe::RequestParams
931
- # The ID of a specific discount.
932
- attr_accessor :discount
933
-
934
- def initialize(discount: nil)
935
- @discount = discount
936
- end
937
- end
938
-
939
- class Duration < Stripe::RequestParams
940
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
941
- attr_accessor :interval
942
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
943
- attr_accessor :interval_count
944
-
945
- def initialize(interval: nil, interval_count: nil)
946
- @interval = interval
947
- @interval_count = interval_count
948
- end
949
- end
950
- # Use the `end` time of a given discount.
951
- attr_accessor :discount_end
952
- # Time span for the quote line starting from the `starts_at` date.
953
- attr_accessor :duration
954
- # A precise Unix timestamp.
955
- attr_accessor :timestamp
956
- # Select a way to pass in `ends_at`.
957
- attr_accessor :type
958
-
959
- def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
960
- @discount_end = discount_end
961
- @duration = duration
962
- @timestamp = timestamp
963
- @type = type
964
- end
965
- end
966
-
967
- class SetPauseCollection < Stripe::RequestParams
968
- class Set < Stripe::RequestParams
969
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
970
- attr_accessor :behavior
971
-
972
- def initialize(behavior: nil)
973
- @behavior = behavior
974
- end
975
- end
976
- # Details of the pause_collection behavior to apply to the amendment.
977
- attr_accessor :set
978
- # Determines the type of the pause_collection amendment.
979
- attr_accessor :type
980
-
981
- def initialize(set: nil, type: nil)
982
- @set = set
983
- @type = type
984
- end
985
- end
986
-
987
- class StartsAt < Stripe::RequestParams
988
- class DiscountEnd < Stripe::RequestParams
989
- # The ID of a specific discount.
990
- attr_accessor :discount
991
-
992
- def initialize(discount: nil)
993
- @discount = discount
994
- end
995
- end
996
-
997
- class LineEndsAt < Stripe::RequestParams
998
- # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
999
- attr_accessor :index
1000
-
1001
- def initialize(index: nil)
1002
- @index = index
1003
- end
1004
- end
1005
- # Use the `end` time of a given discount.
1006
- attr_accessor :discount_end
1007
- # The timestamp the given line ends at.
1008
- attr_accessor :line_ends_at
1009
- # A precise Unix timestamp.
1010
- attr_accessor :timestamp
1011
- # Select a way to pass in `starts_at`.
1012
- attr_accessor :type
1013
-
1014
- def initialize(discount_end: nil, line_ends_at: nil, timestamp: nil, type: nil)
1015
- @discount_end = discount_end
1016
- @line_ends_at = line_ends_at
1017
- @timestamp = timestamp
1018
- @type = type
1019
- end
1020
- end
1021
-
1022
- class TrialSettings < Stripe::RequestParams
1023
- class EndBehavior < Stripe::RequestParams
1024
- # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
1025
- attr_accessor :prorate_up_front
1026
-
1027
- def initialize(prorate_up_front: nil)
1028
- @prorate_up_front = prorate_up_front
1029
- end
1030
- end
1031
- # Defines how the subscription should behave when a trial ends.
1032
- attr_accessor :end_behavior
1033
-
1034
- def initialize(end_behavior: nil)
1035
- @end_behavior = end_behavior
1036
- end
1037
- end
1038
- # An array of operations the quote line performs.
1039
- attr_accessor :actions
1040
- # Details to identify the subscription schedule the quote line applies to.
1041
- attr_accessor :applies_to
1042
- # For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line.
1043
- attr_accessor :billing_cycle_anchor
1044
- # A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings.
1045
- attr_accessor :cancel_subscription_schedule
1046
- # Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line.
1047
- attr_accessor :ends_at
1048
- # Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts.
1049
- attr_accessor :proration_behavior
1050
- # Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
1051
- attr_accessor :set_pause_collection
1052
- # Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
1053
- attr_accessor :set_schedule_end
1054
- # Details to identify the earliest timestamp where the proposed change should take effect.
1055
- attr_accessor :starts_at
1056
- # Settings related to subscription trials.
1057
- attr_accessor :trial_settings
1058
-
1059
- def initialize(
1060
- actions: nil,
1061
- applies_to: nil,
1062
- billing_cycle_anchor: nil,
1063
- cancel_subscription_schedule: nil,
1064
- ends_at: nil,
1065
- proration_behavior: nil,
1066
- set_pause_collection: nil,
1067
- set_schedule_end: nil,
1068
- starts_at: nil,
1069
- trial_settings: nil
1070
- )
1071
- @actions = actions
1072
- @applies_to = applies_to
1073
- @billing_cycle_anchor = billing_cycle_anchor
1074
- @cancel_subscription_schedule = cancel_subscription_schedule
1075
- @ends_at = ends_at
1076
- @proration_behavior = proration_behavior
1077
- @set_pause_collection = set_pause_collection
1078
- @set_schedule_end = set_schedule_end
1079
- @starts_at = starts_at
1080
- @trial_settings = trial_settings
1081
- end
1082
- end
1083
-
1084
337
  class LineItem < Stripe::RequestParams
1085
338
  class Discount < Stripe::RequestParams
1086
- class DiscountEnd < Stripe::RequestParams
1087
- class Duration < Stripe::RequestParams
1088
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1089
- attr_accessor :interval
1090
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1091
- attr_accessor :interval_count
1092
-
1093
- def initialize(interval: nil, interval_count: nil)
1094
- @interval = interval
1095
- @interval_count = interval_count
1096
- end
1097
- end
1098
- # Time span for the redeemed discount.
1099
- attr_accessor :duration
1100
- # A precise Unix timestamp for the discount to end. Must be in the future.
1101
- attr_accessor :timestamp
1102
- # The type of calculation made to determine when the discount ends.
1103
- attr_accessor :type
1104
-
1105
- def initialize(duration: nil, timestamp: nil, type: nil)
1106
- @duration = duration
1107
- @timestamp = timestamp
1108
- @type = type
1109
- end
1110
- end
1111
339
  # ID of the coupon to create a new discount for.
1112
340
  attr_accessor :coupon
1113
341
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
1114
342
  attr_accessor :discount
1115
- # Details to determine how long the discount should be applied for.
1116
- attr_accessor :discount_end
1117
343
  # ID of the promotion code to create a new discount for.
1118
344
  attr_accessor :promotion_code
1119
345
 
1120
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
346
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
1121
347
  @coupon = coupon
1122
348
  @discount = discount
1123
- @discount_end = discount_end
1124
349
  @promotion_code = promotion_code
1125
350
  end
1126
351
  end
@@ -1187,285 +412,23 @@ module Stripe
1187
412
  end
1188
413
 
1189
414
  class SubscriptionData < Stripe::RequestParams
1190
- class BillOnAcceptance < Stripe::RequestParams
1191
- class BillFrom < Stripe::RequestParams
1192
- class LineStartsAt < Stripe::RequestParams
1193
- # The ID of a quote line.
1194
- attr_accessor :id
1195
- # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
1196
- attr_accessor :index
1197
-
1198
- def initialize(id: nil, index: nil)
1199
- @id = id
1200
- @index = index
1201
- end
1202
- end
1203
- # Details of a Quote line to start the bill period from.
1204
- attr_accessor :line_starts_at
1205
- # A precise Unix timestamp.
1206
- attr_accessor :timestamp
1207
- # The type of method to specify the `bill_from` time.
1208
- attr_accessor :type
1209
-
1210
- def initialize(line_starts_at: nil, timestamp: nil, type: nil)
1211
- @line_starts_at = line_starts_at
1212
- @timestamp = timestamp
1213
- @type = type
1214
- end
1215
- end
1216
-
1217
- class BillUntil < Stripe::RequestParams
1218
- class Duration < Stripe::RequestParams
1219
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1220
- attr_accessor :interval
1221
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1222
- attr_accessor :interval_count
1223
-
1224
- def initialize(interval: nil, interval_count: nil)
1225
- @interval = interval
1226
- @interval_count = interval_count
1227
- end
1228
- end
1229
-
1230
- class LineEndsAt < Stripe::RequestParams
1231
- # The ID of a quote line.
1232
- attr_accessor :id
1233
- # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
1234
- attr_accessor :index
1235
-
1236
- def initialize(id: nil, index: nil)
1237
- @id = id
1238
- @index = index
1239
- end
1240
- end
1241
- # Details of the duration over which to bill.
1242
- attr_accessor :duration
1243
- # Details of a Quote line item from which to bill until.
1244
- attr_accessor :line_ends_at
1245
- # A precise Unix timestamp.
1246
- attr_accessor :timestamp
1247
- # The type of method to specify the `bill_until` time.
1248
- attr_accessor :type
1249
-
1250
- def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
1251
- @duration = duration
1252
- @line_ends_at = line_ends_at
1253
- @timestamp = timestamp
1254
- @type = type
1255
- end
1256
- end
1257
- # The start of the period to bill from when the Quote is accepted.
1258
- attr_accessor :bill_from
1259
- # The end of the period to bill until when the Quote is accepted.
1260
- attr_accessor :bill_until
1261
-
1262
- def initialize(bill_from: nil, bill_until: nil)
1263
- @bill_from = bill_from
1264
- @bill_until = bill_until
1265
- end
1266
- end
1267
-
1268
- class Prebilling < Stripe::RequestParams
1269
- # This is used to determine the number of billing cycles to prebill.
1270
- attr_accessor :iterations
1271
-
1272
- def initialize(iterations: nil)
1273
- @iterations = iterations
1274
- end
1275
- end
1276
- # Describes the period to bill for upon accepting the quote.
1277
- attr_accessor :bill_on_acceptance
1278
- # 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.
1279
- attr_accessor :billing_behavior
1280
- # When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
1281
- attr_accessor :billing_cycle_anchor
1282
- # Configure billing_mode to opt in improved credit proration behavior.Once a quote that creates a subscription or subscription schedule is accepted,all future operations on the subscription or subscription schedule will be processed based on this billing_mode.
1283
- attr_accessor :billing_mode
1284
415
  # The subscription's 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.
1285
416
  attr_accessor :description
1286
417
  # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted.
1287
418
  attr_accessor :effective_date
1288
- # Behavior of the subscription schedule and underlying subscription when it ends.
1289
- attr_accessor :end_behavior
1290
- # The id of a subscription that the quote will update. By default, the quote will contain the state of the subscription (such as line items, collection method and billing thresholds) unless overridden.
1291
- attr_accessor :from_subscription
1292
419
  # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
1293
420
  attr_accessor :metadata
1294
- # If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
1295
- attr_accessor :prebilling
1296
- # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
1297
- #
1298
- # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
1299
- #
1300
- # Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
1301
- #
1302
- # Prorations can be disabled by passing `none`.
1303
- attr_accessor :proration_behavior
1304
421
  # Integer representing the number of trial period days before the customer is charged for the first time.
1305
422
  attr_accessor :trial_period_days
1306
423
 
1307
- def initialize(
1308
- bill_on_acceptance: nil,
1309
- billing_behavior: nil,
1310
- billing_cycle_anchor: nil,
1311
- billing_mode: nil,
1312
- description: nil,
1313
- effective_date: nil,
1314
- end_behavior: nil,
1315
- from_subscription: nil,
1316
- metadata: nil,
1317
- prebilling: nil,
1318
- proration_behavior: nil,
1319
- trial_period_days: nil
1320
- )
1321
- @bill_on_acceptance = bill_on_acceptance
1322
- @billing_behavior = billing_behavior
1323
- @billing_cycle_anchor = billing_cycle_anchor
1324
- @billing_mode = billing_mode
424
+ def initialize(description: nil, effective_date: nil, metadata: nil, trial_period_days: nil)
1325
425
  @description = description
1326
426
  @effective_date = effective_date
1327
- @end_behavior = end_behavior
1328
- @from_subscription = from_subscription
1329
427
  @metadata = metadata
1330
- @prebilling = prebilling
1331
- @proration_behavior = proration_behavior
1332
428
  @trial_period_days = trial_period_days
1333
429
  end
1334
430
  end
1335
431
 
1336
- class SubscriptionDataOverride < Stripe::RequestParams
1337
- class AppliesTo < Stripe::RequestParams
1338
- # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
1339
- attr_accessor :new_reference
1340
- # The ID of the schedule the line applies to.
1341
- attr_accessor :subscription_schedule
1342
- # Describes whether the quote line is affecting a new schedule or an existing schedule.
1343
- attr_accessor :type
1344
-
1345
- def initialize(new_reference: nil, subscription_schedule: nil, type: nil)
1346
- @new_reference = new_reference
1347
- @subscription_schedule = subscription_schedule
1348
- @type = type
1349
- end
1350
- end
1351
-
1352
- class BillOnAcceptance < Stripe::RequestParams
1353
- class BillFrom < Stripe::RequestParams
1354
- class LineStartsAt < Stripe::RequestParams
1355
- # The ID of a quote line.
1356
- attr_accessor :id
1357
- # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
1358
- attr_accessor :index
1359
-
1360
- def initialize(id: nil, index: nil)
1361
- @id = id
1362
- @index = index
1363
- end
1364
- end
1365
- # Details of a Quote line to start the bill period from.
1366
- attr_accessor :line_starts_at
1367
- # A precise Unix timestamp.
1368
- attr_accessor :timestamp
1369
- # The type of method to specify the `bill_from` time.
1370
- attr_accessor :type
1371
-
1372
- def initialize(line_starts_at: nil, timestamp: nil, type: nil)
1373
- @line_starts_at = line_starts_at
1374
- @timestamp = timestamp
1375
- @type = type
1376
- end
1377
- end
1378
-
1379
- class BillUntil < Stripe::RequestParams
1380
- class Duration < Stripe::RequestParams
1381
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1382
- attr_accessor :interval
1383
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1384
- attr_accessor :interval_count
1385
-
1386
- def initialize(interval: nil, interval_count: nil)
1387
- @interval = interval
1388
- @interval_count = interval_count
1389
- end
1390
- end
1391
-
1392
- class LineEndsAt < Stripe::RequestParams
1393
- # The ID of a quote line.
1394
- attr_accessor :id
1395
- # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
1396
- attr_accessor :index
1397
-
1398
- def initialize(id: nil, index: nil)
1399
- @id = id
1400
- @index = index
1401
- end
1402
- end
1403
- # Details of the duration over which to bill.
1404
- attr_accessor :duration
1405
- # Details of a Quote line item from which to bill until.
1406
- attr_accessor :line_ends_at
1407
- # A precise Unix timestamp.
1408
- attr_accessor :timestamp
1409
- # The type of method to specify the `bill_until` time.
1410
- attr_accessor :type
1411
-
1412
- def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
1413
- @duration = duration
1414
- @line_ends_at = line_ends_at
1415
- @timestamp = timestamp
1416
- @type = type
1417
- end
1418
- end
1419
- # The start of the period to bill from when the Quote is accepted.
1420
- attr_accessor :bill_from
1421
- # The end of the period to bill until when the Quote is accepted.
1422
- attr_accessor :bill_until
1423
-
1424
- def initialize(bill_from: nil, bill_until: nil)
1425
- @bill_from = bill_from
1426
- @bill_until = bill_until
1427
- end
1428
- end
1429
- # Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
1430
- attr_accessor :applies_to
1431
- # Describes the period to bill for upon accepting the quote.
1432
- attr_accessor :bill_on_acceptance
1433
- # 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.
1434
- attr_accessor :billing_behavior
1435
- # The customer the Subscription Data override applies to. This is only relevant when `applies_to.type=new_reference`.
1436
- attr_accessor :customer
1437
- # The subscription's 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.
1438
- attr_accessor :description
1439
- # Behavior of the subscription schedule and underlying subscription when it ends.
1440
- attr_accessor :end_behavior
1441
- # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
1442
- #
1443
- # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
1444
- #
1445
- # Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
1446
- #
1447
- # Prorations can be disabled by passing `none`.
1448
- attr_accessor :proration_behavior
1449
-
1450
- def initialize(
1451
- applies_to: nil,
1452
- bill_on_acceptance: nil,
1453
- billing_behavior: nil,
1454
- customer: nil,
1455
- description: nil,
1456
- end_behavior: nil,
1457
- proration_behavior: nil
1458
- )
1459
- @applies_to = applies_to
1460
- @bill_on_acceptance = bill_on_acceptance
1461
- @billing_behavior = billing_behavior
1462
- @customer = customer
1463
- @description = description
1464
- @end_behavior = end_behavior
1465
- @proration_behavior = proration_behavior
1466
- end
1467
- end
1468
-
1469
432
  class TransferData < Stripe::RequestParams
1470
433
  # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
1471
434
  attr_accessor :amount
@@ -1480,8 +443,6 @@ module Stripe
1480
443
  @destination = destination
1481
444
  end
1482
445
  end
1483
- # Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
1484
- attr_accessor :allow_backdated_lines
1485
446
  # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field.
1486
447
  attr_accessor :application_fee_amount
1487
448
  # 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. There must be at least 1 line item with a recurring price to use this field.
@@ -1492,8 +453,6 @@ module Stripe
1492
453
  attr_accessor :collection_method
1493
454
  # The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
1494
455
  attr_accessor :customer
1495
- # The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed.
1496
- attr_accessor :customer_account
1497
456
  # The tax rates that will apply to any line item that does not have `tax_rates` set.
1498
457
  attr_accessor :default_tax_rates
1499
458
  # A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
@@ -1514,29 +473,23 @@ module Stripe
1514
473
  attr_accessor :invoice_settings
1515
474
  # A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
1516
475
  attr_accessor :line_items
1517
- # A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
1518
- attr_accessor :lines
1519
476
  # 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`.
1520
477
  attr_accessor :metadata
1521
478
  # The account on behalf of which to charge.
1522
479
  attr_accessor :on_behalf_of
1523
480
  # When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
1524
481
  attr_accessor :subscription_data
1525
- # List representing overrides for `subscription_data` configurations for specific subscription schedules.
1526
- attr_accessor :subscription_data_overrides
1527
482
  # ID of the test clock to attach to the quote.
1528
483
  attr_accessor :test_clock
1529
484
  # The data with which to automatically create a Transfer for each of the invoices.
1530
485
  attr_accessor :transfer_data
1531
486
 
1532
487
  def initialize(
1533
- allow_backdated_lines: nil,
1534
488
  application_fee_amount: nil,
1535
489
  application_fee_percent: nil,
1536
490
  automatic_tax: nil,
1537
491
  collection_method: nil,
1538
492
  customer: nil,
1539
- customer_account: nil,
1540
493
  default_tax_rates: nil,
1541
494
  description: nil,
1542
495
  discounts: nil,
@@ -1547,21 +500,17 @@ module Stripe
1547
500
  header: nil,
1548
501
  invoice_settings: nil,
1549
502
  line_items: nil,
1550
- lines: nil,
1551
503
  metadata: nil,
1552
504
  on_behalf_of: nil,
1553
505
  subscription_data: nil,
1554
- subscription_data_overrides: nil,
1555
506
  test_clock: nil,
1556
507
  transfer_data: nil
1557
508
  )
1558
- @allow_backdated_lines = allow_backdated_lines
1559
509
  @application_fee_amount = application_fee_amount
1560
510
  @application_fee_percent = application_fee_percent
1561
511
  @automatic_tax = automatic_tax
1562
512
  @collection_method = collection_method
1563
513
  @customer = customer
1564
- @customer_account = customer_account
1565
514
  @default_tax_rates = default_tax_rates
1566
515
  @description = description
1567
516
  @discounts = discounts
@@ -1572,11 +521,9 @@ module Stripe
1572
521
  @header = header
1573
522
  @invoice_settings = invoice_settings
1574
523
  @line_items = line_items
1575
- @lines = lines
1576
524
  @metadata = metadata
1577
525
  @on_behalf_of = on_behalf_of
1578
526
  @subscription_data = subscription_data
1579
- @subscription_data_overrides = subscription_data_overrides
1580
527
  @test_clock = test_clock
1581
528
  @transfer_data = transfer_data
1582
529
  end
@@ -1607,44 +554,16 @@ module Stripe
1607
554
  end
1608
555
 
1609
556
  class Discount < Stripe::RequestParams
1610
- class DiscountEnd < Stripe::RequestParams
1611
- class Duration < Stripe::RequestParams
1612
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1613
- attr_accessor :interval
1614
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1615
- attr_accessor :interval_count
1616
-
1617
- def initialize(interval: nil, interval_count: nil)
1618
- @interval = interval
1619
- @interval_count = interval_count
1620
- end
1621
- end
1622
- # Time span for the redeemed discount.
1623
- attr_accessor :duration
1624
- # A precise Unix timestamp for the discount to end. Must be in the future.
1625
- attr_accessor :timestamp
1626
- # The type of calculation made to determine when the discount ends.
1627
- attr_accessor :type
1628
-
1629
- def initialize(duration: nil, timestamp: nil, type: nil)
1630
- @duration = duration
1631
- @timestamp = timestamp
1632
- @type = type
1633
- end
1634
- end
1635
557
  # ID of the coupon to create a new discount for.
1636
558
  attr_accessor :coupon
1637
559
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
1638
560
  attr_accessor :discount
1639
- # Details to determine how long the discount should be applied for.
1640
- attr_accessor :discount_end
1641
561
  # ID of the promotion code to create a new discount for.
1642
562
  attr_accessor :promotion_code
1643
563
 
1644
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
564
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
1645
565
  @coupon = coupon
1646
566
  @discount = discount
1647
- @discount_end = discount_end
1648
567
  @promotion_code = promotion_code
1649
568
  end
1650
569
  end
@@ -1672,529 +591,18 @@ module Stripe
1672
591
  end
1673
592
  end
1674
593
 
1675
- class Line < Stripe::RequestParams
1676
- class Action < Stripe::RequestParams
1677
- class AddDiscount < Stripe::RequestParams
1678
- class DiscountEnd < Stripe::RequestParams
1679
- # The type of calculation made to determine when the discount ends.
1680
- attr_accessor :type
1681
-
1682
- def initialize(type: nil)
1683
- @type = type
1684
- end
1685
- end
1686
- # The coupon code to redeem.
1687
- attr_accessor :coupon
1688
- # An ID of an existing discount for a coupon that was already redeemed.
1689
- attr_accessor :discount
1690
- # Details to determine how long the discount should be applied for.
1691
- attr_accessor :discount_end
1692
- # 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.
1693
- attr_accessor :index
1694
- # The promotion code to redeem.
1695
- attr_accessor :promotion_code
1696
-
1697
- def initialize(
1698
- coupon: nil,
1699
- discount: nil,
1700
- discount_end: nil,
1701
- index: nil,
1702
- promotion_code: nil
1703
- )
1704
- @coupon = coupon
1705
- @discount = discount
1706
- @discount_end = discount_end
1707
- @index = index
1708
- @promotion_code = promotion_code
1709
- end
1710
- end
1711
-
1712
- class AddItem < Stripe::RequestParams
1713
- class Discount < Stripe::RequestParams
1714
- class DiscountEnd < Stripe::RequestParams
1715
- class Duration < Stripe::RequestParams
1716
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1717
- attr_accessor :interval
1718
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1719
- attr_accessor :interval_count
1720
-
1721
- def initialize(interval: nil, interval_count: nil)
1722
- @interval = interval
1723
- @interval_count = interval_count
1724
- end
1725
- end
1726
- # Time span for the redeemed discount.
1727
- attr_accessor :duration
1728
- # A precise Unix timestamp for the discount to end. Must be in the future.
1729
- attr_accessor :timestamp
1730
- # The type of calculation made to determine when the discount ends.
1731
- attr_accessor :type
1732
-
1733
- def initialize(duration: nil, timestamp: nil, type: nil)
1734
- @duration = duration
1735
- @timestamp = timestamp
1736
- @type = type
1737
- end
1738
- end
1739
- # ID of the coupon to create a new discount for.
1740
- attr_accessor :coupon
1741
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1742
- attr_accessor :discount
1743
- # Details to determine how long the discount should be applied for.
1744
- attr_accessor :discount_end
1745
- # ID of the promotion code to create a new discount for.
1746
- attr_accessor :promotion_code
1747
-
1748
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1749
- @coupon = coupon
1750
- @discount = discount
1751
- @discount_end = discount_end
1752
- @promotion_code = promotion_code
1753
- end
1754
- end
1755
-
1756
- class Trial < Stripe::RequestParams
1757
- # 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.
1758
- attr_accessor :converts_to
1759
- # Determines the type of trial for this item.
1760
- attr_accessor :type
1761
-
1762
- def initialize(converts_to: nil, type: nil)
1763
- @converts_to = converts_to
1764
- @type = type
1765
- end
1766
- end
1767
- # The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
1768
- attr_accessor :discounts
1769
- # 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`.
1770
- attr_accessor :metadata
1771
- # The ID of the price object.
1772
- attr_accessor :price
1773
- # Quantity for this item.
1774
- attr_accessor :quantity
1775
- # 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`.
1776
- attr_accessor :tax_rates
1777
- # Options that configure the trial on the subscription item.
1778
- attr_accessor :trial
1779
-
1780
- def initialize(
1781
- discounts: nil,
1782
- metadata: nil,
1783
- price: nil,
1784
- quantity: nil,
1785
- tax_rates: nil,
1786
- trial: nil
1787
- )
1788
- @discounts = discounts
1789
- @metadata = metadata
1790
- @price = price
1791
- @quantity = quantity
1792
- @tax_rates = tax_rates
1793
- @trial = trial
1794
- end
1795
- end
1796
-
1797
- class RemoveDiscount < Stripe::RequestParams
1798
- # The coupon code to remove from the `discounts` array.
1799
- attr_accessor :coupon
1800
- # The ID of a discount to remove from the `discounts` array.
1801
- attr_accessor :discount
1802
- # The ID of a promotion code to remove from the `discounts` array.
1803
- attr_accessor :promotion_code
1804
-
1805
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
1806
- @coupon = coupon
1807
- @discount = discount
1808
- @promotion_code = promotion_code
1809
- end
1810
- end
1811
-
1812
- class RemoveItem < Stripe::RequestParams
1813
- # ID of a price to remove.
1814
- attr_accessor :price
1815
-
1816
- def initialize(price: nil)
1817
- @price = price
1818
- end
1819
- end
1820
-
1821
- class SetDiscount < Stripe::RequestParams
1822
- # The coupon code to replace the `discounts` array with.
1823
- attr_accessor :coupon
1824
- # An ID of an existing discount to replace the `discounts` array with.
1825
- attr_accessor :discount
1826
- # An ID of an existing promotion code to replace the `discounts` array with.
1827
- attr_accessor :promotion_code
1828
-
1829
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
1830
- @coupon = coupon
1831
- @discount = discount
1832
- @promotion_code = promotion_code
1833
- end
1834
- end
1835
-
1836
- class SetItem < Stripe::RequestParams
1837
- class Discount < Stripe::RequestParams
1838
- class DiscountEnd < Stripe::RequestParams
1839
- class Duration < Stripe::RequestParams
1840
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1841
- attr_accessor :interval
1842
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1843
- attr_accessor :interval_count
1844
-
1845
- def initialize(interval: nil, interval_count: nil)
1846
- @interval = interval
1847
- @interval_count = interval_count
1848
- end
1849
- end
1850
- # Time span for the redeemed discount.
1851
- attr_accessor :duration
1852
- # A precise Unix timestamp for the discount to end. Must be in the future.
1853
- attr_accessor :timestamp
1854
- # The type of calculation made to determine when the discount ends.
1855
- attr_accessor :type
1856
-
1857
- def initialize(duration: nil, timestamp: nil, type: nil)
1858
- @duration = duration
1859
- @timestamp = timestamp
1860
- @type = type
1861
- end
1862
- end
1863
- # ID of the coupon to create a new discount for.
1864
- attr_accessor :coupon
1865
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1866
- attr_accessor :discount
1867
- # Details to determine how long the discount should be applied for.
1868
- attr_accessor :discount_end
1869
- # ID of the promotion code to create a new discount for.
1870
- attr_accessor :promotion_code
1871
-
1872
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1873
- @coupon = coupon
1874
- @discount = discount
1875
- @discount_end = discount_end
1876
- @promotion_code = promotion_code
1877
- end
1878
- end
1879
-
1880
- class Trial < Stripe::RequestParams
1881
- # 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.
1882
- attr_accessor :converts_to
1883
- # Determines the type of trial for this item.
1884
- attr_accessor :type
1885
-
1886
- def initialize(converts_to: nil, type: nil)
1887
- @converts_to = converts_to
1888
- @type = type
1889
- end
1890
- end
1891
- # 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`.
1892
- attr_accessor :discounts
1893
- # 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`.
1894
- attr_accessor :metadata
1895
- # The ID of the price object.
1896
- attr_accessor :price
1897
- # 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`.
1898
- attr_accessor :quantity
1899
- # 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`.
1900
- attr_accessor :tax_rates
1901
- # 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`.
1902
- attr_accessor :trial
1903
-
1904
- def initialize(
1905
- discounts: nil,
1906
- metadata: nil,
1907
- price: nil,
1908
- quantity: nil,
1909
- tax_rates: nil,
1910
- trial: nil
1911
- )
1912
- @discounts = discounts
1913
- @metadata = metadata
1914
- @price = price
1915
- @quantity = quantity
1916
- @tax_rates = tax_rates
1917
- @trial = trial
1918
- end
1919
- end
1920
- # Details for the `add_discount` type.
1921
- attr_accessor :add_discount
1922
- # Details for the `add_item` type.
1923
- attr_accessor :add_item
1924
- # Details for the `add_metadata` type: specify a hash of key-value pairs.
1925
- attr_accessor :add_metadata
1926
- # Details for the `remove_discount` type.
1927
- attr_accessor :remove_discount
1928
- # Details for the `remove_item` type.
1929
- attr_accessor :remove_item
1930
- # Details for the `remove_metadata` type: specify an array of metadata keys.
1931
- attr_accessor :remove_metadata
1932
- # Details for the `set_discounts` type.
1933
- attr_accessor :set_discounts
1934
- # Details for the `set_items` type.
1935
- attr_accessor :set_items
1936
- # Details for the `set_metadata` type: specify an array of key-value pairs.
1937
- attr_accessor :set_metadata
1938
- # The type of action the quote line performs.
1939
- attr_accessor :type
1940
-
1941
- def initialize(
1942
- add_discount: nil,
1943
- add_item: nil,
1944
- add_metadata: nil,
1945
- remove_discount: nil,
1946
- remove_item: nil,
1947
- remove_metadata: nil,
1948
- set_discounts: nil,
1949
- set_items: nil,
1950
- set_metadata: nil,
1951
- type: nil
1952
- )
1953
- @add_discount = add_discount
1954
- @add_item = add_item
1955
- @add_metadata = add_metadata
1956
- @remove_discount = remove_discount
1957
- @remove_item = remove_item
1958
- @remove_metadata = remove_metadata
1959
- @set_discounts = set_discounts
1960
- @set_items = set_items
1961
- @set_metadata = set_metadata
1962
- @type = type
1963
- end
1964
- end
1965
-
1966
- class AppliesTo < Stripe::RequestParams
1967
- # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
1968
- attr_accessor :new_reference
1969
- # The ID of the schedule the line applies to.
1970
- attr_accessor :subscription_schedule
1971
- # Describes whether the quote line is affecting a new schedule or an existing schedule.
1972
- attr_accessor :type
1973
-
1974
- def initialize(new_reference: nil, subscription_schedule: nil, type: nil)
1975
- @new_reference = new_reference
1976
- @subscription_schedule = subscription_schedule
1977
- @type = type
1978
- end
1979
- end
1980
-
1981
- class CancelSubscriptionSchedule < Stripe::RequestParams
1982
- # Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
1983
- attr_accessor :cancel_at
1984
- # If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`.
1985
- attr_accessor :invoice_now
1986
- # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
1987
- attr_accessor :prorate
1988
-
1989
- def initialize(cancel_at: nil, invoice_now: nil, prorate: nil)
1990
- @cancel_at = cancel_at
1991
- @invoice_now = invoice_now
1992
- @prorate = prorate
1993
- end
1994
- end
1995
-
1996
- class EndsAt < Stripe::RequestParams
1997
- class DiscountEnd < Stripe::RequestParams
1998
- # The ID of a specific discount.
1999
- attr_accessor :discount
2000
-
2001
- def initialize(discount: nil)
2002
- @discount = discount
2003
- end
2004
- end
2005
-
2006
- class Duration < Stripe::RequestParams
2007
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2008
- attr_accessor :interval
2009
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2010
- attr_accessor :interval_count
2011
-
2012
- def initialize(interval: nil, interval_count: nil)
2013
- @interval = interval
2014
- @interval_count = interval_count
2015
- end
2016
- end
2017
- # Use the `end` time of a given discount.
2018
- attr_accessor :discount_end
2019
- # Time span for the quote line starting from the `starts_at` date.
2020
- attr_accessor :duration
2021
- # A precise Unix timestamp.
2022
- attr_accessor :timestamp
2023
- # Select a way to pass in `ends_at`.
2024
- attr_accessor :type
2025
-
2026
- def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
2027
- @discount_end = discount_end
2028
- @duration = duration
2029
- @timestamp = timestamp
2030
- @type = type
2031
- end
2032
- end
2033
-
2034
- class SetPauseCollection < Stripe::RequestParams
2035
- class Set < Stripe::RequestParams
2036
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
2037
- attr_accessor :behavior
2038
-
2039
- def initialize(behavior: nil)
2040
- @behavior = behavior
2041
- end
2042
- end
2043
- # Details of the pause_collection behavior to apply to the amendment.
2044
- attr_accessor :set
2045
- # Determines the type of the pause_collection amendment.
2046
- attr_accessor :type
2047
-
2048
- def initialize(set: nil, type: nil)
2049
- @set = set
2050
- @type = type
2051
- end
2052
- end
2053
-
2054
- class StartsAt < Stripe::RequestParams
2055
- class DiscountEnd < Stripe::RequestParams
2056
- # The ID of a specific discount.
2057
- attr_accessor :discount
2058
-
2059
- def initialize(discount: nil)
2060
- @discount = discount
2061
- end
2062
- end
2063
-
2064
- class LineEndsAt < Stripe::RequestParams
2065
- # The ID of a quote line.
2066
- attr_accessor :id
2067
- # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
2068
- attr_accessor :index
2069
-
2070
- def initialize(id: nil, index: nil)
2071
- @id = id
2072
- @index = index
2073
- end
2074
- end
2075
- # Use the `end` time of a given discount.
2076
- attr_accessor :discount_end
2077
- # The timestamp the given line ends at.
2078
- attr_accessor :line_ends_at
2079
- # A precise Unix timestamp.
2080
- attr_accessor :timestamp
2081
- # Select a way to pass in `starts_at`.
2082
- attr_accessor :type
2083
-
2084
- def initialize(discount_end: nil, line_ends_at: nil, timestamp: nil, type: nil)
2085
- @discount_end = discount_end
2086
- @line_ends_at = line_ends_at
2087
- @timestamp = timestamp
2088
- @type = type
2089
- end
2090
- end
2091
-
2092
- class TrialSettings < Stripe::RequestParams
2093
- class EndBehavior < Stripe::RequestParams
2094
- # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
2095
- attr_accessor :prorate_up_front
2096
-
2097
- def initialize(prorate_up_front: nil)
2098
- @prorate_up_front = prorate_up_front
2099
- end
2100
- end
2101
- # Defines how the subscription should behave when a trial ends.
2102
- attr_accessor :end_behavior
2103
-
2104
- def initialize(end_behavior: nil)
2105
- @end_behavior = end_behavior
2106
- end
2107
- end
2108
- # An array of operations the quote line performs.
2109
- attr_accessor :actions
2110
- # Details to identify the subscription schedule the quote line applies to.
2111
- attr_accessor :applies_to
2112
- # For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line.
2113
- attr_accessor :billing_cycle_anchor
2114
- # A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings.
2115
- attr_accessor :cancel_subscription_schedule
2116
- # Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line.
2117
- attr_accessor :ends_at
2118
- # The ID of an existing line on the quote.
2119
- attr_accessor :id
2120
- # Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts.
2121
- attr_accessor :proration_behavior
2122
- # Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
2123
- attr_accessor :set_pause_collection
2124
- # Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
2125
- attr_accessor :set_schedule_end
2126
- # Details to identify the earliest timestamp where the proposed change should take effect.
2127
- attr_accessor :starts_at
2128
- # Settings related to subscription trials.
2129
- attr_accessor :trial_settings
2130
-
2131
- def initialize(
2132
- actions: nil,
2133
- applies_to: nil,
2134
- billing_cycle_anchor: nil,
2135
- cancel_subscription_schedule: nil,
2136
- ends_at: nil,
2137
- id: nil,
2138
- proration_behavior: nil,
2139
- set_pause_collection: nil,
2140
- set_schedule_end: nil,
2141
- starts_at: nil,
2142
- trial_settings: nil
2143
- )
2144
- @actions = actions
2145
- @applies_to = applies_to
2146
- @billing_cycle_anchor = billing_cycle_anchor
2147
- @cancel_subscription_schedule = cancel_subscription_schedule
2148
- @ends_at = ends_at
2149
- @id = id
2150
- @proration_behavior = proration_behavior
2151
- @set_pause_collection = set_pause_collection
2152
- @set_schedule_end = set_schedule_end
2153
- @starts_at = starts_at
2154
- @trial_settings = trial_settings
2155
- end
2156
- end
2157
-
2158
594
  class LineItem < Stripe::RequestParams
2159
595
  class Discount < Stripe::RequestParams
2160
- class DiscountEnd < Stripe::RequestParams
2161
- class Duration < Stripe::RequestParams
2162
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2163
- attr_accessor :interval
2164
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2165
- attr_accessor :interval_count
2166
-
2167
- def initialize(interval: nil, interval_count: nil)
2168
- @interval = interval
2169
- @interval_count = interval_count
2170
- end
2171
- end
2172
- # Time span for the redeemed discount.
2173
- attr_accessor :duration
2174
- # A precise Unix timestamp for the discount to end. Must be in the future.
2175
- attr_accessor :timestamp
2176
- # The type of calculation made to determine when the discount ends.
2177
- attr_accessor :type
2178
-
2179
- def initialize(duration: nil, timestamp: nil, type: nil)
2180
- @duration = duration
2181
- @timestamp = timestamp
2182
- @type = type
2183
- end
2184
- end
2185
596
  # ID of the coupon to create a new discount for.
2186
597
  attr_accessor :coupon
2187
598
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
2188
599
  attr_accessor :discount
2189
- # Details to determine how long the discount should be applied for.
2190
- attr_accessor :discount_end
2191
600
  # ID of the promotion code to create a new discount for.
2192
601
  attr_accessor :promotion_code
2193
602
 
2194
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
603
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
2195
604
  @coupon = coupon
2196
605
  @discount = discount
2197
- @discount_end = discount_end
2198
606
  @promotion_code = promotion_code
2199
607
  end
2200
608
  end
@@ -2271,277 +679,23 @@ module Stripe
2271
679
  end
2272
680
 
2273
681
  class SubscriptionData < Stripe::RequestParams
2274
- class BillOnAcceptance < Stripe::RequestParams
2275
- class BillFrom < Stripe::RequestParams
2276
- class LineStartsAt < Stripe::RequestParams
2277
- # The ID of a quote line.
2278
- attr_accessor :id
2279
- # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
2280
- attr_accessor :index
2281
-
2282
- def initialize(id: nil, index: nil)
2283
- @id = id
2284
- @index = index
2285
- end
2286
- end
2287
- # Details of a Quote line to start the bill period from.
2288
- attr_accessor :line_starts_at
2289
- # A precise Unix timestamp.
2290
- attr_accessor :timestamp
2291
- # The type of method to specify the `bill_from` time.
2292
- attr_accessor :type
2293
-
2294
- def initialize(line_starts_at: nil, timestamp: nil, type: nil)
2295
- @line_starts_at = line_starts_at
2296
- @timestamp = timestamp
2297
- @type = type
2298
- end
2299
- end
2300
-
2301
- class BillUntil < Stripe::RequestParams
2302
- class Duration < Stripe::RequestParams
2303
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2304
- attr_accessor :interval
2305
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2306
- attr_accessor :interval_count
2307
-
2308
- def initialize(interval: nil, interval_count: nil)
2309
- @interval = interval
2310
- @interval_count = interval_count
2311
- end
2312
- end
2313
-
2314
- class LineEndsAt < Stripe::RequestParams
2315
- # The ID of a quote line.
2316
- attr_accessor :id
2317
- # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
2318
- attr_accessor :index
2319
-
2320
- def initialize(id: nil, index: nil)
2321
- @id = id
2322
- @index = index
2323
- end
2324
- end
2325
- # Details of the duration over which to bill.
2326
- attr_accessor :duration
2327
- # Details of a Quote line item from which to bill until.
2328
- attr_accessor :line_ends_at
2329
- # A precise Unix timestamp.
2330
- attr_accessor :timestamp
2331
- # The type of method to specify the `bill_until` time.
2332
- attr_accessor :type
2333
-
2334
- def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
2335
- @duration = duration
2336
- @line_ends_at = line_ends_at
2337
- @timestamp = timestamp
2338
- @type = type
2339
- end
2340
- end
2341
- # The start of the period to bill from when the Quote is accepted.
2342
- attr_accessor :bill_from
2343
- # The end of the period to bill until when the Quote is accepted.
2344
- attr_accessor :bill_until
2345
-
2346
- def initialize(bill_from: nil, bill_until: nil)
2347
- @bill_from = bill_from
2348
- @bill_until = bill_until
2349
- end
2350
- end
2351
-
2352
- class Prebilling < Stripe::RequestParams
2353
- # This is used to determine the number of billing cycles to prebill.
2354
- attr_accessor :iterations
2355
-
2356
- def initialize(iterations: nil)
2357
- @iterations = iterations
2358
- end
2359
- end
2360
- # Describes the period to bill for upon accepting the quote.
2361
- attr_accessor :bill_on_acceptance
2362
- # 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.
2363
- attr_accessor :billing_behavior
2364
- # When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
2365
- attr_accessor :billing_cycle_anchor
2366
682
  # The subscription's 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.
2367
683
  attr_accessor :description
2368
684
  # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted.
2369
685
  attr_accessor :effective_date
2370
- # Behavior of the subscription schedule and underlying subscription when it ends.
2371
- attr_accessor :end_behavior
2372
686
  # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
2373
687
  attr_accessor :metadata
2374
- # If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
2375
- attr_accessor :prebilling
2376
- # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
2377
- #
2378
- # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
2379
- #
2380
- # Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
2381
- #
2382
- # Prorations can be disabled by passing `none`.
2383
- attr_accessor :proration_behavior
2384
688
  # Integer representing the number of trial period days before the customer is charged for the first time.
2385
689
  attr_accessor :trial_period_days
2386
690
 
2387
- def initialize(
2388
- bill_on_acceptance: nil,
2389
- billing_behavior: nil,
2390
- billing_cycle_anchor: nil,
2391
- description: nil,
2392
- effective_date: nil,
2393
- end_behavior: nil,
2394
- metadata: nil,
2395
- prebilling: nil,
2396
- proration_behavior: nil,
2397
- trial_period_days: nil
2398
- )
2399
- @bill_on_acceptance = bill_on_acceptance
2400
- @billing_behavior = billing_behavior
2401
- @billing_cycle_anchor = billing_cycle_anchor
691
+ def initialize(description: nil, effective_date: nil, metadata: nil, trial_period_days: nil)
2402
692
  @description = description
2403
693
  @effective_date = effective_date
2404
- @end_behavior = end_behavior
2405
694
  @metadata = metadata
2406
- @prebilling = prebilling
2407
- @proration_behavior = proration_behavior
2408
695
  @trial_period_days = trial_period_days
2409
696
  end
2410
697
  end
2411
698
 
2412
- class SubscriptionDataOverride < Stripe::RequestParams
2413
- class AppliesTo < Stripe::RequestParams
2414
- # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
2415
- attr_accessor :new_reference
2416
- # The ID of the schedule the line applies to.
2417
- attr_accessor :subscription_schedule
2418
- # Describes whether the quote line is affecting a new schedule or an existing schedule.
2419
- attr_accessor :type
2420
-
2421
- def initialize(new_reference: nil, subscription_schedule: nil, type: nil)
2422
- @new_reference = new_reference
2423
- @subscription_schedule = subscription_schedule
2424
- @type = type
2425
- end
2426
- end
2427
-
2428
- class BillOnAcceptance < Stripe::RequestParams
2429
- class BillFrom < Stripe::RequestParams
2430
- class LineStartsAt < Stripe::RequestParams
2431
- # The ID of a quote line.
2432
- attr_accessor :id
2433
- # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
2434
- attr_accessor :index
2435
-
2436
- def initialize(id: nil, index: nil)
2437
- @id = id
2438
- @index = index
2439
- end
2440
- end
2441
- # Details of a Quote line to start the bill period from.
2442
- attr_accessor :line_starts_at
2443
- # A precise Unix timestamp.
2444
- attr_accessor :timestamp
2445
- # The type of method to specify the `bill_from` time.
2446
- attr_accessor :type
2447
-
2448
- def initialize(line_starts_at: nil, timestamp: nil, type: nil)
2449
- @line_starts_at = line_starts_at
2450
- @timestamp = timestamp
2451
- @type = type
2452
- end
2453
- end
2454
-
2455
- class BillUntil < Stripe::RequestParams
2456
- class Duration < Stripe::RequestParams
2457
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2458
- attr_accessor :interval
2459
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2460
- attr_accessor :interval_count
2461
-
2462
- def initialize(interval: nil, interval_count: nil)
2463
- @interval = interval
2464
- @interval_count = interval_count
2465
- end
2466
- end
2467
-
2468
- class LineEndsAt < Stripe::RequestParams
2469
- # The ID of a quote line.
2470
- attr_accessor :id
2471
- # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
2472
- attr_accessor :index
2473
-
2474
- def initialize(id: nil, index: nil)
2475
- @id = id
2476
- @index = index
2477
- end
2478
- end
2479
- # Details of the duration over which to bill.
2480
- attr_accessor :duration
2481
- # Details of a Quote line item from which to bill until.
2482
- attr_accessor :line_ends_at
2483
- # A precise Unix timestamp.
2484
- attr_accessor :timestamp
2485
- # The type of method to specify the `bill_until` time.
2486
- attr_accessor :type
2487
-
2488
- def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
2489
- @duration = duration
2490
- @line_ends_at = line_ends_at
2491
- @timestamp = timestamp
2492
- @type = type
2493
- end
2494
- end
2495
- # The start of the period to bill from when the Quote is accepted.
2496
- attr_accessor :bill_from
2497
- # The end of the period to bill until when the Quote is accepted.
2498
- attr_accessor :bill_until
2499
-
2500
- def initialize(bill_from: nil, bill_until: nil)
2501
- @bill_from = bill_from
2502
- @bill_until = bill_until
2503
- end
2504
- end
2505
- # Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
2506
- attr_accessor :applies_to
2507
- # Describes the period to bill for upon accepting the quote.
2508
- attr_accessor :bill_on_acceptance
2509
- # 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.
2510
- attr_accessor :billing_behavior
2511
- # The customer the Subscription Data override applies to.
2512
- attr_accessor :customer
2513
- # The subscription's 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.
2514
- attr_accessor :description
2515
- # Behavior of the subscription schedule and underlying subscription when it ends.
2516
- attr_accessor :end_behavior
2517
- # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
2518
- #
2519
- # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
2520
- #
2521
- # Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
2522
- #
2523
- # Prorations can be disabled by passing `none`.
2524
- attr_accessor :proration_behavior
2525
-
2526
- def initialize(
2527
- applies_to: nil,
2528
- bill_on_acceptance: nil,
2529
- billing_behavior: nil,
2530
- customer: nil,
2531
- description: nil,
2532
- end_behavior: nil,
2533
- proration_behavior: nil
2534
- )
2535
- @applies_to = applies_to
2536
- @bill_on_acceptance = bill_on_acceptance
2537
- @billing_behavior = billing_behavior
2538
- @customer = customer
2539
- @description = description
2540
- @end_behavior = end_behavior
2541
- @proration_behavior = proration_behavior
2542
- end
2543
- end
2544
-
2545
699
  class TransferData < Stripe::RequestParams
2546
700
  # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
2547
701
  attr_accessor :amount
@@ -2556,8 +710,6 @@ module Stripe
2556
710
  @destination = destination
2557
711
  end
2558
712
  end
2559
- # Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
2560
- attr_accessor :allow_backdated_lines
2561
713
  # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field.
2562
714
  attr_accessor :application_fee_amount
2563
715
  # 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. There must be at least 1 line item with a recurring price to use this field.
@@ -2568,8 +720,6 @@ module Stripe
2568
720
  attr_accessor :collection_method
2569
721
  # The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
2570
722
  attr_accessor :customer
2571
- # The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed.
2572
- attr_accessor :customer_account
2573
723
  # The tax rates that will apply to any line item that does not have `tax_rates` set.
2574
724
  attr_accessor :default_tax_rates
2575
725
  # A description that will be displayed on the quote PDF.
@@ -2588,27 +738,21 @@ module Stripe
2588
738
  attr_accessor :invoice_settings
2589
739
  # A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
2590
740
  attr_accessor :line_items
2591
- # A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
2592
- attr_accessor :lines
2593
741
  # 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`.
2594
742
  attr_accessor :metadata
2595
743
  # The account on behalf of which to charge.
2596
744
  attr_accessor :on_behalf_of
2597
745
  # When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
2598
746
  attr_accessor :subscription_data
2599
- # List representing overrides for `subscription_data` configurations for specific subscription schedules.
2600
- attr_accessor :subscription_data_overrides
2601
747
  # The data with which to automatically create a Transfer for each of the invoices.
2602
748
  attr_accessor :transfer_data
2603
749
 
2604
750
  def initialize(
2605
- allow_backdated_lines: nil,
2606
751
  application_fee_amount: nil,
2607
752
  application_fee_percent: nil,
2608
753
  automatic_tax: nil,
2609
754
  collection_method: nil,
2610
755
  customer: nil,
2611
- customer_account: nil,
2612
756
  default_tax_rates: nil,
2613
757
  description: nil,
2614
758
  discounts: nil,
@@ -2618,20 +762,16 @@ module Stripe
2618
762
  header: nil,
2619
763
  invoice_settings: nil,
2620
764
  line_items: nil,
2621
- lines: nil,
2622
765
  metadata: nil,
2623
766
  on_behalf_of: nil,
2624
767
  subscription_data: nil,
2625
- subscription_data_overrides: nil,
2626
768
  transfer_data: nil
2627
769
  )
2628
- @allow_backdated_lines = allow_backdated_lines
2629
770
  @application_fee_amount = application_fee_amount
2630
771
  @application_fee_percent = application_fee_percent
2631
772
  @automatic_tax = automatic_tax
2632
773
  @collection_method = collection_method
2633
774
  @customer = customer
2634
- @customer_account = customer_account
2635
775
  @default_tax_rates = default_tax_rates
2636
776
  @description = description
2637
777
  @discounts = discounts
@@ -2641,11 +781,9 @@ module Stripe
2641
781
  @header = header
2642
782
  @invoice_settings = invoice_settings
2643
783
  @line_items = line_items
2644
- @lines = lines
2645
784
  @metadata = metadata
2646
785
  @on_behalf_of = on_behalf_of
2647
786
  @subscription_data = subscription_data
2648
- @subscription_data_overrides = subscription_data_overrides
2649
787
  @transfer_data = transfer_data
2650
788
  end
2651
789
  end
@@ -2686,24 +824,6 @@ module Stripe
2686
824
  end
2687
825
  end
2688
826
 
2689
- class ListLinesParams < Stripe::RequestParams
2690
- # 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.
2691
- attr_accessor :ending_before
2692
- # Specifies which fields in the response should be expanded.
2693
- attr_accessor :expand
2694
- # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
2695
- attr_accessor :limit
2696
- # 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.
2697
- attr_accessor :starting_after
2698
-
2699
- def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
2700
- @ending_before = ending_before
2701
- @expand = expand
2702
- @limit = limit
2703
- @starting_after = starting_after
2704
- end
2705
- end
2706
-
2707
827
  class AcceptParams < Stripe::RequestParams
2708
828
  # Specifies which fields in the response should be expanded.
2709
829
  attr_accessor :expand
@@ -2734,36 +854,6 @@ module Stripe
2734
854
  end
2735
855
  end
2736
856
 
2737
- class MarkDraftParams < Stripe::RequestParams
2738
- # Specifies which fields in the response should be expanded.
2739
- attr_accessor :expand
2740
-
2741
- def initialize(expand: nil)
2742
- @expand = expand
2743
- end
2744
- end
2745
-
2746
- class MarkStaleParams < Stripe::RequestParams
2747
- # Specifies which fields in the response should be expanded.
2748
- attr_accessor :expand
2749
- # Reason the Quote is being marked stale.
2750
- attr_accessor :reason
2751
-
2752
- def initialize(expand: nil, reason: nil)
2753
- @expand = expand
2754
- @reason = reason
2755
- end
2756
- end
2757
-
2758
- class ReestimateParams < Stripe::RequestParams
2759
- # Specifies which fields in the response should be expanded.
2760
- attr_accessor :expand
2761
-
2762
- def initialize(expand: nil)
2763
- @expand = expand
2764
- end
2765
- end
2766
-
2767
857
  class PdfParams < Stripe::RequestParams
2768
858
  # Specifies which fields in the response should be expanded.
2769
859
  attr_accessor :expand
@@ -2772,26 +862,6 @@ module Stripe
2772
862
  @expand = expand
2773
863
  end
2774
864
  end
2775
-
2776
- class ListPreviewInvoiceLinesParams < Stripe::RequestParams
2777
- # 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.
2778
- attr_accessor :ending_before
2779
- # Specifies which fields in the response should be expanded.
2780
- attr_accessor :expand
2781
- # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
2782
- attr_accessor :limit
2783
- # 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.
2784
- attr_accessor :starting_after
2785
-
2786
- def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
2787
- @ending_before = ending_before
2788
- @expand = expand
2789
- @limit = limit
2790
- @starting_after = starting_after
2791
- end
2792
- end
2793
- # Allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
2794
- attr_reader :allow_backdated_lines
2795
865
  # Total before any discounts or taxes are applied.
2796
866
  attr_reader :amount_subtotal
2797
867
  # Total after discounts and taxes are applied.
@@ -2814,8 +884,6 @@ module Stripe
2814
884
  attr_reader :currency
2815
885
  # The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
2816
886
  attr_reader :customer
2817
- # The account which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed.
2818
- attr_reader :customer_account
2819
887
  # The tax rates applied to this quote.
2820
888
  attr_reader :default_tax_rates
2821
889
  # A description that will be displayed on the quote PDF.
@@ -2838,8 +906,6 @@ module Stripe
2838
906
  attr_reader :invoice_settings
2839
907
  # A list of items the customer is being quoted for.
2840
908
  attr_reader :line_items
2841
- # A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
2842
- attr_reader :lines
2843
909
  # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
2844
910
  attr_reader :livemode
2845
911
  # 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.
@@ -2852,20 +918,14 @@ module Stripe
2852
918
  attr_reader :on_behalf_of
2853
919
  # The status of the quote.
2854
920
  attr_reader :status
2855
- # Details on when and why a quote has been marked as stale or canceled.
2856
- attr_reader :status_details
2857
921
  # Attribute for field status_transitions
2858
922
  attr_reader :status_transitions
2859
923
  # The subscription that was created or updated from this quote.
2860
924
  attr_reader :subscription
2861
925
  # Attribute for field subscription_data
2862
926
  attr_reader :subscription_data
2863
- # List representing overrides for `subscription_data` configurations for specific subscription schedules.
2864
- attr_reader :subscription_data_overrides
2865
927
  # The subscription schedule that was created or updated from this quote.
2866
928
  attr_reader :subscription_schedule
2867
- # The subscription schedules that were created or updated from this quote.
2868
- attr_reader :subscription_schedules
2869
929
  # ID of the test clock this quote belongs to.
2870
930
  attr_reader :test_clock
2871
931
  # Attribute for field total_details
@@ -2983,86 +1043,6 @@ module Stripe
2983
1043
  )
2984
1044
  end
2985
1045
 
2986
- # Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
2987
- def list_lines(params = {}, opts = {})
2988
- request_stripe_object(
2989
- method: :get,
2990
- path: format("/v1/quotes/%<quote>s/lines", { quote: CGI.escape(self["id"]) }),
2991
- params: params,
2992
- opts: opts
2993
- )
2994
- end
2995
-
2996
- # Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
2997
- def self.list_lines(quote, params = {}, opts = {})
2998
- request_stripe_object(
2999
- method: :get,
3000
- path: format("/v1/quotes/%<quote>s/lines", { quote: CGI.escape(quote) }),
3001
- params: params,
3002
- opts: opts
3003
- )
3004
- end
3005
-
3006
- # Preview the invoice line items that would be generated by accepting the quote.
3007
- def list_preview_invoice_lines(preview_invoice, params = {}, opts = {})
3008
- request_stripe_object(
3009
- method: :get,
3010
- path: format("/v1/quotes/%<quote>s/preview_invoices/%<preview_invoice>s/lines", { quote: CGI.escape(self["id"]), preview_invoice: CGI.escape(preview_invoice) }),
3011
- params: params,
3012
- opts: opts
3013
- )
3014
- end
3015
-
3016
- # Preview the invoice line items that would be generated by accepting the quote.
3017
- def self.list_preview_invoice_lines(quote, preview_invoice, params = {}, opts = {})
3018
- request_stripe_object(
3019
- method: :get,
3020
- path: format("/v1/quotes/%<quote>s/preview_invoices/%<preview_invoice>s/lines", { quote: CGI.escape(quote), preview_invoice: CGI.escape(preview_invoice) }),
3021
- params: params,
3022
- opts: opts
3023
- )
3024
- end
3025
-
3026
- # Converts a stale quote to draft.
3027
- def mark_draft(params = {}, opts = {})
3028
- request_stripe_object(
3029
- method: :post,
3030
- path: format("/v1/quotes/%<quote>s/mark_draft", { quote: CGI.escape(self["id"]) }),
3031
- params: params,
3032
- opts: opts
3033
- )
3034
- end
3035
-
3036
- # Converts a stale quote to draft.
3037
- def self.mark_draft(quote, params = {}, opts = {})
3038
- request_stripe_object(
3039
- method: :post,
3040
- path: format("/v1/quotes/%<quote>s/mark_draft", { quote: CGI.escape(quote) }),
3041
- params: params,
3042
- opts: opts
3043
- )
3044
- end
3045
-
3046
- # Converts a draft or open quote to stale.
3047
- def mark_stale(params = {}, opts = {})
3048
- request_stripe_object(
3049
- method: :post,
3050
- path: format("/v1/quotes/%<quote>s/mark_stale", { quote: CGI.escape(self["id"]) }),
3051
- params: params,
3052
- opts: opts
3053
- )
3054
- end
3055
-
3056
- # Converts a draft or open quote to stale.
3057
- def self.mark_stale(quote, params = {}, opts = {})
3058
- request_stripe_object(
3059
- method: :post,
3060
- path: format("/v1/quotes/%<quote>s/mark_stale", { quote: CGI.escape(quote) }),
3061
- params: params,
3062
- opts: opts
3063
- )
3064
- end
3065
-
3066
1046
  # Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf)
3067
1047
  def pdf(params = {}, opts = {}, &read_body_chunk_block)
3068
1048
  opts = { api_base: APIRequestor.active_requestor.config.uploads_base }.merge(opts)
@@ -3089,26 +1069,6 @@ module Stripe
3089
1069
  )
3090
1070
  end
3091
1071
 
3092
- # Recompute the upcoming invoice estimate for the quote.
3093
- def reestimate(params = {}, opts = {})
3094
- request_stripe_object(
3095
- method: :post,
3096
- path: format("/v1/quotes/%<quote>s/reestimate", { quote: CGI.escape(self["id"]) }),
3097
- params: params,
3098
- opts: opts
3099
- )
3100
- end
3101
-
3102
- # Recompute the upcoming invoice estimate for the quote.
3103
- def self.reestimate(quote, params = {}, opts = {})
3104
- request_stripe_object(
3105
- method: :post,
3106
- path: format("/v1/quotes/%<quote>s/reestimate", { quote: CGI.escape(quote) }),
3107
- params: params,
3108
- opts: opts
3109
- )
3110
- end
3111
-
3112
1072
  # A quote models prices and services for a customer.
3113
1073
  def self.update(quote, params = {}, opts = {})
3114
1074
  request_stripe_object(