stripe 15.0.0 → 15.3.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 (320) hide show
  1. checksums.yaml +4 -4
  2. data/API_VERSION +1 -0
  3. data/CHANGELOG.md +129 -44
  4. data/CONTRIBUTING.md +25 -0
  5. data/Gemfile +1 -1
  6. data/OPENAPI_VERSION +1 -1
  7. data/README.md +28 -55
  8. data/VERSION +1 -1
  9. data/lib/stripe/api_operations/nested_resource.rb +35 -35
  10. data/lib/stripe/api_requestor.rb +1 -1
  11. data/lib/stripe/api_version.rb +2 -1
  12. data/lib/stripe/connection_manager.rb +1 -3
  13. data/lib/stripe/event_types.rb +1 -0
  14. data/lib/stripe/events/v1_billing_meter_error_report_triggered_event.rb +1 -1
  15. data/lib/stripe/events/v1_billing_meter_no_meter_found_event.rb +1 -1
  16. data/lib/stripe/events/v2_core_event_destination_ping_event.rb +21 -0
  17. data/lib/stripe/oauth.rb +1 -1
  18. data/lib/stripe/resources/account.rb +198 -28
  19. data/lib/stripe/resources/account_session.rb +176 -72
  20. data/lib/stripe/resources/apple_pay_domain.rb +1 -2
  21. data/lib/stripe/resources/balance.rb +42 -0
  22. data/lib/stripe/resources/balance_transaction.rb +2 -0
  23. data/lib/stripe/resources/bank_account.rb +2 -2
  24. data/lib/stripe/resources/billing_portal/session.rb +3 -3
  25. data/lib/stripe/resources/capability.rb +1 -1
  26. data/lib/stripe/resources/charge.rb +43 -20
  27. data/lib/stripe/resources/checkout/session.rb +120 -19
  28. data/lib/stripe/resources/confirmation_token.rb +119 -100
  29. data/lib/stripe/resources/country_spec.rb +1 -1
  30. data/lib/stripe/resources/coupon.rb +2 -3
  31. data/lib/stripe/resources/credit_note.rb +21 -18
  32. data/lib/stripe/resources/customer.rb +4 -6
  33. data/lib/stripe/resources/customer_session.rb +5 -5
  34. data/lib/stripe/resources/dispute.rb +2 -2
  35. data/lib/stripe/resources/event.rb +3 -1
  36. data/lib/stripe/resources/file.rb +1 -1
  37. data/lib/stripe/resources/funding_instructions.rb +1 -1
  38. data/lib/stripe/resources/identity/verification_report.rb +6 -0
  39. data/lib/stripe/resources/identity/verification_session.rb +51 -11
  40. data/lib/stripe/resources/invoice.rb +146 -32
  41. data/lib/stripe/resources/invoice_item.rb +3 -7
  42. data/lib/stripe/resources/invoice_line_item.rb +1 -1
  43. data/lib/stripe/resources/invoice_payment.rb +9 -2
  44. data/lib/stripe/resources/issuing/authorization.rb +8 -8
  45. data/lib/stripe/resources/issuing/card.rb +1 -1
  46. data/lib/stripe/resources/issuing/dispute.rb +3 -3
  47. data/lib/stripe/resources/login_link.rb +2 -1
  48. data/lib/stripe/resources/mandate.rb +3 -0
  49. data/lib/stripe/resources/payment_intent.rb +602 -325
  50. data/lib/stripe/resources/payment_method.rb +76 -117
  51. data/lib/stripe/resources/payment_method_configuration.rb +356 -2
  52. data/lib/stripe/resources/payment_method_domain.rb +15 -2
  53. data/lib/stripe/resources/payout.rb +4 -4
  54. data/lib/stripe/resources/person.rb +27 -3
  55. data/lib/stripe/resources/plan.rb +2 -3
  56. data/lib/stripe/resources/price.rb +1 -1
  57. data/lib/stripe/resources/product.rb +1 -2
  58. data/lib/stripe/resources/quote.rb +28 -3
  59. data/lib/stripe/resources/radar/value_list.rb +1 -2
  60. data/lib/stripe/resources/radar/value_list_item.rb +1 -2
  61. data/lib/stripe/resources/refund.rb +8 -1
  62. data/lib/stripe/resources/reversal.rb +1 -1
  63. data/lib/stripe/resources/review.rb +1 -1
  64. data/lib/stripe/resources/setup_attempt.rb +1 -1
  65. data/lib/stripe/resources/setup_intent.rb +414 -293
  66. data/lib/stripe/resources/source.rb +1 -1
  67. data/lib/stripe/resources/subscription.rb +149 -27
  68. data/lib/stripe/resources/subscription_item.rb +33 -0
  69. data/lib/stripe/resources/subscription_schedule.rb +141 -4
  70. data/lib/stripe/resources/tax/calculation.rb +6 -2
  71. data/lib/stripe/resources/tax/calculation_line_item.rb +2 -0
  72. data/lib/stripe/resources/tax/registration.rb +261 -1
  73. data/lib/stripe/resources/tax/transaction.rb +1 -1
  74. data/lib/stripe/resources/tax_id.rb +3 -4
  75. data/lib/stripe/resources/tax_rate.rb +2 -2
  76. data/lib/stripe/resources/terminal/configuration.rb +2 -2
  77. data/lib/stripe/resources/terminal/location.rb +2 -3
  78. data/lib/stripe/resources/terminal/reader.rb +426 -6
  79. data/lib/stripe/resources/test_helpers/test_clock.rb +1 -2
  80. data/lib/stripe/resources/token.rb +63 -2
  81. data/lib/stripe/resources/transfer.rb +1 -1
  82. data/lib/stripe/resources/treasury/financial_account.rb +5 -1
  83. data/lib/stripe/resources/v2/billing/meter_event.rb +2 -2
  84. data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +2 -2
  85. data/lib/stripe/resources/v2/billing/meter_event_session.rb +2 -2
  86. data/lib/stripe/resources/v2/event.rb +2 -2
  87. data/lib/stripe/resources/v2/event_destination.rb +2 -2
  88. data/lib/stripe/resources/webhook_endpoint.rb +1 -2
  89. data/lib/stripe/resources.rb +1 -0
  90. data/lib/stripe/services/account_external_account_service.rb +3 -4
  91. data/lib/stripe/services/account_login_link_service.rb +1 -1
  92. data/lib/stripe/services/account_person_service.rb +85 -2
  93. data/lib/stripe/services/account_service.rb +169 -20
  94. data/lib/stripe/services/account_session_service.rb +115 -47
  95. data/lib/stripe/services/apple_pay_domain_service.rb +1 -2
  96. data/lib/stripe/services/application_fee_service.rb +1 -1
  97. data/lib/stripe/services/apps_service.rb +1 -1
  98. data/lib/stripe/services/balance_service.rb +1 -1
  99. data/lib/stripe/services/billing/meter_service.rb +1 -1
  100. data/lib/stripe/services/billing_portal/session_service.rb +1 -1
  101. data/lib/stripe/services/billing_portal_service.rb +1 -1
  102. data/lib/stripe/services/billing_service.rb +1 -1
  103. data/lib/stripe/services/charge_service.rb +4 -4
  104. data/lib/stripe/services/checkout/session_service.rb +94 -15
  105. data/lib/stripe/services/checkout_service.rb +1 -1
  106. data/lib/stripe/services/climate_service.rb +1 -1
  107. data/lib/stripe/services/coupon_service.rb +1 -2
  108. data/lib/stripe/services/credit_note_preview_lines_service.rb +3 -3
  109. data/lib/stripe/services/credit_note_service.rb +14 -15
  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_method_service.rb +1 -1
  113. data/lib/stripe/services/customer_payment_source_service.rb +1 -1
  114. data/lib/stripe/services/customer_service.rb +5 -7
  115. data/lib/stripe/services/customer_session_service.rb +1 -1
  116. data/lib/stripe/services/customer_tax_id_service.rb +2 -3
  117. data/lib/stripe/services/dispute_service.rb +1 -1
  118. data/lib/stripe/services/entitlements_service.rb +1 -1
  119. data/lib/stripe/services/file_service.rb +1 -1
  120. data/lib/stripe/services/financial_connections/account_service.rb +1 -1
  121. data/lib/stripe/services/financial_connections_service.rb +1 -1
  122. data/lib/stripe/services/forwarding_service.rb +1 -1
  123. data/lib/stripe/services/identity/verification_session_service.rb +21 -5
  124. data/lib/stripe/services/identity_service.rb +1 -1
  125. data/lib/stripe/services/invoice_item_service.rb +1 -2
  126. data/lib/stripe/services/invoice_service.rb +122 -28
  127. data/lib/stripe/services/issuing/authorization_service.rb +4 -4
  128. data/lib/stripe/services/issuing/card_service.rb +1 -1
  129. data/lib/stripe/services/issuing/dispute_service.rb +2 -2
  130. data/lib/stripe/services/issuing_service.rb +1 -1
  131. data/lib/stripe/services/payment_intent_service.rb +563 -313
  132. data/lib/stripe/services/payment_link_service.rb +1 -1
  133. data/lib/stripe/services/payment_method_configuration_service.rb +254 -2
  134. data/lib/stripe/services/payment_method_domain_service.rb +1 -1
  135. data/lib/stripe/services/payment_method_service.rb +59 -105
  136. data/lib/stripe/services/payout_service.rb +2 -2
  137. data/lib/stripe/services/plan_service.rb +2 -3
  138. data/lib/stripe/services/price_service.rb +2 -2
  139. data/lib/stripe/services/product_feature_service.rb +1 -2
  140. data/lib/stripe/services/product_service.rb +3 -4
  141. data/lib/stripe/services/promotion_code_service.rb +1 -1
  142. data/lib/stripe/services/quote_service.rb +21 -4
  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/radar_service.rb +1 -1
  147. data/lib/stripe/services/reporting_service.rb +1 -1
  148. data/lib/stripe/services/setup_intent_service.rb +403 -291
  149. data/lib/stripe/services/sigma_service.rb +1 -1
  150. data/lib/stripe/services/source_service.rb +2 -2
  151. data/lib/stripe/services/subscription_item_service.rb +26 -0
  152. data/lib/stripe/services/subscription_schedule_service.rb +106 -3
  153. data/lib/stripe/services/subscription_service.rb +121 -26
  154. data/lib/stripe/services/tax/calculation_service.rb +6 -2
  155. data/lib/stripe/services/tax/registration_service.rb +170 -1
  156. data/lib/stripe/services/tax/transaction_service.rb +1 -1
  157. data/lib/stripe/services/tax_id_service.rb +2 -3
  158. data/lib/stripe/services/tax_service.rb +1 -1
  159. data/lib/stripe/services/terminal/configuration_service.rb +1 -2
  160. data/lib/stripe/services/terminal/location_service.rb +2 -3
  161. data/lib/stripe/services/terminal/reader_service.rb +196 -2
  162. data/lib/stripe/services/terminal_service.rb +1 -1
  163. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +90 -91
  164. data/lib/stripe/services/test_helpers/issuing_service.rb +1 -1
  165. data/lib/stripe/services/test_helpers/terminal/reader_service.rb +43 -0
  166. data/lib/stripe/services/test_helpers/terminal_service.rb +1 -1
  167. data/lib/stripe/services/test_helpers/test_clock_service.rb +1 -2
  168. data/lib/stripe/services/test_helpers/treasury_service.rb +1 -1
  169. data/lib/stripe/services/test_helpers_service.rb +1 -1
  170. data/lib/stripe/services/token_service.rb +62 -1
  171. data/lib/stripe/services/transfer_service.rb +2 -2
  172. data/lib/stripe/services/treasury/financial_account_service.rb +6 -2
  173. data/lib/stripe/services/treasury_service.rb +1 -1
  174. data/lib/stripe/services/v1_services.rb +1 -1
  175. data/lib/stripe/services/v2/billing/meter_event_session_service.rb +1 -2
  176. data/lib/stripe/services/v2/billing_service.rb +3 -3
  177. data/lib/stripe/services/v2/core/event_destination_service.rb +17 -23
  178. data/lib/stripe/services/v2/core/event_service.rb +1 -2
  179. data/lib/stripe/services/v2/core_service.rb +1 -1
  180. data/lib/stripe/services/v2_services.rb +1 -1
  181. data/lib/stripe/services/webhook_endpoint_service.rb +1 -2
  182. data/lib/stripe/version.rb +1 -1
  183. data/lib/stripe/webhook.rb +1 -1
  184. data/rbi/stripe/resources/account.rbi +190 -35
  185. data/rbi/stripe/resources/account_session.rbi +196 -77
  186. data/rbi/stripe/resources/apple_pay_domain.rbi +1 -3
  187. data/rbi/stripe/resources/balance.rbi +55 -0
  188. data/rbi/stripe/resources/balance_transaction.rbi +3 -0
  189. data/rbi/stripe/resources/bank_account.rbi +2 -2
  190. data/rbi/stripe/resources/billing/alert.rbi +2 -2
  191. data/rbi/stripe/resources/billing_portal/session.rbi +3 -3
  192. data/rbi/stripe/resources/capability.rbi +1 -1
  193. data/rbi/stripe/resources/charge.rbi +52 -20
  194. data/rbi/stripe/resources/checkout/session.rbi +133 -24
  195. data/rbi/stripe/resources/confirmation_token.rbi +140 -115
  196. data/rbi/stripe/resources/country_spec.rbi +1 -1
  197. data/rbi/stripe/resources/coupon.rbi +2 -4
  198. data/rbi/stripe/resources/credit_note.rbi +23 -18
  199. data/rbi/stripe/resources/customer.rbi +4 -8
  200. data/rbi/stripe/resources/customer_session.rbi +5 -5
  201. data/rbi/stripe/resources/dispute.rbi +2 -2
  202. data/rbi/stripe/resources/event.rbi +4 -1
  203. data/rbi/stripe/resources/file.rbi +1 -1
  204. data/rbi/stripe/resources/identity/verification_report.rbi +9 -0
  205. data/rbi/stripe/resources/identity/verification_session.rbi +59 -12
  206. data/rbi/stripe/resources/invoice.rbi +149 -40
  207. data/rbi/stripe/resources/invoice_item.rbi +3 -8
  208. data/rbi/stripe/resources/invoice_line_item.rbi +2 -2
  209. data/rbi/stripe/resources/invoice_payment.rbi +9 -2
  210. data/rbi/stripe/resources/issuing/authorization.rbi +8 -8
  211. data/rbi/stripe/resources/issuing/card.rbi +1 -1
  212. data/rbi/stripe/resources/issuing/dispute.rbi +3 -3
  213. data/rbi/stripe/resources/login_link.rbi +2 -1
  214. data/rbi/stripe/resources/mandate.rbi +4 -0
  215. data/rbi/stripe/resources/payment_intent.rbi +637 -381
  216. data/rbi/stripe/resources/payment_method.rbi +81 -133
  217. data/rbi/stripe/resources/payment_method_configuration.rbi +400 -4
  218. data/rbi/stripe/resources/payment_method_domain.rbi +18 -2
  219. data/rbi/stripe/resources/payout.rbi +4 -4
  220. data/rbi/stripe/resources/person.rbi +33 -3
  221. data/rbi/stripe/resources/plan.rbi +2 -4
  222. data/rbi/stripe/resources/price.rbi +1 -1
  223. data/rbi/stripe/resources/product.rbi +1 -3
  224. data/rbi/stripe/resources/quote.rbi +25 -3
  225. data/rbi/stripe/resources/radar/value_list.rbi +1 -3
  226. data/rbi/stripe/resources/radar/value_list_item.rbi +1 -3
  227. data/rbi/stripe/resources/refund.rbi +8 -1
  228. data/rbi/stripe/resources/reversal.rbi +1 -1
  229. data/rbi/stripe/resources/review.rbi +1 -1
  230. data/rbi/stripe/resources/setup_attempt.rbi +1 -1
  231. data/rbi/stripe/resources/setup_intent.rbi +464 -346
  232. data/rbi/stripe/resources/source.rbi +1 -1
  233. data/rbi/stripe/resources/subscription.rbi +150 -34
  234. data/rbi/stripe/resources/subscription_item.rbi +36 -2
  235. data/rbi/stripe/resources/subscription_schedule.rbi +161 -11
  236. data/rbi/stripe/resources/tax/calculation.rbi +7 -3
  237. data/rbi/stripe/resources/tax/calculation_line_item.rbi +4 -1
  238. data/rbi/stripe/resources/tax/registration.rbi +249 -2
  239. data/rbi/stripe/resources/tax/transaction.rbi +1 -1
  240. data/rbi/stripe/resources/tax_id.rbi +3 -5
  241. data/rbi/stripe/resources/tax_rate.rbi +2 -2
  242. data/rbi/stripe/resources/terminal/configuration.rbi +2 -3
  243. data/rbi/stripe/resources/terminal/location.rbi +4 -6
  244. data/rbi/stripe/resources/terminal/reader.rbi +415 -8
  245. data/rbi/stripe/resources/test_helpers/test_clock.rbi +1 -3
  246. data/rbi/stripe/resources/token.rbi +70 -4
  247. data/rbi/stripe/resources/transfer.rbi +1 -1
  248. data/rbi/stripe/resources/treasury/financial_account.rbi +6 -2
  249. data/rbi/stripe/resources/v2/billing/meter_event.rbi +3 -3
  250. data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +3 -3
  251. data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +3 -3
  252. data/rbi/stripe/resources/v2/event.rbi +3 -3
  253. data/rbi/stripe/resources/v2/event_destination.rbi +3 -3
  254. data/rbi/stripe/resources/webhook_endpoint.rbi +1 -3
  255. data/rbi/stripe/services/account_external_account_service.rbi +3 -5
  256. data/rbi/stripe/services/account_login_link_service.rbi +1 -1
  257. data/rbi/stripe/services/account_person_service.rbi +93 -5
  258. data/rbi/stripe/services/account_service.rbi +166 -28
  259. data/rbi/stripe/services/account_session_service.rbi +126 -52
  260. data/rbi/stripe/services/apple_pay_domain_service.rbi +1 -3
  261. data/rbi/stripe/services/balance_service.rbi +1 -1
  262. data/rbi/stripe/services/billing/alert_service.rbi +2 -2
  263. data/rbi/stripe/services/billing_portal/session_service.rbi +1 -1
  264. data/rbi/stripe/services/charge_service.rbi +4 -4
  265. data/rbi/stripe/services/checkout/session_service.rbi +104 -19
  266. data/rbi/stripe/services/coupon_service.rbi +1 -3
  267. data/rbi/stripe/services/credit_note_preview_lines_service.rbi +3 -3
  268. data/rbi/stripe/services/credit_note_service.rbi +13 -14
  269. data/rbi/stripe/services/customer_balance_transaction_service.rbi +3 -3
  270. data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +2 -2
  271. data/rbi/stripe/services/customer_payment_method_service.rbi +1 -1
  272. data/rbi/stripe/services/customer_payment_source_service.rbi +1 -1
  273. data/rbi/stripe/services/customer_service.rbi +4 -8
  274. data/rbi/stripe/services/customer_session_service.rbi +1 -1
  275. data/rbi/stripe/services/customer_tax_id_service.rbi +2 -4
  276. data/rbi/stripe/services/dispute_service.rbi +1 -1
  277. data/rbi/stripe/services/file_service.rbi +1 -1
  278. data/rbi/stripe/services/identity/verification_session_service.rbi +22 -6
  279. data/rbi/stripe/services/invoice_item_service.rbi +1 -3
  280. data/rbi/stripe/services/invoice_service.rbi +126 -35
  281. data/rbi/stripe/services/issuing/authorization_service.rbi +4 -4
  282. data/rbi/stripe/services/issuing/card_service.rbi +1 -1
  283. data/rbi/stripe/services/issuing/dispute_service.rbi +2 -2
  284. data/rbi/stripe/services/payment_intent_service.rbi +599 -369
  285. data/rbi/stripe/services/payment_method_configuration_service.rbi +280 -4
  286. data/rbi/stripe/services/payment_method_domain_service.rbi +1 -1
  287. data/rbi/stripe/services/payment_method_service.rbi +62 -121
  288. data/rbi/stripe/services/payout_service.rbi +2 -2
  289. data/rbi/stripe/services/plan_service.rbi +2 -4
  290. data/rbi/stripe/services/price_service.rbi +2 -2
  291. data/rbi/stripe/services/product_feature_service.rbi +1 -3
  292. data/rbi/stripe/services/product_service.rbi +2 -4
  293. data/rbi/stripe/services/promotion_code_service.rbi +1 -1
  294. data/rbi/stripe/services/quote_service.rbi +16 -3
  295. data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +1 -1
  296. data/rbi/stripe/services/radar/value_list_item_service.rbi +1 -3
  297. data/rbi/stripe/services/radar/value_list_service.rbi +1 -3
  298. data/rbi/stripe/services/setup_intent_service.rbi +457 -344
  299. data/rbi/stripe/services/source_service.rbi +1 -1
  300. data/rbi/stripe/services/subscription_item_service.rbi +28 -2
  301. data/rbi/stripe/services/subscription_schedule_service.rbi +119 -10
  302. data/rbi/stripe/services/subscription_service.rbi +121 -33
  303. data/rbi/stripe/services/tax/calculation_service.rbi +6 -2
  304. data/rbi/stripe/services/tax/registration_service.rbi +171 -2
  305. data/rbi/stripe/services/tax_id_service.rbi +2 -4
  306. data/rbi/stripe/services/terminal/configuration_service.rbi +1 -3
  307. data/rbi/stripe/services/terminal/location_service.rbi +4 -6
  308. data/rbi/stripe/services/terminal/reader_service.rbi +200 -4
  309. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +106 -106
  310. data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +31 -0
  311. data/rbi/stripe/services/test_helpers/test_clock_service.rbi +1 -3
  312. data/rbi/stripe/services/token_service.rbi +71 -3
  313. data/rbi/stripe/services/transfer_service.rbi +1 -1
  314. data/rbi/stripe/services/treasury/financial_account_service.rbi +6 -2
  315. data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +1 -3
  316. data/rbi/stripe/services/v2/billing_service.rbi +1 -1
  317. data/rbi/stripe/services/v2/core/event_destination_service.rbi +14 -22
  318. data/rbi/stripe/services/v2/core/event_service.rbi +1 -3
  319. data/rbi/stripe/services/webhook_endpoint_service.rbi +1 -3
  320. metadata +5 -2
@@ -7,6 +7,14 @@ module Stripe
7
7
  #
8
8
  # Related guide: [Subscription schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules)
9
9
  class SubscriptionSchedule < APIResource
10
+ class BillingMode < Stripe::StripeObject
11
+ # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
12
+ sig { returns(String) }
13
+ attr_reader :type
14
+ # Details on when the current billing_mode was adopted.
15
+ sig { returns(Integer) }
16
+ attr_reader :updated_at
17
+ end
10
18
  class CurrentPhase < Stripe::StripeObject
11
19
  # The end of this phase of the subscription schedule.
12
20
  sig { returns(Integer) }
@@ -35,6 +43,14 @@ module Stripe
35
43
  sig { returns(T.nilable(Liability)) }
36
44
  attr_reader :liability
37
45
  end
46
+ class BillingThresholds < Stripe::StripeObject
47
+ # Monetary threshold that triggers the subscription to create an invoice
48
+ sig { returns(T.nilable(Integer)) }
49
+ attr_reader :amount_gte
50
+ # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`.
51
+ sig { returns(T.nilable(T::Boolean)) }
52
+ attr_reader :reset_billing_cycle_anchor
53
+ end
38
54
  class InvoiceSettings < Stripe::StripeObject
39
55
  class Issuer < Stripe::StripeObject
40
56
  # The connected account being referenced when `type` is `account`.
@@ -71,6 +87,9 @@ module Stripe
71
87
  # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
72
88
  sig { returns(String) }
73
89
  attr_reader :billing_cycle_anchor
90
+ # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
91
+ sig { returns(T.nilable(BillingThresholds)) }
92
+ attr_reader :billing_thresholds
74
93
  # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.
75
94
  sig { returns(T.nilable(String)) }
76
95
  attr_reader :collection_method
@@ -135,6 +154,14 @@ module Stripe
135
154
  sig { returns(T.nilable(Liability)) }
136
155
  attr_reader :liability
137
156
  end
157
+ class BillingThresholds < Stripe::StripeObject
158
+ # Monetary threshold that triggers the subscription to create an invoice
159
+ sig { returns(T.nilable(Integer)) }
160
+ attr_reader :amount_gte
161
+ # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`.
162
+ sig { returns(T.nilable(T::Boolean)) }
163
+ attr_reader :reset_billing_cycle_anchor
164
+ end
138
165
  class Discount < Stripe::StripeObject
139
166
  # ID of the coupon to create a new discount for.
140
167
  sig { returns(T.nilable(T.any(String, Stripe::Coupon))) }
@@ -166,6 +193,11 @@ module Stripe
166
193
  attr_reader :issuer
167
194
  end
168
195
  class Item < Stripe::StripeObject
196
+ class BillingThresholds < Stripe::StripeObject
197
+ # Usage threshold that triggers the subscription to create an invoice
198
+ sig { returns(T.nilable(Integer)) }
199
+ attr_reader :usage_gte
200
+ end
169
201
  class Discount < Stripe::StripeObject
170
202
  # ID of the coupon to create a new discount for.
171
203
  sig { returns(T.nilable(T.any(String, Stripe::Coupon))) }
@@ -177,6 +209,9 @@ module Stripe
177
209
  sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) }
178
210
  attr_reader :promotion_code
179
211
  end
212
+ # Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period
213
+ sig { returns(T.nilable(BillingThresholds)) }
214
+ attr_reader :billing_thresholds
180
215
  # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.
181
216
  sig { returns(T::Array[Discount]) }
182
217
  attr_reader :discounts
@@ -216,6 +251,9 @@ module Stripe
216
251
  # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
217
252
  sig { returns(T.nilable(String)) }
218
253
  attr_reader :billing_cycle_anchor
254
+ # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
255
+ sig { returns(T.nilable(BillingThresholds)) }
256
+ attr_reader :billing_thresholds
219
257
  # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.
220
258
  sig { returns(T.nilable(String)) }
221
259
  attr_reader :collection_method
@@ -249,7 +287,7 @@ module Stripe
249
287
  # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details.
250
288
  sig { returns(T.nilable(T.any(String, Stripe::Account))) }
251
289
  attr_reader :on_behalf_of
252
- # If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`.
290
+ # When transitioning phases, controls how prorations are handled (if any). Possible values are `create_prorations`, `none`, and `always_invoice`.
253
291
  sig { returns(String) }
254
292
  attr_reader :proration_behavior
255
293
  # The start of this phase of the subscription schedule.
@@ -265,6 +303,9 @@ module Stripe
265
303
  # ID of the Connect Application that created the schedule.
266
304
  sig { returns(T.nilable(T.any(String, Stripe::Application))) }
267
305
  attr_reader :application
306
+ # The billing mode of the subscription.
307
+ sig { returns(BillingMode) }
308
+ attr_reader :billing_mode
268
309
  # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.
269
310
  sig { returns(T.nilable(Integer)) }
270
311
  attr_reader :canceled_at
@@ -444,6 +485,13 @@ module Stripe
444
485
  ); end
445
486
  end
446
487
  class CreateParams < Stripe::RequestParams
488
+ class BillingMode < Stripe::RequestParams
489
+ # Attribute for param field type
490
+ sig { returns(String) }
491
+ attr_accessor :type
492
+ sig { params(type: String).void }
493
+ def initialize(type: nil); end
494
+ end
447
495
  class DefaultSettings < Stripe::RequestParams
448
496
  class AutomaticTax < Stripe::RequestParams
449
497
  class Liability < Stripe::RequestParams
@@ -469,6 +517,18 @@ module Stripe
469
517
  }
470
518
  def initialize(enabled: nil, liability: nil); end
471
519
  end
520
+ class BillingThresholds < Stripe::RequestParams
521
+ # Monetary threshold that triggers the subscription to advance to a new billing period
522
+ sig { returns(T.nilable(Integer)) }
523
+ attr_accessor :amount_gte
524
+ # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
525
+ sig { returns(T.nilable(T::Boolean)) }
526
+ attr_accessor :reset_billing_cycle_anchor
527
+ sig {
528
+ params(amount_gte: T.nilable(Integer), reset_billing_cycle_anchor: T.nilable(T::Boolean)).void
529
+ }
530
+ def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
531
+ end
472
532
  class InvoiceSettings < Stripe::RequestParams
473
533
  class Issuer < Stripe::RequestParams
474
534
  # The connected account being referenced when `type` is `account`.
@@ -517,6 +577,11 @@ module Stripe
517
577
  # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
518
578
  sig { returns(T.nilable(String)) }
519
579
  attr_accessor :billing_cycle_anchor
580
+ # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
581
+ sig {
582
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::BillingThresholds))))
583
+ }
584
+ attr_accessor :billing_thresholds
520
585
  # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
521
586
  sig { returns(T.nilable(String)) }
522
587
  attr_accessor :collection_method
@@ -540,12 +605,13 @@ module Stripe
540
605
  }
541
606
  attr_accessor :transfer_data
542
607
  sig {
543
- params(application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::AutomaticTax), billing_cycle_anchor: T.nilable(String), collection_method: T.nilable(String), default_payment_method: T.nilable(String), description: T.nilable(T.nilable(String)), invoice_settings: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::InvoiceSettings), on_behalf_of: T.nilable(T.nilable(String)), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::TransferData)))).void
608
+ params(application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::AutomaticTax), billing_cycle_anchor: T.nilable(String), billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::BillingThresholds))), collection_method: T.nilable(String), default_payment_method: T.nilable(String), description: T.nilable(T.nilable(String)), invoice_settings: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::InvoiceSettings), on_behalf_of: T.nilable(T.nilable(String)), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::TransferData)))).void
544
609
  }
545
610
  def initialize(
546
611
  application_fee_percent: nil,
547
612
  automatic_tax: nil,
548
613
  billing_cycle_anchor: nil,
614
+ billing_thresholds: nil,
549
615
  collection_method: nil,
550
616
  default_payment_method: nil,
551
617
  description: nil,
@@ -652,6 +718,18 @@ module Stripe
652
718
  }
653
719
  def initialize(enabled: nil, liability: nil); end
654
720
  end
721
+ class BillingThresholds < Stripe::RequestParams
722
+ # Monetary threshold that triggers the subscription to advance to a new billing period
723
+ sig { returns(T.nilable(Integer)) }
724
+ attr_accessor :amount_gte
725
+ # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
726
+ sig { returns(T.nilable(T::Boolean)) }
727
+ attr_accessor :reset_billing_cycle_anchor
728
+ sig {
729
+ params(amount_gte: T.nilable(Integer), reset_billing_cycle_anchor: T.nilable(T::Boolean)).void
730
+ }
731
+ def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
732
+ end
655
733
  class Discount < Stripe::RequestParams
656
734
  # ID of the coupon to create a new discount for.
657
735
  sig { returns(T.nilable(String)) }
@@ -695,6 +773,13 @@ module Stripe
695
773
  def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
696
774
  end
697
775
  class Item < Stripe::RequestParams
776
+ class BillingThresholds < Stripe::RequestParams
777
+ # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
778
+ sig { returns(Integer) }
779
+ attr_accessor :usage_gte
780
+ sig { params(usage_gte: Integer).void }
781
+ def initialize(usage_gte: nil); end
782
+ end
698
783
  class Discount < Stripe::RequestParams
699
784
  # ID of the coupon to create a new discount for.
700
785
  sig { returns(T.nilable(String)) }
@@ -753,6 +838,11 @@ module Stripe
753
838
  unit_amount_decimal: nil
754
839
  ); end
755
840
  end
841
+ # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
842
+ sig {
843
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::BillingThresholds))))
844
+ }
845
+ attr_accessor :billing_thresholds
756
846
  # The coupons to redeem into discounts for the subscription item.
757
847
  sig {
758
848
  returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::Discount]))))
@@ -779,9 +869,10 @@ module Stripe
779
869
  sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
780
870
  attr_accessor :tax_rates
781
871
  sig {
782
- params(discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::Discount]))), metadata: T.nilable(T::Hash[String, String]), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
872
+ params(billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::BillingThresholds))), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::Discount]))), metadata: T.nilable(T::Hash[String, String]), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
783
873
  }
784
874
  def initialize(
875
+ billing_thresholds: nil,
785
876
  discounts: nil,
786
877
  metadata: nil,
787
878
  plan: nil,
@@ -817,6 +908,11 @@ module Stripe
817
908
  # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
818
909
  sig { returns(T.nilable(String)) }
819
910
  attr_accessor :billing_cycle_anchor
911
+ # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
912
+ sig {
913
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::Phase::BillingThresholds))))
914
+ }
915
+ attr_accessor :billing_thresholds
820
916
  # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
821
917
  sig { returns(T.nilable(String)) }
822
918
  attr_accessor :collection_method
@@ -857,7 +953,7 @@ module Stripe
857
953
  # The account on behalf of which to charge, for each of the associated subscription's invoices.
858
954
  sig { returns(T.nilable(String)) }
859
955
  attr_accessor :on_behalf_of
860
- # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase.
956
+ # Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
861
957
  sig { returns(T.nilable(String)) }
862
958
  attr_accessor :proration_behavior
863
959
  # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
@@ -872,13 +968,14 @@ module Stripe
872
968
  sig { returns(T.nilable(Integer)) }
873
969
  attr_accessor :trial_end
874
970
  sig {
875
- params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem]), application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::AutomaticTax), billing_cycle_anchor: T.nilable(String), collection_method: T.nilable(String), currency: T.nilable(String), default_payment_method: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Discount]))), end_date: T.nilable(Integer), invoice_settings: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::InvoiceSettings), items: T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Item], iterations: T.nilable(Integer), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::TransferData), trial: T.nilable(T::Boolean), trial_end: T.nilable(Integer)).void
971
+ params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem]), application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::AutomaticTax), billing_cycle_anchor: T.nilable(String), billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::Phase::BillingThresholds))), collection_method: T.nilable(String), currency: T.nilable(String), default_payment_method: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Discount]))), end_date: T.nilable(Integer), invoice_settings: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::InvoiceSettings), items: T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Item], iterations: T.nilable(Integer), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::TransferData), trial: T.nilable(T::Boolean), trial_end: T.nilable(Integer)).void
876
972
  }
877
973
  def initialize(
878
974
  add_invoice_items: nil,
879
975
  application_fee_percent: nil,
880
976
  automatic_tax: nil,
881
977
  billing_cycle_anchor: nil,
978
+ billing_thresholds: nil,
882
979
  collection_method: nil,
883
980
  currency: nil,
884
981
  default_payment_method: nil,
@@ -897,6 +994,9 @@ module Stripe
897
994
  trial_end: nil
898
995
  ); end
899
996
  end
997
+ # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
998
+ sig { returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::BillingMode)) }
999
+ attr_accessor :billing_mode
900
1000
  # The identifier of the customer to create the subscription schedule for.
901
1001
  sig { returns(T.nilable(String)) }
902
1002
  attr_accessor :customer
@@ -922,9 +1022,10 @@ module Stripe
922
1022
  sig { returns(T.nilable(T.any(Integer, String))) }
923
1023
  attr_accessor :start_date
924
1024
  sig {
925
- params(customer: T.nilable(String), default_settings: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings), end_behavior: T.nilable(String), expand: T.nilable(T::Array[String]), from_subscription: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), phases: T.nilable(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase]), start_date: T.nilable(T.any(Integer, String))).void
1025
+ params(billing_mode: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::BillingMode), customer: T.nilable(String), default_settings: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings), end_behavior: T.nilable(String), expand: T.nilable(T::Array[String]), from_subscription: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), phases: T.nilable(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase]), start_date: T.nilable(T.any(Integer, String))).void
926
1026
  }
927
1027
  def initialize(
1028
+ billing_mode: nil,
928
1029
  customer: nil,
929
1030
  default_settings: nil,
930
1031
  end_behavior: nil,
@@ -961,6 +1062,18 @@ module Stripe
961
1062
  }
962
1063
  def initialize(enabled: nil, liability: nil); end
963
1064
  end
1065
+ class BillingThresholds < Stripe::RequestParams
1066
+ # Monetary threshold that triggers the subscription to advance to a new billing period
1067
+ sig { returns(T.nilable(Integer)) }
1068
+ attr_accessor :amount_gte
1069
+ # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
1070
+ sig { returns(T.nilable(T::Boolean)) }
1071
+ attr_accessor :reset_billing_cycle_anchor
1072
+ sig {
1073
+ params(amount_gte: T.nilable(Integer), reset_billing_cycle_anchor: T.nilable(T::Boolean)).void
1074
+ }
1075
+ def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
1076
+ end
964
1077
  class InvoiceSettings < Stripe::RequestParams
965
1078
  class Issuer < Stripe::RequestParams
966
1079
  # The connected account being referenced when `type` is `account`.
@@ -1009,6 +1122,11 @@ module Stripe
1009
1122
  # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
1010
1123
  sig { returns(T.nilable(String)) }
1011
1124
  attr_accessor :billing_cycle_anchor
1125
+ # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
1126
+ sig {
1127
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::BillingThresholds))))
1128
+ }
1129
+ attr_accessor :billing_thresholds
1012
1130
  # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
1013
1131
  sig { returns(T.nilable(String)) }
1014
1132
  attr_accessor :collection_method
@@ -1032,12 +1150,13 @@ module Stripe
1032
1150
  }
1033
1151
  attr_accessor :transfer_data
1034
1152
  sig {
1035
- params(application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::AutomaticTax), billing_cycle_anchor: T.nilable(String), collection_method: T.nilable(String), default_payment_method: T.nilable(String), description: T.nilable(T.nilable(String)), invoice_settings: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::InvoiceSettings), on_behalf_of: T.nilable(T.nilable(String)), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::TransferData)))).void
1153
+ params(application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::AutomaticTax), billing_cycle_anchor: T.nilable(String), billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::BillingThresholds))), collection_method: T.nilable(String), default_payment_method: T.nilable(String), description: T.nilable(T.nilable(String)), invoice_settings: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::InvoiceSettings), on_behalf_of: T.nilable(T.nilable(String)), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::TransferData)))).void
1036
1154
  }
1037
1155
  def initialize(
1038
1156
  application_fee_percent: nil,
1039
1157
  automatic_tax: nil,
1040
1158
  billing_cycle_anchor: nil,
1159
+ billing_thresholds: nil,
1041
1160
  collection_method: nil,
1042
1161
  default_payment_method: nil,
1043
1162
  description: nil,
@@ -1144,6 +1263,18 @@ module Stripe
1144
1263
  }
1145
1264
  def initialize(enabled: nil, liability: nil); end
1146
1265
  end
1266
+ class BillingThresholds < Stripe::RequestParams
1267
+ # Monetary threshold that triggers the subscription to advance to a new billing period
1268
+ sig { returns(T.nilable(Integer)) }
1269
+ attr_accessor :amount_gte
1270
+ # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
1271
+ sig { returns(T.nilable(T::Boolean)) }
1272
+ attr_accessor :reset_billing_cycle_anchor
1273
+ sig {
1274
+ params(amount_gte: T.nilable(Integer), reset_billing_cycle_anchor: T.nilable(T::Boolean)).void
1275
+ }
1276
+ def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
1277
+ end
1147
1278
  class Discount < Stripe::RequestParams
1148
1279
  # ID of the coupon to create a new discount for.
1149
1280
  sig { returns(T.nilable(String)) }
@@ -1187,6 +1318,13 @@ module Stripe
1187
1318
  def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
1188
1319
  end
1189
1320
  class Item < Stripe::RequestParams
1321
+ class BillingThresholds < Stripe::RequestParams
1322
+ # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
1323
+ sig { returns(Integer) }
1324
+ attr_accessor :usage_gte
1325
+ sig { params(usage_gte: Integer).void }
1326
+ def initialize(usage_gte: nil); end
1327
+ end
1190
1328
  class Discount < Stripe::RequestParams
1191
1329
  # ID of the coupon to create a new discount for.
1192
1330
  sig { returns(T.nilable(String)) }
@@ -1245,6 +1383,11 @@ module Stripe
1245
1383
  unit_amount_decimal: nil
1246
1384
  ); end
1247
1385
  end
1386
+ # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
1387
+ sig {
1388
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::BillingThresholds))))
1389
+ }
1390
+ attr_accessor :billing_thresholds
1248
1391
  # The coupons to redeem into discounts for the subscription item.
1249
1392
  sig {
1250
1393
  returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::Discount]))))
@@ -1271,9 +1414,10 @@ module Stripe
1271
1414
  sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
1272
1415
  attr_accessor :tax_rates
1273
1416
  sig {
1274
- params(discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::Discount]))), metadata: T.nilable(T::Hash[String, String]), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
1417
+ params(billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::BillingThresholds))), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::Discount]))), metadata: T.nilable(T::Hash[String, String]), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
1275
1418
  }
1276
1419
  def initialize(
1420
+ billing_thresholds: nil,
1277
1421
  discounts: nil,
1278
1422
  metadata: nil,
1279
1423
  plan: nil,
@@ -1309,6 +1453,11 @@ module Stripe
1309
1453
  # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
1310
1454
  sig { returns(T.nilable(String)) }
1311
1455
  attr_accessor :billing_cycle_anchor
1456
+ # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
1457
+ sig {
1458
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::Phase::BillingThresholds))))
1459
+ }
1460
+ attr_accessor :billing_thresholds
1312
1461
  # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
1313
1462
  sig { returns(T.nilable(String)) }
1314
1463
  attr_accessor :collection_method
@@ -1349,7 +1498,7 @@ module Stripe
1349
1498
  # The account on behalf of which to charge, for each of the associated subscription's invoices.
1350
1499
  sig { returns(T.nilable(String)) }
1351
1500
  attr_accessor :on_behalf_of
1352
- # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase.
1501
+ # Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
1353
1502
  sig { returns(T.nilable(String)) }
1354
1503
  attr_accessor :proration_behavior
1355
1504
  # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
@@ -1367,13 +1516,14 @@ module Stripe
1367
1516
  sig { returns(T.nilable(T.any(Integer, String))) }
1368
1517
  attr_accessor :trial_end
1369
1518
  sig {
1370
- params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem]), application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::AutomaticTax), billing_cycle_anchor: T.nilable(String), collection_method: T.nilable(String), currency: T.nilable(String), default_payment_method: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Discount]))), end_date: T.nilable(T.any(Integer, String)), invoice_settings: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::InvoiceSettings), items: T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item], iterations: T.nilable(Integer), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), start_date: T.nilable(T.any(Integer, String)), transfer_data: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::TransferData), trial: T.nilable(T::Boolean), trial_end: T.nilable(T.any(Integer, String))).void
1519
+ params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem]), application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::AutomaticTax), billing_cycle_anchor: T.nilable(String), billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::Phase::BillingThresholds))), collection_method: T.nilable(String), currency: T.nilable(String), default_payment_method: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Discount]))), end_date: T.nilable(T.any(Integer, String)), invoice_settings: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::InvoiceSettings), items: T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item], iterations: T.nilable(Integer), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), start_date: T.nilable(T.any(Integer, String)), transfer_data: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::TransferData), trial: T.nilable(T::Boolean), trial_end: T.nilable(T.any(Integer, String))).void
1371
1520
  }
1372
1521
  def initialize(
1373
1522
  add_invoice_items: nil,
1374
1523
  application_fee_percent: nil,
1375
1524
  automatic_tax: nil,
1376
1525
  billing_cycle_anchor: nil,
1526
+ billing_thresholds: nil,
1377
1527
  collection_method: nil,
1378
1528
  currency: nil,
1379
1529
  default_payment_method: nil,
@@ -1408,7 +1558,7 @@ module Stripe
1408
1558
  # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted.
1409
1559
  sig { returns(T.nilable(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase])) }
1410
1560
  attr_accessor :phases
1411
- # If the update changes the current phase, indicates whether the changes should be prorated. The default value is `create_prorations`.
1561
+ # If the update changes the billing configuration (item price, quantity, etc.) of the current phase, indicates how prorations from this change should be handled. The default value is `create_prorations`.
1412
1562
  sig { returns(T.nilable(String)) }
1413
1563
  attr_accessor :proration_behavior
1414
1564
  sig {
@@ -30,7 +30,7 @@ module Stripe
30
30
  attr_reader :state
31
31
  end
32
32
  class TaxId < Stripe::StripeObject
33
- # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown`
33
+ # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, `aw_tin`, `az_tin`, `bd_bin`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, or `unknown`
34
34
  sig { returns(String) }
35
35
  attr_reader :type
36
36
  # The value of the tax ID.
@@ -285,7 +285,7 @@ module Stripe
285
285
  ); end
286
286
  end
287
287
  class TaxId < Stripe::RequestParams
288
- # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`
288
+ # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`
289
289
  sig { returns(String) }
290
290
  attr_accessor :type
291
291
  # Value of the tax ID.
@@ -329,6 +329,9 @@ module Stripe
329
329
  # If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount.
330
330
  sig { returns(Integer) }
331
331
  attr_accessor :amount
332
+ # 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.
333
+ sig { returns(T.nilable(T::Hash[String, String])) }
334
+ attr_accessor :metadata
332
335
  # If provided, the product's `tax_code` will be used as the line item's `tax_code`.
333
336
  sig { returns(T.nilable(String)) }
334
337
  attr_accessor :product
@@ -345,10 +348,11 @@ module Stripe
345
348
  sig { returns(T.nilable(String)) }
346
349
  attr_accessor :tax_code
347
350
  sig {
348
- params(amount: Integer, product: T.nilable(String), quantity: T.nilable(Integer), reference: T.nilable(String), tax_behavior: T.nilable(String), tax_code: T.nilable(String)).void
351
+ params(amount: Integer, metadata: T.nilable(T::Hash[String, String]), product: T.nilable(String), quantity: T.nilable(Integer), reference: T.nilable(String), tax_behavior: T.nilable(String), tax_code: T.nilable(String)).void
349
352
  }
350
353
  def initialize(
351
354
  amount: nil,
355
+ metadata: nil,
352
356
  product: nil,
353
357
  quantity: nil,
354
358
  reference: nil,
@@ -62,6 +62,9 @@ module Stripe
62
62
  # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
63
63
  sig { returns(T::Boolean) }
64
64
  attr_reader :livemode
65
+ # 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.
66
+ sig { returns(T.nilable(T::Hash[String, String])) }
67
+ attr_reader :metadata
65
68
  # String representing the object's type. Objects of the same type share the same value.
66
69
  sig { returns(String) }
67
70
  attr_reader :object
@@ -72,7 +75,7 @@ module Stripe
72
75
  sig { returns(Integer) }
73
76
  attr_reader :quantity
74
77
  # A custom identifier for this line item.
75
- sig { returns(T.nilable(String)) }
78
+ sig { returns(String) }
76
79
  attr_reader :reference
77
80
  # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes.
78
81
  sig { returns(String) }