stripe 15.0.0 → 15.1.0.pre.beta.1

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 (576) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1537 -676
  3. data/OPENAPI_VERSION +1 -1
  4. data/VERSION +1 -1
  5. data/lib/stripe/api_requestor.rb +28 -0
  6. data/lib/stripe/api_version.rb +1 -1
  7. data/lib/stripe/errors.rb +54 -0
  8. data/lib/stripe/event_types.rb +75 -0
  9. data/lib/stripe/events/v2_core_account_including_configuration_customer_capability_status_updated_event.rb +23 -0
  10. data/lib/stripe/events/v2_core_account_including_configuration_customer_updated_event.rb +21 -0
  11. data/lib/stripe/events/v2_core_account_including_configuration_merchant_capability_status_updated_event.rb +23 -0
  12. data/lib/stripe/events/v2_core_account_including_configuration_merchant_updated_event.rb +21 -0
  13. data/lib/stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event.rb +23 -0
  14. data/lib/stripe/events/v2_core_account_including_configuration_recipient_updated_event.rb +21 -0
  15. data/lib/stripe/events/v2_core_account_including_identity_updated_event.rb +21 -0
  16. data/lib/stripe/events/v2_core_account_including_requirements_updated_event.rb +21 -0
  17. data/lib/stripe/events/v2_core_account_link_completed_event.rb +13 -0
  18. data/lib/stripe/events/v2_core_account_person_created_event.rb +23 -0
  19. data/lib/stripe/events/v2_core_account_person_deleted_event.rb +23 -0
  20. data/lib/stripe/events/v2_core_account_person_updated_event.rb +23 -0
  21. data/lib/stripe/events/v2_money_management_financial_account_created_event.rb +21 -0
  22. data/lib/stripe/events/v2_money_management_financial_address_activated_event.rb +21 -0
  23. data/lib/stripe/events/v2_money_management_financial_address_failed_event.rb +21 -0
  24. data/lib/stripe/events/v2_money_management_inbound_transfer_available_event.rb +23 -0
  25. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +21 -0
  26. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +21 -0
  27. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +21 -0
  28. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +21 -0
  29. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +21 -0
  30. data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +21 -0
  31. data/lib/stripe/events/v2_money_management_outbound_payment_created_event.rb +21 -0
  32. data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +21 -0
  33. data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +21 -0
  34. data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +21 -0
  35. data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +21 -0
  36. data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +21 -0
  37. data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +21 -0
  38. data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +21 -0
  39. data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +21 -0
  40. data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +23 -0
  41. data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +21 -0
  42. data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +21 -0
  43. data/lib/stripe/events/v2_money_management_received_credit_succeeded_event.rb +21 -0
  44. data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +21 -0
  45. data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +21 -0
  46. data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +21 -0
  47. data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +21 -0
  48. data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +21 -0
  49. data/lib/stripe/object_types.rb +51 -0
  50. data/lib/stripe/request_signing_authenticator.rb +79 -0
  51. data/lib/stripe/resources/account.rb +663 -1
  52. data/lib/stripe/resources/account_notice.rb +123 -0
  53. data/lib/stripe/resources/account_session.rb +299 -1
  54. data/lib/stripe/resources/balance_settings.rb +101 -0
  55. data/lib/stripe/resources/billing/credit_balance_summary.rb +2 -0
  56. data/lib/stripe/resources/billing/credit_balance_transaction.rb +4 -0
  57. data/lib/stripe/resources/billing/credit_grant.rb +10 -0
  58. data/lib/stripe/resources/billing/meter_error_report.rb +59 -0
  59. data/lib/stripe/resources/billing_portal/session.rb +6 -0
  60. data/lib/stripe/resources/capital/financing_offer.rb +179 -0
  61. data/lib/stripe/resources/capital/financing_summary.rb +55 -0
  62. data/lib/stripe/resources/capital/financing_transaction.rb +114 -0
  63. data/lib/stripe/resources/card.rb +2 -0
  64. data/lib/stripe/resources/cash_balance.rb +2 -0
  65. data/lib/stripe/resources/charge.rb +1454 -0
  66. data/lib/stripe/resources/checkout/session.rb +295 -7
  67. data/lib/stripe/resources/confirmation_token.rb +237 -3
  68. data/lib/stripe/resources/coupon.rb +1 -1
  69. data/lib/stripe/resources/credit_note.rb +10 -0
  70. data/lib/stripe/resources/credit_note_line_item.rb +9 -0
  71. data/lib/stripe/resources/customer.rb +2 -0
  72. data/lib/stripe/resources/customer_balance_transaction.rb +2 -0
  73. data/lib/stripe/resources/customer_cash_balance_transaction.rb +2 -0
  74. data/lib/stripe/resources/customer_session.rb +6 -1
  75. data/lib/stripe/resources/discount.rb +2 -0
  76. data/lib/stripe/resources/event.rb +33 -0
  77. data/lib/stripe/resources/financial_connections/account.rb +20 -1
  78. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +27 -0
  79. data/lib/stripe/resources/financial_connections/institution.rb +90 -0
  80. data/lib/stripe/resources/financial_connections/session.rb +62 -2
  81. data/lib/stripe/resources/gift_cards/card.rb +208 -0
  82. data/lib/stripe/resources/gift_cards/transaction.rb +272 -0
  83. data/lib/stripe/resources/identity/verification_session.rb +10 -0
  84. data/lib/stripe/resources/invoice.rb +1176 -16
  85. data/lib/stripe/resources/invoice_item.rb +78 -2
  86. data/lib/stripe/resources/invoice_line_item.rb +55 -1
  87. data/lib/stripe/resources/invoice_payment.rb +2 -53
  88. data/lib/stripe/resources/issuing/cardholder.rb +2 -1
  89. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +602 -0
  90. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +82 -0
  91. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +86 -0
  92. data/lib/stripe/resources/issuing/settlement.rb +53 -0
  93. data/lib/stripe/resources/issuing/transaction.rb +6 -0
  94. data/lib/stripe/resources/line_item.rb +37 -0
  95. data/lib/stripe/resources/login_link.rb +2 -1
  96. data/lib/stripe/resources/mandate.rb +24 -0
  97. data/lib/stripe/resources/margin.rb +115 -0
  98. data/lib/stripe/resources/order.rb +2859 -0
  99. data/lib/stripe/resources/payment_attempt_record.rb +1078 -0
  100. data/lib/stripe/resources/payment_intent.rb +5242 -440
  101. data/lib/stripe/resources/payment_method.rb +199 -4
  102. data/lib/stripe/resources/payment_method_configuration.rb +295 -0
  103. data/lib/stripe/resources/payment_method_domain.rb +13 -0
  104. data/lib/stripe/resources/payment_record.rb +1607 -0
  105. data/lib/stripe/resources/payout.rb +6 -0
  106. data/lib/stripe/resources/price.rb +30 -0
  107. data/lib/stripe/resources/privacy/redaction_job.rb +251 -0
  108. data/lib/stripe/resources/privacy/redaction_job_root_objects.rb +35 -0
  109. data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +54 -0
  110. data/lib/stripe/resources/product.rb +59 -0
  111. data/lib/stripe/resources/promotion_code.rb +10 -0
  112. data/lib/stripe/resources/quote.rb +2042 -6
  113. data/lib/stripe/resources/quote_line.rb +274 -0
  114. data/lib/stripe/resources/quote_preview_invoice.rb +663 -0
  115. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +337 -0
  116. data/lib/stripe/resources/refund.rb +9 -0
  117. data/lib/stripe/resources/setup_attempt.rb +21 -0
  118. data/lib/stripe/resources/setup_intent.rb +605 -18
  119. data/lib/stripe/resources/source.rb +30 -1
  120. data/lib/stripe/resources/subscription.rb +292 -9
  121. data/lib/stripe/resources/subscription_item.rb +84 -3
  122. data/lib/stripe/resources/subscription_schedule.rb +1007 -10
  123. data/lib/stripe/resources/tax/association.rb +89 -0
  124. data/lib/stripe/resources/tax/form.rb +211 -0
  125. data/lib/stripe/resources/tax/registration.rb +20 -0
  126. data/lib/stripe/resources/tax_id.rb +12 -2
  127. data/lib/stripe/resources/terminal/reader.rb +406 -0
  128. data/lib/stripe/resources/terminal/reader_collected_data.rb +31 -0
  129. data/lib/stripe/resources/treasury/financial_account.rb +22 -3
  130. data/lib/stripe/resources/treasury/financial_account_features.rb +2 -0
  131. data/lib/stripe/resources/treasury/outbound_transfer.rb +37 -0
  132. data/lib/stripe/resources/treasury/received_credit.rb +38 -1
  133. data/lib/stripe/resources/treasury/received_debit.rb +40 -1
  134. data/lib/stripe/resources/v2/core/account.rb +1715 -0
  135. data/lib/stripe/resources/v2/core/account_link.rb +54 -0
  136. data/lib/stripe/resources/v2/core/person.rb +272 -0
  137. data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +72 -0
  138. data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +37 -0
  139. data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +18 -0
  140. data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +20 -0
  141. data/lib/stripe/resources/v2/money_management/adjustment.rb +49 -0
  142. data/lib/stripe/resources/v2/money_management/financial_account.rb +56 -0
  143. data/lib/stripe/resources/v2/money_management/financial_address.rb +66 -0
  144. data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +92 -0
  145. data/lib/stripe/resources/v2/money_management/outbound_payment.rb +127 -0
  146. data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +74 -0
  147. data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +43 -0
  148. data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +115 -0
  149. data/lib/stripe/resources/v2/money_management/payout_method.rb +73 -0
  150. data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +47 -0
  151. data/lib/stripe/resources/v2/money_management/received_credit.rb +134 -0
  152. data/lib/stripe/resources/v2/money_management/received_debit.rb +106 -0
  153. data/lib/stripe/resources/v2/money_management/transaction.rb +76 -0
  154. data/lib/stripe/resources/v2/money_management/transaction_entry.rb +66 -0
  155. data/lib/stripe/resources.rb +88 -0
  156. data/lib/stripe/services/account_notice_service.rb +101 -0
  157. data/lib/stripe/services/account_service.rb +570 -1
  158. data/lib/stripe/services/account_session_service.rb +269 -1
  159. data/lib/stripe/services/balance_settings_service.rb +96 -0
  160. data/lib/stripe/services/billing/credit_balance_summary_service.rb +4 -1
  161. data/lib/stripe/services/billing/credit_balance_transaction_service.rb +4 -0
  162. data/lib/stripe/services/billing/credit_grant_service.rb +8 -0
  163. data/lib/stripe/services/billing_portal/session_service.rb +4 -0
  164. data/lib/stripe/services/capital/financing_offer_service.rb +112 -0
  165. data/lib/stripe/services/capital/financing_summary_service.rb +28 -0
  166. data/lib/stripe/services/capital/financing_transaction_service.rb +79 -0
  167. data/lib/stripe/services/capital_service.rb +15 -0
  168. data/lib/stripe/services/charge_service.rb +1334 -0
  169. data/lib/stripe/services/checkout/session_service.rb +195 -4
  170. data/lib/stripe/services/credit_note_service.rb +4 -0
  171. data/lib/stripe/services/customer_session_service.rb +4 -1
  172. data/{rbi/stripe/services/account_external_account_service.rbi → lib/stripe/services/external_account_service.rb} +135 -123
  173. data/{rbi/stripe/services/tax/transaction_line_item_service.rbi → lib/stripe/services/financial_connections/account_inferred_balance_service.rb} +21 -17
  174. data/lib/stripe/services/financial_connections/account_service.rb +7 -2
  175. data/{rbi/stripe/services/climate/supplier_service.rbi → lib/stripe/services/financial_connections/institution_service.rb} +36 -25
  176. data/lib/stripe/services/financial_connections/session_service.rb +34 -2
  177. data/lib/stripe/services/financial_connections_service.rb +2 -1
  178. data/lib/stripe/services/gift_cards/card_service.rb +170 -0
  179. data/lib/stripe/services/gift_cards/transaction_service.rb +209 -0
  180. data/lib/stripe/services/gift_cards_service.rb +14 -0
  181. data/lib/stripe/services/identity/verification_session_service.rb +8 -0
  182. data/lib/stripe/services/invoice_item_service.rb +74 -2
  183. data/lib/stripe/services/invoice_line_item_service.rb +33 -1
  184. data/lib/stripe/services/invoice_payment_service.rb +5 -33
  185. data/lib/stripe/services/invoice_service.rb +1088 -17
  186. data/lib/stripe/services/issuing/cardholder_service.rb +2 -1
  187. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +504 -0
  188. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +66 -0
  189. data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +83 -0
  190. data/lib/stripe/services/issuing/transaction_service.rb +4 -0
  191. data/lib/stripe/services/issuing_service.rb +5 -1
  192. data/lib/stripe/services/margin_service.rb +119 -0
  193. data/{rbi/stripe/services/source_transaction_service.rbi → lib/stripe/services/order_line_item_service.rb} +20 -16
  194. data/lib/stripe/services/order_service.rb +2268 -0
  195. data/lib/stripe/services/payment_attempt_record_service.rb +49 -0
  196. data/lib/stripe/services/payment_intent_service.rb +4634 -261
  197. data/lib/stripe/services/payment_method_configuration_service.rb +210 -0
  198. data/lib/stripe/services/payment_method_service.rb +129 -4
  199. data/lib/stripe/services/payment_record_service.rb +542 -0
  200. data/lib/stripe/services/payout_service.rb +4 -0
  201. data/lib/stripe/services/price_service.rb +19 -0
  202. data/lib/stripe/services/privacy/redaction_job_service.rb +231 -0
  203. data/{rbi/stripe/services/climate/product_service.rbi → lib/stripe/services/privacy/redaction_job_validation_error_service.rb} +36 -25
  204. data/lib/stripe/services/privacy_service.rb +13 -0
  205. data/lib/stripe/services/product_service.rb +38 -0
  206. data/lib/stripe/services/promotion_code_service.rb +8 -0
  207. data/{rbi/stripe/services/quote_line_item_service.rbi → lib/stripe/services/quote_line_service.rb} +20 -16
  208. data/{rbi/stripe/services/credit_note_line_item_service.rbi → lib/stripe/services/quote_preview_invoice_service.rb} +20 -16
  209. data/{rbi/stripe/services/payment_link_line_item_service.rbi → lib/stripe/services/quote_preview_subscription_schedule_service.rb} +20 -16
  210. data/lib/stripe/services/quote_service.rb +1726 -7
  211. data/lib/stripe/services/setup_intent_service.rb +565 -18
  212. data/lib/stripe/services/subscription_item_service.rb +75 -3
  213. data/lib/stripe/services/subscription_schedule_service.rb +911 -10
  214. data/lib/stripe/services/subscription_service.rb +253 -9
  215. data/lib/stripe/services/tax/association_service.rb +31 -0
  216. data/lib/stripe/services/tax/form_service.rb +100 -0
  217. data/lib/stripe/services/tax/registration_service.rb +13 -0
  218. data/lib/stripe/services/tax_id_service.rb +8 -2
  219. data/lib/stripe/services/tax_service.rb +3 -1
  220. data/lib/stripe/services/terminal/reader_collected_data_service.rb +28 -0
  221. data/lib/stripe/services/terminal/reader_service.rb +180 -0
  222. data/lib/stripe/services/terminal_service.rb +2 -1
  223. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +151 -3
  224. data/lib/stripe/services/test_helpers/terminal/reader_service.rb +43 -0
  225. data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +25 -1
  226. data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +25 -1
  227. data/lib/stripe/services/treasury/financial_account_features_service.rb +4 -1
  228. data/lib/stripe/services/treasury/financial_account_service.rb +16 -2
  229. data/lib/stripe/services/treasury/outbound_transfer_service.rb +24 -0
  230. data/lib/stripe/services/v1_services.rb +11 -2
  231. data/lib/stripe/services/v2/core/account_link_service.rb +76 -0
  232. data/lib/stripe/services/v2/core/account_service.rb +4130 -0
  233. data/lib/stripe/services/v2/core/accounts/person_service.rb +1040 -0
  234. data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +135 -0
  235. data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +109 -0
  236. data/lib/stripe/services/v2/core/vault_service.rb +18 -0
  237. data/lib/stripe/services/v2/core_service.rb +4 -1
  238. data/lib/stripe/services/v2/money_management/adjustment_service.rb +75 -0
  239. data/lib/stripe/services/v2/money_management/financial_account_service.rb +44 -0
  240. data/lib/stripe/services/v2/money_management/financial_address_service.rb +81 -0
  241. data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +126 -0
  242. data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +80 -0
  243. data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +202 -0
  244. data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +237 -0
  245. data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +174 -0
  246. data/lib/stripe/services/v2/money_management/payout_method_service.rb +95 -0
  247. data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +32 -0
  248. data/lib/stripe/services/v2/money_management/received_credit_service.rb +71 -0
  249. data/lib/stripe/services/v2/money_management/received_debit_service.rb +44 -0
  250. data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +70 -0
  251. data/lib/stripe/services/v2/money_management/transaction_service.rb +74 -0
  252. data/lib/stripe/services/v2/money_management_service.rb +31 -0
  253. data/lib/stripe/services/v2/test_helper_service.rb +15 -0
  254. data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +50 -0
  255. data/lib/stripe/services/v2_services.rb +4 -2
  256. data/lib/stripe/services.rb +52 -0
  257. data/lib/stripe/stripe_configuration.rb +3 -1
  258. data/lib/stripe/stripe_object.rb +1 -1
  259. data/lib/stripe/util.rb +7 -1
  260. data/lib/stripe/version.rb +1 -1
  261. data/lib/stripe.rb +55 -0
  262. data/rbi/stripe.rbi +190156 -0
  263. data/stripe.gemspec +4 -1
  264. metadata +146 -324
  265. data/rbi/stripe/resources/account.rbi +0 -4840
  266. data/rbi/stripe/resources/account_link.rbi +0 -74
  267. data/rbi/stripe/resources/account_session.rbi +0 -894
  268. data/rbi/stripe/resources/apple_pay_domain.rbi +0 -90
  269. data/rbi/stripe/resources/application.rbi +0 -20
  270. data/rbi/stripe/resources/application_fee.rbi +0 -118
  271. data/rbi/stripe/resources/application_fee_refund.rbi +0 -37
  272. data/rbi/stripe/resources/apps/secret.rbi +0 -195
  273. data/rbi/stripe/resources/balance.rbi +0 -180
  274. data/rbi/stripe/resources/balance_transaction.rbi +0 -144
  275. data/rbi/stripe/resources/bank_account.rbi +0 -127
  276. data/rbi/stripe/resources/billing/alert.rbi +0 -201
  277. data/rbi/stripe/resources/billing/alert_triggered.rbi +0 -28
  278. data/rbi/stripe/resources/billing/credit_balance_summary.rbi +0 -63
  279. data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +0 -147
  280. data/rbi/stripe/resources/billing/credit_grant.rbi +0 -291
  281. data/rbi/stripe/resources/billing/meter.rbi +0 -226
  282. data/rbi/stripe/resources/billing/meter_event.rbi +0 -64
  283. data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +0 -64
  284. data/rbi/stripe/resources/billing/meter_event_summary.rbi +0 -35
  285. data/rbi/stripe/resources/billing_portal/configuration.rbi +0 -645
  286. data/rbi/stripe/resources/billing_portal/session.rbi +0 -345
  287. data/rbi/stripe/resources/capability.rbi +0 -125
  288. data/rbi/stripe/resources/card.rbi +0 -125
  289. data/rbi/stripe/resources/cash_balance.rbi +0 -32
  290. data/rbi/stripe/resources/charge.rbi +0 -2054
  291. data/rbi/stripe/resources/checkout/session.rbi +0 -3951
  292. data/rbi/stripe/resources/climate/order.rbi +0 -245
  293. data/rbi/stripe/resources/climate/product.rbi +0 -75
  294. data/rbi/stripe/resources/climate/supplier.rbi +0 -72
  295. data/rbi/stripe/resources/confirmation_token.rbi +0 -1793
  296. data/rbi/stripe/resources/connect_collection_transfer.rbi +0 -26
  297. data/rbi/stripe/resources/country_spec.rbi +0 -85
  298. data/rbi/stripe/resources/coupon.rbi +0 -252
  299. data/rbi/stripe/resources/credit_note.rbi +0 -747
  300. data/rbi/stripe/resources/credit_note_line_item.rbi +0 -101
  301. data/rbi/stripe/resources/customer.rbi +0 -1009
  302. data/rbi/stripe/resources/customer_balance_transaction.rbi +0 -56
  303. data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +0 -151
  304. data/rbi/stripe/resources/customer_session.rbi +0 -200
  305. data/rbi/stripe/resources/discount.rbi +0 -53
  306. data/rbi/stripe/resources/dispute.rbi +0 -761
  307. data/rbi/stripe/resources/entitlements/active_entitlement.rbi +0 -58
  308. data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +0 -23
  309. data/rbi/stripe/resources/entitlements/feature.rbi +0 -117
  310. data/rbi/stripe/resources/ephemeral_key.rbi +0 -44
  311. data/rbi/stripe/resources/event.rbi +0 -146
  312. data/rbi/stripe/resources/exchange_rate.rbi +0 -66
  313. data/rbi/stripe/resources/file.rbi +0 -143
  314. data/rbi/stripe/resources/file_link.rbi +0 -141
  315. data/rbi/stripe/resources/financial_connections/account.rbi +0 -339
  316. data/rbi/stripe/resources/financial_connections/account_owner.rbi +0 -35
  317. data/rbi/stripe/resources/financial_connections/account_ownership.rbi +0 -23
  318. data/rbi/stripe/resources/financial_connections/session.rbi +0 -123
  319. data/rbi/stripe/resources/financial_connections/transaction.rbi +0 -124
  320. data/rbi/stripe/resources/forwarding/request.rbi +0 -216
  321. data/rbi/stripe/resources/funding_instructions.rbi +0 -437
  322. data/rbi/stripe/resources/identity/verification_report.rbi +0 -351
  323. data/rbi/stripe/resources/identity/verification_session.rbi +0 -517
  324. data/rbi/stripe/resources/invoice.rbi +0 -3733
  325. data/rbi/stripe/resources/invoice_item.rbi +0 -475
  326. data/rbi/stripe/resources/invoice_line_item.rbi +0 -432
  327. data/rbi/stripe/resources/invoice_payment.rbi +0 -114
  328. data/rbi/stripe/resources/invoice_rendering_template.rbi +0 -104
  329. data/rbi/stripe/resources/issuing/authorization.rbi +0 -1283
  330. data/rbi/stripe/resources/issuing/card.rbi +0 -741
  331. data/rbi/stripe/resources/issuing/cardholder.rbi +0 -744
  332. data/rbi/stripe/resources/issuing/dispute.rbi +0 -913
  333. data/rbi/stripe/resources/issuing/personalization_design.rbi +0 -338
  334. data/rbi/stripe/resources/issuing/physical_bundle.rbi +0 -79
  335. data/rbi/stripe/resources/issuing/token.rbi +0 -226
  336. data/rbi/stripe/resources/issuing/transaction.rbi +0 -1061
  337. data/rbi/stripe/resources/line_item.rbi +0 -72
  338. data/rbi/stripe/resources/login_link.rbi +0 -18
  339. data/rbi/stripe/resources/mandate.rbi +0 -187
  340. data/rbi/stripe/resources/payment_intent.rbi +0 -9731
  341. data/rbi/stripe/resources/payment_link.rbi +0 -1801
  342. data/rbi/stripe/resources/payment_method.rbi +0 -1822
  343. data/rbi/stripe/resources/payment_method_configuration.rbi +0 -3154
  344. data/rbi/stripe/resources/payment_method_domain.rbi +0 -212
  345. data/rbi/stripe/resources/payout.rbi +0 -300
  346. data/rbi/stripe/resources/person.rbi +0 -371
  347. data/rbi/stripe/resources/plan.rbi +0 -373
  348. data/rbi/stripe/resources/price.rbi +0 -694
  349. data/rbi/stripe/resources/product.rbi +0 -557
  350. data/rbi/stripe/resources/product_feature.rbi +0 -26
  351. data/rbi/stripe/resources/promotion_code.rbi +0 -261
  352. data/rbi/stripe/resources/quote.rbi +0 -1123
  353. data/rbi/stripe/resources/radar/early_fraud_warning.rbi +0 -98
  354. data/rbi/stripe/resources/radar/value_list.rbi +0 -170
  355. data/rbi/stripe/resources/radar/value_list_item.rbi +0 -131
  356. data/rbi/stripe/resources/refund.rbi +0 -516
  357. data/rbi/stripe/resources/reporting/report_run.rbi +0 -191
  358. data/rbi/stripe/resources/reporting/report_type.rbi +0 -57
  359. data/rbi/stripe/resources/reserve_transaction.rbi +0 -23
  360. data/rbi/stripe/resources/reversal.rbi +0 -51
  361. data/rbi/stripe/resources/review.rbi +0 -154
  362. data/rbi/stripe/resources/setup_attempt.rbi +0 -477
  363. data/rbi/stripe/resources/setup_intent.rbi +0 -3860
  364. data/rbi/stripe/resources/shipping_rate.rbi +0 -305
  365. data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +0 -75
  366. data/rbi/stripe/resources/source.rbi +0 -1496
  367. data/rbi/stripe/resources/source_mandate_notification.rbi +0 -77
  368. data/rbi/stripe/resources/source_transaction.rbi +0 -127
  369. data/rbi/stripe/resources/subscription.rbi +0 -1964
  370. data/rbi/stripe/resources/subscription_item.rbi +0 -370
  371. data/rbi/stripe/resources/subscription_schedule.rbi +0 -1495
  372. data/rbi/stripe/resources/tax/calculation.rbi +0 -474
  373. data/rbi/stripe/resources/tax/calculation_line_item.rbi +0 -88
  374. data/rbi/stripe/resources/tax/registration.rbi +0 -2485
  375. data/rbi/stripe/resources/tax/settings.rbi +0 -141
  376. data/rbi/stripe/resources/tax/transaction.rbi +0 -351
  377. data/rbi/stripe/resources/tax/transaction_line_item.rbi +0 -54
  378. data/rbi/stripe/resources/tax_code.rbi +0 -44
  379. data/rbi/stripe/resources/tax_deducted_at_source.rbi +0 -23
  380. data/rbi/stripe/resources/tax_id.rbi +0 -167
  381. data/rbi/stripe/resources/tax_rate.rbi +0 -239
  382. data/rbi/stripe/resources/terminal/configuration.rbi +0 -1388
  383. data/rbi/stripe/resources/terminal/connection_token.rbi +0 -37
  384. data/rbi/stripe/resources/terminal/location.rbi +0 -224
  385. data/rbi/stripe/resources/terminal/reader.rbi +0 -587
  386. data/rbi/stripe/resources/test_helpers/test_clock.rbi +0 -134
  387. data/rbi/stripe/resources/token.rbi +0 -1217
  388. data/rbi/stripe/resources/topup.rbi +0 -222
  389. data/rbi/stripe/resources/transfer.rbi +0 -199
  390. data/rbi/stripe/resources/treasury/credit_reversal.rbi +0 -119
  391. data/rbi/stripe/resources/treasury/debit_reversal.rbi +0 -131
  392. data/rbi/stripe/resources/treasury/financial_account.rbi +0 -865
  393. data/rbi/stripe/resources/treasury/financial_account_features.rbi +0 -260
  394. data/rbi/stripe/resources/treasury/inbound_transfer.rbi +0 -295
  395. data/rbi/stripe/resources/treasury/outbound_payment.rbi +0 -592
  396. data/rbi/stripe/resources/treasury/outbound_transfer.rbi +0 -431
  397. data/rbi/stripe/resources/treasury/received_credit.rbi +0 -302
  398. data/rbi/stripe/resources/treasury/received_debit.rbi +0 -256
  399. data/rbi/stripe/resources/treasury/transaction.rbi +0 -215
  400. data/rbi/stripe/resources/treasury/transaction_entry.rbi +0 -192
  401. data/rbi/stripe/resources/v2/amount.rbi +0 -14
  402. data/rbi/stripe/resources/v2/billing/meter_event.rbi +0 -37
  403. data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +0 -41
  404. data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +0 -31
  405. data/rbi/stripe/resources/v2/event.rbi +0 -48
  406. data/rbi/stripe/resources/v2/event_destination.rbi +0 -91
  407. data/rbi/stripe/resources/webhook_endpoint.rbi +0 -170
  408. data/rbi/stripe/services/account_capability_service.rbi +0 -51
  409. data/rbi/stripe/services/account_link_service.rbi +0 -58
  410. data/rbi/stripe/services/account_login_link_service.rbi +0 -22
  411. data/rbi/stripe/services/account_person_service.rbi +0 -923
  412. data/rbi/stripe/services/account_service.rbi +0 -4143
  413. data/rbi/stripe/services/account_session_service.rbi +0 -572
  414. data/rbi/stripe/services/apple_pay_domain_service.rbi +0 -78
  415. data/rbi/stripe/services/application_fee_refund_service.rbi +0 -93
  416. data/rbi/stripe/services/application_fee_service.rbi +0 -78
  417. data/rbi/stripe/services/apps/secret_service.rbi +0 -151
  418. data/rbi/stripe/services/apps_service.rbi +0 -9
  419. data/rbi/stripe/services/balance_service.rbi +0 -21
  420. data/rbi/stripe/services/balance_transaction_service.rbi +0 -93
  421. data/rbi/stripe/services/billing/alert_service.rbi +0 -152
  422. data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +0 -68
  423. data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +0 -59
  424. data/rbi/stripe/services/billing/credit_grant_service.rbi +0 -211
  425. data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +0 -42
  426. data/rbi/stripe/services/billing/meter_event_service.rbi +0 -42
  427. data/rbi/stripe/services/billing/meter_event_summary_service.rbi +0 -54
  428. data/rbi/stripe/services/billing/meter_service.rbi +0 -163
  429. data/rbi/stripe/services/billing_portal/configuration_service.rbi +0 -511
  430. data/rbi/stripe/services/billing_portal/session_service.rbi +0 -204
  431. data/rbi/stripe/services/billing_portal_service.rbi +0 -10
  432. data/rbi/stripe/services/billing_service.rbi +0 -15
  433. data/rbi/stripe/services/charge_service.rbi +0 -448
  434. data/rbi/stripe/services/checkout/session_line_item_service.rbi +0 -33
  435. data/rbi/stripe/services/checkout/session_service.rbi +0 -2585
  436. data/rbi/stripe/services/checkout_service.rbi +0 -9
  437. data/rbi/stripe/services/climate/order_service.rbi +0 -142
  438. data/rbi/stripe/services/climate_service.rbi +0 -11
  439. data/rbi/stripe/services/confirmation_token_service.rbi +0 -20
  440. data/rbi/stripe/services/country_spec_service.rbi +0 -44
  441. data/rbi/stripe/services/coupon_service.rbi +0 -196
  442. data/rbi/stripe/services/credit_note_preview_lines_service.rbi +0 -167
  443. data/rbi/stripe/services/credit_note_service.rbi +0 -416
  444. data/rbi/stripe/services/customer_balance_transaction_service.rbi +0 -92
  445. data/rbi/stripe/services/customer_cash_balance_service.rbi +0 -45
  446. data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +0 -44
  447. data/rbi/stripe/services/customer_funding_instructions_service.rbi +0 -59
  448. data/rbi/stripe/services/customer_payment_method_service.rbi +0 -57
  449. data/rbi/stripe/services/customer_payment_source_service.rbi +0 -232
  450. data/rbi/stripe/services/customer_service.rbi +0 -651
  451. data/rbi/stripe/services/customer_session_service.rbi +0 -116
  452. data/rbi/stripe/services/customer_tax_id_service.rbi +0 -72
  453. data/rbi/stripe/services/dispute_service.rbi +0 -424
  454. data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +0 -55
  455. data/rbi/stripe/services/entitlements/feature_service.rbi +0 -107
  456. data/rbi/stripe/services/entitlements_service.rbi +0 -10
  457. data/rbi/stripe/services/ephemeral_key_service.rbi +0 -53
  458. data/rbi/stripe/services/event_service.rbi +0 -83
  459. data/rbi/stripe/services/exchange_rate_service.rbi +0 -44
  460. data/rbi/stripe/services/file_link_service.rbi +0 -124
  461. data/rbi/stripe/services/file_service.rbi +0 -116
  462. data/rbi/stripe/services/financial_connections/account_owner_service.rbi +0 -42
  463. data/rbi/stripe/services/financial_connections/account_service.rbi +0 -133
  464. data/rbi/stripe/services/financial_connections/session_service.rbi +0 -88
  465. data/rbi/stripe/services/financial_connections/transaction_service.rbi +0 -92
  466. data/rbi/stripe/services/financial_connections_service.rbi +0 -11
  467. data/rbi/stripe/services/forwarding/request_service.rbi +0 -134
  468. data/rbi/stripe/services/forwarding_service.rbi +0 -9
  469. data/rbi/stripe/services/identity/verification_report_service.rbi +0 -87
  470. data/rbi/stripe/services/identity/verification_session_service.rbi +0 -323
  471. data/rbi/stripe/services/identity_service.rbi +0 -10
  472. data/rbi/stripe/services/invoice_item_service.rbi +0 -368
  473. data/rbi/stripe/services/invoice_line_item_service.rbi +0 -259
  474. data/rbi/stripe/services/invoice_payment_service.rbi +0 -71
  475. data/rbi/stripe/services/invoice_rendering_template_service.rbi +0 -82
  476. data/rbi/stripe/services/invoice_service.rbi +0 -2920
  477. data/rbi/stripe/services/issuing/authorization_service.rbi +0 -146
  478. data/rbi/stripe/services/issuing/card_service.rbi +0 -495
  479. data/rbi/stripe/services/issuing/cardholder_service.rbi +0 -587
  480. data/rbi/stripe/services/issuing/dispute_service.rbi +0 -707
  481. data/rbi/stripe/services/issuing/personalization_design_service.rbi +0 -243
  482. data/rbi/stripe/services/issuing/physical_bundle_service.rbi +0 -59
  483. data/rbi/stripe/services/issuing/token_service.rbi +0 -99
  484. data/rbi/stripe/services/issuing/transaction_service.rbi +0 -105
  485. data/rbi/stripe/services/issuing_service.rbi +0 -16
  486. data/rbi/stripe/services/mandate_service.rbi +0 -20
  487. data/rbi/stripe/services/payment_intent_service.rbi +0 -7759
  488. data/rbi/stripe/services/payment_link_service.rbi +0 -1352
  489. data/rbi/stripe/services/payment_method_configuration_service.rbi +0 -2211
  490. data/rbi/stripe/services/payment_method_domain_service.rbi +0 -112
  491. data/rbi/stripe/services/payment_method_service.rbi +0 -840
  492. data/rbi/stripe/services/payout_service.rbi +0 -205
  493. data/rbi/stripe/services/plan_service.rbi +0 -284
  494. data/rbi/stripe/services/price_service.rbi +0 -546
  495. data/rbi/stripe/services/product_feature_service.rbi +0 -69
  496. data/rbi/stripe/services/product_service.rbi +0 -479
  497. data/rbi/stripe/services/promotion_code_service.rbi +0 -214
  498. data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +0 -31
  499. data/rbi/stripe/services/quote_service.rbi +0 -686
  500. data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +0 -85
  501. data/rbi/stripe/services/radar/value_list_item_service.rbi +0 -111
  502. data/rbi/stripe/services/radar/value_list_service.rbi +0 -143
  503. data/rbi/stripe/services/radar_service.rbi +0 -11
  504. data/rbi/stripe/services/refund_service.rbi +0 -185
  505. data/rbi/stripe/services/reporting/report_run_service.rbi +0 -135
  506. data/rbi/stripe/services/reporting/report_type_service.rbi +0 -35
  507. data/rbi/stripe/services/reporting_service.rbi +0 -10
  508. data/rbi/stripe/services/review_service.rbi +0 -84
  509. data/rbi/stripe/services/setup_attempt_service.rbi +0 -65
  510. data/rbi/stripe/services/setup_intent_service.rbi +0 -3596
  511. data/rbi/stripe/services/shipping_rate_service.rbi +0 -241
  512. data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +0 -46
  513. data/rbi/stripe/services/sigma_service.rbi +0 -9
  514. data/rbi/stripe/services/source_service.rbi +0 -663
  515. data/rbi/stripe/services/subscription_item_service.rbi +0 -324
  516. data/rbi/stripe/services/subscription_schedule_service.rbi +0 -1192
  517. data/rbi/stripe/services/subscription_service.rbi +0 -1596
  518. data/rbi/stripe/services/tax/calculation_line_item_service.rbi +0 -33
  519. data/rbi/stripe/services/tax/calculation_service.rbi +0 -230
  520. data/rbi/stripe/services/tax/registration_service.rbi +0 -1689
  521. data/rbi/stripe/services/tax/settings_service.rbi +0 -93
  522. data/rbi/stripe/services/tax/transaction_service.rbi +0 -146
  523. data/rbi/stripe/services/tax_code_service.rbi +0 -44
  524. data/rbi/stripe/services/tax_id_service.rbi +0 -112
  525. data/rbi/stripe/services/tax_rate_service.rbi +0 -185
  526. data/rbi/stripe/services/tax_service.rbi +0 -12
  527. data/rbi/stripe/services/terminal/configuration_service.rbi +0 -1120
  528. data/rbi/stripe/services/terminal/connection_token_service.rbi +0 -25
  529. data/rbi/stripe/services/terminal/location_service.rbi +0 -184
  530. data/rbi/stripe/services/terminal/reader_service.rbi +0 -344
  531. data/rbi/stripe/services/terminal_service.rbi +0 -12
  532. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +0 -746
  533. data/rbi/stripe/services/test_helpers/customer_service.rbi +0 -33
  534. data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +0 -848
  535. data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +0 -76
  536. data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +0 -69
  537. data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +0 -711
  538. data/rbi/stripe/services/test_helpers/issuing_service.rbi +0 -14
  539. data/rbi/stripe/services/test_helpers/refund_service.rbi +0 -22
  540. data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +0 -62
  541. data/rbi/stripe/services/test_helpers/terminal_service.rbi +0 -11
  542. data/rbi/stripe/services/test_helpers/test_clock_service.rbi +0 -92
  543. data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +0 -64
  544. data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +0 -125
  545. data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +0 -125
  546. data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +0 -87
  547. data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +0 -87
  548. data/rbi/stripe/services/test_helpers/treasury_service.rbi +0 -15
  549. data/rbi/stripe/services/test_helpers_service.rbi +0 -15
  550. data/rbi/stripe/services/token_service.rbi +0 -1189
  551. data/rbi/stripe/services/topup_service.rbi +0 -176
  552. data/rbi/stripe/services/transfer_reversal_service.rbi +0 -101
  553. data/rbi/stripe/services/transfer_service.rbi +0 -152
  554. data/rbi/stripe/services/treasury/credit_reversal_service.rbi +0 -84
  555. data/rbi/stripe/services/treasury/debit_reversal_service.rbi +0 -88
  556. data/rbi/stripe/services/treasury/financial_account_features_service.rbi +0 -198
  557. data/rbi/stripe/services/treasury/financial_account_service.rbi +0 -562
  558. data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +0 -117
  559. data/rbi/stripe/services/treasury/outbound_payment_service.rbi +0 -304
  560. data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +0 -157
  561. data/rbi/stripe/services/treasury/received_credit_service.rbi +0 -72
  562. data/rbi/stripe/services/treasury/received_debit_service.rbi +0 -59
  563. data/rbi/stripe/services/treasury/transaction_entry_service.rbi +0 -111
  564. data/rbi/stripe/services/treasury/transaction_service.rbi +0 -122
  565. data/rbi/stripe/services/treasury_service.rbi +0 -18
  566. data/rbi/stripe/services/v1_services.rbi +0 -77
  567. data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +0 -39
  568. data/rbi/stripe/services/v2/billing/meter_event_service.rbi +0 -42
  569. data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +0 -20
  570. data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +0 -55
  571. data/rbi/stripe/services/v2/billing_service.rbi +0 -14
  572. data/rbi/stripe/services/v2/core/event_destination_service.rbi +0 -200
  573. data/rbi/stripe/services/v2/core/event_service.rbi +0 -38
  574. data/rbi/stripe/services/v2/core_service.rbi +0 -12
  575. data/rbi/stripe/services/v2_services.rbi +0 -10
  576. data/rbi/stripe/services/webhook_endpoint_service.rbi +0 -131
@@ -1,2920 +0,0 @@
1
- # File generated from our OpenAPI spec
2
- # frozen_string_literal: true
3
-
4
- # typed: true
5
- module Stripe
6
- class InvoiceService < StripeService
7
- attr_reader :line_items
8
- class DeleteParams < Stripe::RequestParams
9
-
10
- end
11
- class RetrieveParams < Stripe::RequestParams
12
- # Specifies which fields in the response should be expanded.
13
- sig { returns(T.nilable(T::Array[String])) }
14
- attr_accessor :expand
15
- sig { params(expand: T.nilable(T::Array[String])).void }
16
- def initialize(expand: nil); end
17
- end
18
- class UpdateParams < Stripe::RequestParams
19
- class AutomaticTax < Stripe::RequestParams
20
- class Liability < Stripe::RequestParams
21
- # The connected account being referenced when `type` is `account`.
22
- sig { returns(T.nilable(String)) }
23
- attr_accessor :account
24
- # Type of the account referenced in the request.
25
- sig { returns(String) }
26
- attr_accessor :type
27
- sig { params(account: T.nilable(String), type: String).void }
28
- def initialize(account: nil, type: nil); end
29
- end
30
- # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
31
- sig { returns(T::Boolean) }
32
- attr_accessor :enabled
33
- # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
34
- sig { returns(T.nilable(::Stripe::InvoiceService::UpdateParams::AutomaticTax::Liability)) }
35
- attr_accessor :liability
36
- sig {
37
- params(enabled: T::Boolean, liability: T.nilable(::Stripe::InvoiceService::UpdateParams::AutomaticTax::Liability)).void
38
- }
39
- def initialize(enabled: nil, liability: nil); end
40
- end
41
- class CustomField < Stripe::RequestParams
42
- # The name of the custom field. This may be up to 40 characters.
43
- sig { returns(String) }
44
- attr_accessor :name
45
- # The value of the custom field. This may be up to 140 characters.
46
- sig { returns(String) }
47
- attr_accessor :value
48
- sig { params(name: String, value: String).void }
49
- def initialize(name: nil, value: nil); end
50
- end
51
- class Discount < Stripe::RequestParams
52
- # ID of the coupon to create a new discount for.
53
- sig { returns(T.nilable(String)) }
54
- attr_accessor :coupon
55
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
56
- sig { returns(T.nilable(String)) }
57
- attr_accessor :discount
58
- # ID of the promotion code to create a new discount for.
59
- sig { returns(T.nilable(String)) }
60
- attr_accessor :promotion_code
61
- sig {
62
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
63
- }
64
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
65
- end
66
- class Issuer < Stripe::RequestParams
67
- # The connected account being referenced when `type` is `account`.
68
- sig { returns(T.nilable(String)) }
69
- attr_accessor :account
70
- # Type of the account referenced in the request.
71
- sig { returns(String) }
72
- attr_accessor :type
73
- sig { params(account: T.nilable(String), type: String).void }
74
- def initialize(account: nil, type: nil); end
75
- end
76
- class PaymentSettings < Stripe::RequestParams
77
- class PaymentMethodOptions < Stripe::RequestParams
78
- class AcssDebit < Stripe::RequestParams
79
- class MandateOptions < Stripe::RequestParams
80
- # Transaction type of the mandate.
81
- sig { returns(T.nilable(String)) }
82
- attr_accessor :transaction_type
83
- sig { params(transaction_type: T.nilable(String)).void }
84
- def initialize(transaction_type: nil); end
85
- end
86
- # Additional fields for Mandate creation
87
- sig {
88
- returns(T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions))
89
- }
90
- attr_accessor :mandate_options
91
- # Verification method for the intent
92
- sig { returns(T.nilable(String)) }
93
- attr_accessor :verification_method
94
- sig {
95
- params(mandate_options: T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions), verification_method: T.nilable(String)).void
96
- }
97
- def initialize(mandate_options: nil, verification_method: nil); end
98
- end
99
- class Bancontact < Stripe::RequestParams
100
- # Preferred language of the Bancontact authorization page that the customer is redirected to.
101
- sig { returns(T.nilable(String)) }
102
- attr_accessor :preferred_language
103
- sig { params(preferred_language: T.nilable(String)).void }
104
- def initialize(preferred_language: nil); end
105
- end
106
- class Card < Stripe::RequestParams
107
- class Installments < Stripe::RequestParams
108
- class Plan < Stripe::RequestParams
109
- # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
110
- sig { returns(T.nilable(Integer)) }
111
- attr_accessor :count
112
- # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
113
- # One of `month`.
114
- sig { returns(T.nilable(String)) }
115
- attr_accessor :interval
116
- # Type of installment plan, one of `fixed_count`.
117
- sig { returns(String) }
118
- attr_accessor :type
119
- sig {
120
- params(count: T.nilable(Integer), interval: T.nilable(String), type: String).void
121
- }
122
- def initialize(count: nil, interval: nil, type: nil); end
123
- end
124
- # Setting to true enables installments for this invoice.
125
- # Setting to false will prevent any selected plan from applying to a payment.
126
- sig { returns(T.nilable(T::Boolean)) }
127
- attr_accessor :enabled
128
- # The selected installment plan to use for this invoice.
129
- sig {
130
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::Installments::Plan))))
131
- }
132
- attr_accessor :plan
133
- sig {
134
- params(enabled: T.nilable(T::Boolean), plan: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::Installments::Plan)))).void
135
- }
136
- def initialize(enabled: nil, plan: nil); end
137
- end
138
- # Installment configuration for payments attempted on this invoice (Mexico Only).
139
- #
140
- # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
141
- sig {
142
- returns(T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::Installments))
143
- }
144
- attr_accessor :installments
145
- # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
146
- sig { returns(T.nilable(String)) }
147
- attr_accessor :request_three_d_secure
148
- sig {
149
- params(installments: T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::Installments), request_three_d_secure: T.nilable(String)).void
150
- }
151
- def initialize(installments: nil, request_three_d_secure: nil); end
152
- end
153
- class CustomerBalance < Stripe::RequestParams
154
- class BankTransfer < Stripe::RequestParams
155
- class EuBankTransfer < Stripe::RequestParams
156
- # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
157
- sig { returns(String) }
158
- attr_accessor :country
159
- sig { params(country: String).void }
160
- def initialize(country: nil); end
161
- end
162
- # Configuration for eu_bank_transfer funding type.
163
- sig {
164
- returns(T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer))
165
- }
166
- attr_accessor :eu_bank_transfer
167
- # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
168
- sig { returns(T.nilable(String)) }
169
- attr_accessor :type
170
- sig {
171
- params(eu_bank_transfer: T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer), type: T.nilable(String)).void
172
- }
173
- def initialize(eu_bank_transfer: nil, type: nil); end
174
- end
175
- # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
176
- sig {
177
- returns(T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer))
178
- }
179
- attr_accessor :bank_transfer
180
- # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
181
- sig { returns(T.nilable(String)) }
182
- attr_accessor :funding_type
183
- sig {
184
- params(bank_transfer: T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer), funding_type: T.nilable(String)).void
185
- }
186
- def initialize(bank_transfer: nil, funding_type: nil); end
187
- end
188
- class Konbini < Stripe::RequestParams
189
-
190
- end
191
- class SepaDebit < Stripe::RequestParams
192
-
193
- end
194
- class UsBankAccount < Stripe::RequestParams
195
- class FinancialConnections < Stripe::RequestParams
196
- class Filters < Stripe::RequestParams
197
- # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
198
- sig { returns(T.nilable(T::Array[String])) }
199
- attr_accessor :account_subcategories
200
- sig { params(account_subcategories: T.nilable(T::Array[String])).void }
201
- def initialize(account_subcategories: nil); end
202
- end
203
- # Provide filters for the linked accounts that the customer can select for the payment method.
204
- sig {
205
- returns(T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
206
- }
207
- attr_accessor :filters
208
- # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
209
- sig { returns(T.nilable(T::Array[String])) }
210
- attr_accessor :permissions
211
- # List of data features that you would like to retrieve upon account creation.
212
- sig { returns(T.nilable(T::Array[String])) }
213
- attr_accessor :prefetch
214
- sig {
215
- params(filters: T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String])).void
216
- }
217
- def initialize(filters: nil, permissions: nil, prefetch: nil); end
218
- end
219
- # Additional fields for Financial Connections Session creation
220
- sig {
221
- returns(T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections))
222
- }
223
- attr_accessor :financial_connections
224
- # Verification method for the intent
225
- sig { returns(T.nilable(String)) }
226
- attr_accessor :verification_method
227
- sig {
228
- params(financial_connections: T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections), verification_method: T.nilable(String)).void
229
- }
230
- def initialize(financial_connections: nil, verification_method: nil); end
231
- end
232
- # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
233
- sig {
234
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))))
235
- }
236
- attr_accessor :acss_debit
237
- # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
238
- sig {
239
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact))))
240
- }
241
- attr_accessor :bancontact
242
- # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
243
- sig {
244
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card))))
245
- }
246
- attr_accessor :card
247
- # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
248
- sig {
249
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))))
250
- }
251
- attr_accessor :customer_balance
252
- # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
253
- sig {
254
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini))))
255
- }
256
- attr_accessor :konbini
257
- # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
258
- sig {
259
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))))
260
- }
261
- attr_accessor :sepa_debit
262
- # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
263
- sig {
264
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount))))
265
- }
266
- attr_accessor :us_bank_account
267
- sig {
268
- params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact))), card: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)))).void
269
- }
270
- def initialize(
271
- acss_debit: nil,
272
- bancontact: nil,
273
- card: nil,
274
- customer_balance: nil,
275
- konbini: nil,
276
- sepa_debit: nil,
277
- us_bank_account: nil
278
- ); end
279
- end
280
- # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set.
281
- sig { returns(T.nilable(T.nilable(String))) }
282
- attr_accessor :default_mandate
283
- # Payment-method-specific configuration to provide to the invoice’s PaymentIntent.
284
- sig {
285
- returns(T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions))
286
- }
287
- attr_accessor :payment_method_options
288
- # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration
289
- sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
290
- attr_accessor :payment_method_types
291
- sig {
292
- params(default_mandate: T.nilable(T.nilable(String)), payment_method_options: T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions), payment_method_types: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
293
- }
294
- def initialize(
295
- default_mandate: nil,
296
- payment_method_options: nil,
297
- payment_method_types: nil
298
- ); end
299
- end
300
- class Rendering < Stripe::RequestParams
301
- class Pdf < Stripe::RequestParams
302
- # Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`.
303
- # If set to `auto`, invoice PDF page size defaults to `a4` for customers with
304
- # Japanese locale and `letter` for customers with other locales.
305
- sig { returns(T.nilable(String)) }
306
- attr_accessor :page_size
307
- sig { params(page_size: T.nilable(String)).void }
308
- def initialize(page_size: nil); end
309
- end
310
- # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
311
- sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
312
- attr_accessor :amount_tax_display
313
- # Invoice pdf rendering options
314
- sig { returns(T.nilable(::Stripe::InvoiceService::UpdateParams::Rendering::Pdf)) }
315
- attr_accessor :pdf
316
- # ID of the invoice rendering template to use for this invoice.
317
- sig { returns(T.nilable(String)) }
318
- attr_accessor :template
319
- # The specific version of invoice rendering template to use for this invoice.
320
- sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
321
- attr_accessor :template_version
322
- sig {
323
- params(amount_tax_display: T.nilable(T.nilable(T.any(String, String))), pdf: T.nilable(::Stripe::InvoiceService::UpdateParams::Rendering::Pdf), template: T.nilable(String), template_version: T.nilable(T.nilable(T.any(String, Integer)))).void
324
- }
325
- def initialize(amount_tax_display: nil, pdf: nil, template: nil, template_version: nil); end
326
- end
327
- class ShippingCost < Stripe::RequestParams
328
- class ShippingRateData < Stripe::RequestParams
329
- class DeliveryEstimate < Stripe::RequestParams
330
- class Maximum < Stripe::RequestParams
331
- # A unit of time.
332
- sig { returns(String) }
333
- attr_accessor :unit
334
- # Must be greater than 0.
335
- sig { returns(Integer) }
336
- attr_accessor :value
337
- sig { params(unit: String, value: Integer).void }
338
- def initialize(unit: nil, value: nil); end
339
- end
340
- class Minimum < Stripe::RequestParams
341
- # A unit of time.
342
- sig { returns(String) }
343
- attr_accessor :unit
344
- # Must be greater than 0.
345
- sig { returns(Integer) }
346
- attr_accessor :value
347
- sig { params(unit: String, value: Integer).void }
348
- def initialize(unit: nil, value: nil); end
349
- end
350
- # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
351
- sig {
352
- returns(T.nilable(::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum))
353
- }
354
- attr_accessor :maximum
355
- # The lower bound of the estimated range. If empty, represents no lower bound.
356
- sig {
357
- returns(T.nilable(::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum))
358
- }
359
- attr_accessor :minimum
360
- sig {
361
- params(maximum: T.nilable(::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum), minimum: T.nilable(::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum)).void
362
- }
363
- def initialize(maximum: nil, minimum: nil); end
364
- end
365
- class FixedAmount < Stripe::RequestParams
366
- class CurrencyOptions < Stripe::RequestParams
367
- # A non-negative integer in cents representing how much to charge.
368
- sig { returns(Integer) }
369
- attr_accessor :amount
370
- # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
371
- sig { returns(T.nilable(String)) }
372
- attr_accessor :tax_behavior
373
- sig { params(amount: Integer, tax_behavior: T.nilable(String)).void }
374
- def initialize(amount: nil, tax_behavior: nil); end
375
- end
376
- # A non-negative integer in cents representing how much to charge.
377
- sig { returns(Integer) }
378
- attr_accessor :amount
379
- # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
380
- sig { returns(String) }
381
- attr_accessor :currency
382
- # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
383
- sig {
384
- returns(T.nilable(T::Hash[String, ::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions]))
385
- }
386
- attr_accessor :currency_options
387
- sig {
388
- params(amount: Integer, currency: String, currency_options: T.nilable(T::Hash[String, ::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions])).void
389
- }
390
- def initialize(amount: nil, currency: nil, currency_options: nil); end
391
- end
392
- # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
393
- sig {
394
- returns(T.nilable(::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate))
395
- }
396
- attr_accessor :delivery_estimate
397
- # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
398
- sig { returns(String) }
399
- attr_accessor :display_name
400
- # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
401
- sig {
402
- returns(T.nilable(::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData::FixedAmount))
403
- }
404
- attr_accessor :fixed_amount
405
- # 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`.
406
- sig { returns(T.nilable(T::Hash[String, String])) }
407
- attr_accessor :metadata
408
- # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
409
- sig { returns(T.nilable(String)) }
410
- attr_accessor :tax_behavior
411
- # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
412
- sig { returns(T.nilable(String)) }
413
- attr_accessor :tax_code
414
- # The type of calculation to use on the shipping rate.
415
- sig { returns(T.nilable(String)) }
416
- attr_accessor :type
417
- sig {
418
- params(delivery_estimate: T.nilable(::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate), display_name: String, fixed_amount: T.nilable(::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData::FixedAmount), metadata: T.nilable(T::Hash[String, String]), tax_behavior: T.nilable(String), tax_code: T.nilable(String), type: T.nilable(String)).void
419
- }
420
- def initialize(
421
- delivery_estimate: nil,
422
- display_name: nil,
423
- fixed_amount: nil,
424
- metadata: nil,
425
- tax_behavior: nil,
426
- tax_code: nil,
427
- type: nil
428
- ); end
429
- end
430
- # The ID of the shipping rate to use for this order.
431
- sig { returns(T.nilable(String)) }
432
- attr_accessor :shipping_rate
433
- # Parameters to create a new ad-hoc shipping rate for this order.
434
- sig {
435
- returns(T.nilable(::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData))
436
- }
437
- attr_accessor :shipping_rate_data
438
- sig {
439
- params(shipping_rate: T.nilable(String), shipping_rate_data: T.nilable(::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData)).void
440
- }
441
- def initialize(shipping_rate: nil, shipping_rate_data: nil); end
442
- end
443
- class ShippingDetails < Stripe::RequestParams
444
- class Address < Stripe::RequestParams
445
- # City, district, suburb, town, or village.
446
- sig { returns(T.nilable(String)) }
447
- attr_accessor :city
448
- # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
449
- sig { returns(T.nilable(String)) }
450
- attr_accessor :country
451
- # Address line 1 (e.g., street, PO Box, or company name).
452
- sig { returns(T.nilable(String)) }
453
- attr_accessor :line1
454
- # Address line 2 (e.g., apartment, suite, unit, or building).
455
- sig { returns(T.nilable(String)) }
456
- attr_accessor :line2
457
- # ZIP or postal code.
458
- sig { returns(T.nilable(String)) }
459
- attr_accessor :postal_code
460
- # State, county, province, or region.
461
- sig { returns(T.nilable(String)) }
462
- attr_accessor :state
463
- sig {
464
- params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
465
- }
466
- def initialize(
467
- city: nil,
468
- country: nil,
469
- line1: nil,
470
- line2: nil,
471
- postal_code: nil,
472
- state: nil
473
- ); end
474
- end
475
- # Shipping address
476
- sig { returns(::Stripe::InvoiceService::UpdateParams::ShippingDetails::Address) }
477
- attr_accessor :address
478
- # Recipient name.
479
- sig { returns(String) }
480
- attr_accessor :name
481
- # Recipient phone (including extension)
482
- sig { returns(T.nilable(T.nilable(String))) }
483
- attr_accessor :phone
484
- sig {
485
- params(address: ::Stripe::InvoiceService::UpdateParams::ShippingDetails::Address, name: String, phone: T.nilable(T.nilable(String))).void
486
- }
487
- def initialize(address: nil, name: nil, phone: nil); end
488
- end
489
- class TransferData < Stripe::RequestParams
490
- # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred.
491
- sig { returns(T.nilable(Integer)) }
492
- attr_accessor :amount
493
- # ID of an existing, connected Stripe account.
494
- sig { returns(String) }
495
- attr_accessor :destination
496
- sig { params(amount: T.nilable(Integer), destination: String).void }
497
- def initialize(amount: nil, destination: nil); end
498
- end
499
- # The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
500
- sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
501
- attr_accessor :account_tax_ids
502
- # A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
503
- sig { returns(T.nilable(Integer)) }
504
- attr_accessor :application_fee_amount
505
- # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice.
506
- sig { returns(T.nilable(T::Boolean)) }
507
- attr_accessor :auto_advance
508
- # Settings for automatic tax lookup for this invoice.
509
- sig { returns(T.nilable(::Stripe::InvoiceService::UpdateParams::AutomaticTax)) }
510
- attr_accessor :automatic_tax
511
- # The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state. To turn off automatic finalization, set `auto_advance` to false.
512
- sig { returns(T.nilable(Integer)) }
513
- attr_accessor :automatically_finalizes_at
514
- # Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices.
515
- sig { returns(T.nilable(String)) }
516
- attr_accessor :collection_method
517
- # A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields.
518
- sig {
519
- returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::UpdateParams::CustomField]))))
520
- }
521
- attr_accessor :custom_fields
522
- # The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices.
523
- sig { returns(T.nilable(Integer)) }
524
- attr_accessor :days_until_due
525
- # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
526
- sig { returns(T.nilable(String)) }
527
- attr_accessor :default_payment_method
528
- # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
529
- sig { returns(T.nilable(T.nilable(String))) }
530
- attr_accessor :default_source
531
- # The tax rates that will apply to any line item that does not have `tax_rates` set. Pass an empty string to remove previously-defined tax rates.
532
- sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
533
- attr_accessor :default_tax_rates
534
- # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
535
- sig { returns(T.nilable(String)) }
536
- attr_accessor :description
537
- # The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts.
538
- sig {
539
- returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::UpdateParams::Discount]))))
540
- }
541
- attr_accessor :discounts
542
- # The date on which payment for this invoice is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices.
543
- sig { returns(T.nilable(Integer)) }
544
- attr_accessor :due_date
545
- # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt.
546
- sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
547
- attr_accessor :effective_at
548
- # Specifies which fields in the response should be expanded.
549
- sig { returns(T.nilable(T::Array[String])) }
550
- attr_accessor :expand
551
- # Footer to be displayed on the invoice.
552
- sig { returns(T.nilable(String)) }
553
- attr_accessor :footer
554
- # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
555
- sig { returns(T.nilable(::Stripe::InvoiceService::UpdateParams::Issuer)) }
556
- attr_accessor :issuer
557
- # 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`.
558
- sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
559
- attr_accessor :metadata
560
- # Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically.
561
- sig { returns(T.nilable(T.nilable(String))) }
562
- attr_accessor :number
563
- # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.
564
- sig { returns(T.nilable(T.nilable(String))) }
565
- attr_accessor :on_behalf_of
566
- # Configuration settings for the PaymentIntent that is generated when the invoice is finalized.
567
- sig { returns(T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings)) }
568
- attr_accessor :payment_settings
569
- # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
570
- sig { returns(T.nilable(::Stripe::InvoiceService::UpdateParams::Rendering)) }
571
- attr_accessor :rendering
572
- # Settings for the cost of shipping for this invoice.
573
- sig {
574
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::ShippingCost))))
575
- }
576
- attr_accessor :shipping_cost
577
- # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer.
578
- sig {
579
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::ShippingDetails))))
580
- }
581
- attr_accessor :shipping_details
582
- # Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`.
583
- sig { returns(T.nilable(String)) }
584
- attr_accessor :statement_descriptor
585
- # If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value.
586
- sig {
587
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::TransferData))))
588
- }
589
- attr_accessor :transfer_data
590
- sig {
591
- params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), application_fee_amount: T.nilable(Integer), auto_advance: T.nilable(T::Boolean), automatic_tax: T.nilable(::Stripe::InvoiceService::UpdateParams::AutomaticTax), automatically_finalizes_at: T.nilable(Integer), collection_method: T.nilable(String), custom_fields: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::UpdateParams::CustomField]))), days_until_due: T.nilable(Integer), default_payment_method: T.nilable(String), default_source: T.nilable(T.nilable(String)), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(String), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::UpdateParams::Discount]))), due_date: T.nilable(Integer), effective_at: T.nilable(T.nilable(T.any(String, Integer))), expand: T.nilable(T::Array[String]), footer: T.nilable(String), issuer: T.nilable(::Stripe::InvoiceService::UpdateParams::Issuer), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), number: T.nilable(T.nilable(String)), on_behalf_of: T.nilable(T.nilable(String)), payment_settings: T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings), rendering: T.nilable(::Stripe::InvoiceService::UpdateParams::Rendering), shipping_cost: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::ShippingCost))), shipping_details: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::ShippingDetails))), statement_descriptor: T.nilable(String), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::TransferData)))).void
592
- }
593
- def initialize(
594
- account_tax_ids: nil,
595
- application_fee_amount: nil,
596
- auto_advance: nil,
597
- automatic_tax: nil,
598
- automatically_finalizes_at: nil,
599
- collection_method: nil,
600
- custom_fields: nil,
601
- days_until_due: nil,
602
- default_payment_method: nil,
603
- default_source: nil,
604
- default_tax_rates: nil,
605
- description: nil,
606
- discounts: nil,
607
- due_date: nil,
608
- effective_at: nil,
609
- expand: nil,
610
- footer: nil,
611
- issuer: nil,
612
- metadata: nil,
613
- number: nil,
614
- on_behalf_of: nil,
615
- payment_settings: nil,
616
- rendering: nil,
617
- shipping_cost: nil,
618
- shipping_details: nil,
619
- statement_descriptor: nil,
620
- transfer_data: nil
621
- ); end
622
- end
623
- class ListParams < Stripe::RequestParams
624
- class Created < Stripe::RequestParams
625
- # Minimum value to filter by (exclusive)
626
- sig { returns(T.nilable(Integer)) }
627
- attr_accessor :gt
628
- # Minimum value to filter by (inclusive)
629
- sig { returns(T.nilable(Integer)) }
630
- attr_accessor :gte
631
- # Maximum value to filter by (exclusive)
632
- sig { returns(T.nilable(Integer)) }
633
- attr_accessor :lt
634
- # Maximum value to filter by (inclusive)
635
- sig { returns(T.nilable(Integer)) }
636
- attr_accessor :lte
637
- sig {
638
- params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
639
- }
640
- def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
641
- end
642
- class DueDate < Stripe::RequestParams
643
- # Minimum value to filter by (exclusive)
644
- sig { returns(T.nilable(Integer)) }
645
- attr_accessor :gt
646
- # Minimum value to filter by (inclusive)
647
- sig { returns(T.nilable(Integer)) }
648
- attr_accessor :gte
649
- # Maximum value to filter by (exclusive)
650
- sig { returns(T.nilable(Integer)) }
651
- attr_accessor :lt
652
- # Maximum value to filter by (inclusive)
653
- sig { returns(T.nilable(Integer)) }
654
- attr_accessor :lte
655
- sig {
656
- params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
657
- }
658
- def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
659
- end
660
- # The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`.
661
- sig { returns(T.nilable(String)) }
662
- attr_accessor :collection_method
663
- # Only return invoices that were created during the given date interval.
664
- sig { returns(T.nilable(T.any(::Stripe::InvoiceService::ListParams::Created, Integer))) }
665
- attr_accessor :created
666
- # Only return invoices for the customer specified by this customer ID.
667
- sig { returns(T.nilable(String)) }
668
- attr_accessor :customer
669
- # Attribute for param field due_date
670
- sig { returns(T.nilable(T.any(::Stripe::InvoiceService::ListParams::DueDate, Integer))) }
671
- attr_accessor :due_date
672
- # 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.
673
- sig { returns(T.nilable(String)) }
674
- attr_accessor :ending_before
675
- # Specifies which fields in the response should be expanded.
676
- sig { returns(T.nilable(T::Array[String])) }
677
- attr_accessor :expand
678
- # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
679
- sig { returns(T.nilable(Integer)) }
680
- attr_accessor :limit
681
- # 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.
682
- sig { returns(T.nilable(String)) }
683
- attr_accessor :starting_after
684
- # The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)
685
- sig { returns(T.nilable(String)) }
686
- attr_accessor :status
687
- # Only return invoices for the subscription specified by this subscription ID.
688
- sig { returns(T.nilable(String)) }
689
- attr_accessor :subscription
690
- sig {
691
- params(collection_method: T.nilable(String), created: T.nilable(T.any(::Stripe::InvoiceService::ListParams::Created, Integer)), customer: T.nilable(String), due_date: T.nilable(T.any(::Stripe::InvoiceService::ListParams::DueDate, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String), subscription: T.nilable(String)).void
692
- }
693
- def initialize(
694
- collection_method: nil,
695
- created: nil,
696
- customer: nil,
697
- due_date: nil,
698
- ending_before: nil,
699
- expand: nil,
700
- limit: nil,
701
- starting_after: nil,
702
- status: nil,
703
- subscription: nil
704
- ); end
705
- end
706
- class CreateParams < Stripe::RequestParams
707
- class AutomaticTax < Stripe::RequestParams
708
- class Liability < Stripe::RequestParams
709
- # The connected account being referenced when `type` is `account`.
710
- sig { returns(T.nilable(String)) }
711
- attr_accessor :account
712
- # Type of the account referenced in the request.
713
- sig { returns(String) }
714
- attr_accessor :type
715
- sig { params(account: T.nilable(String), type: String).void }
716
- def initialize(account: nil, type: nil); end
717
- end
718
- # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
719
- sig { returns(T::Boolean) }
720
- attr_accessor :enabled
721
- # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
722
- sig { returns(T.nilable(::Stripe::InvoiceService::CreateParams::AutomaticTax::Liability)) }
723
- attr_accessor :liability
724
- sig {
725
- params(enabled: T::Boolean, liability: T.nilable(::Stripe::InvoiceService::CreateParams::AutomaticTax::Liability)).void
726
- }
727
- def initialize(enabled: nil, liability: nil); end
728
- end
729
- class CustomField < Stripe::RequestParams
730
- # The name of the custom field. This may be up to 40 characters.
731
- sig { returns(String) }
732
- attr_accessor :name
733
- # The value of the custom field. This may be up to 140 characters.
734
- sig { returns(String) }
735
- attr_accessor :value
736
- sig { params(name: String, value: String).void }
737
- def initialize(name: nil, value: nil); end
738
- end
739
- class Discount < Stripe::RequestParams
740
- # ID of the coupon to create a new discount for.
741
- sig { returns(T.nilable(String)) }
742
- attr_accessor :coupon
743
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
744
- sig { returns(T.nilable(String)) }
745
- attr_accessor :discount
746
- # ID of the promotion code to create a new discount for.
747
- sig { returns(T.nilable(String)) }
748
- attr_accessor :promotion_code
749
- sig {
750
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
751
- }
752
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
753
- end
754
- class FromInvoice < Stripe::RequestParams
755
- # The relation between the new invoice and the original invoice. Currently, only 'revision' is permitted
756
- sig { returns(String) }
757
- attr_accessor :action
758
- # The `id` of the invoice that will be cloned.
759
- sig { returns(String) }
760
- attr_accessor :invoice
761
- sig { params(action: String, invoice: String).void }
762
- def initialize(action: nil, invoice: nil); end
763
- end
764
- class Issuer < Stripe::RequestParams
765
- # The connected account being referenced when `type` is `account`.
766
- sig { returns(T.nilable(String)) }
767
- attr_accessor :account
768
- # Type of the account referenced in the request.
769
- sig { returns(String) }
770
- attr_accessor :type
771
- sig { params(account: T.nilable(String), type: String).void }
772
- def initialize(account: nil, type: nil); end
773
- end
774
- class PaymentSettings < Stripe::RequestParams
775
- class PaymentMethodOptions < Stripe::RequestParams
776
- class AcssDebit < Stripe::RequestParams
777
- class MandateOptions < Stripe::RequestParams
778
- # Transaction type of the mandate.
779
- sig { returns(T.nilable(String)) }
780
- attr_accessor :transaction_type
781
- sig { params(transaction_type: T.nilable(String)).void }
782
- def initialize(transaction_type: nil); end
783
- end
784
- # Additional fields for Mandate creation
785
- sig {
786
- returns(T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions))
787
- }
788
- attr_accessor :mandate_options
789
- # Verification method for the intent
790
- sig { returns(T.nilable(String)) }
791
- attr_accessor :verification_method
792
- sig {
793
- params(mandate_options: T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions), verification_method: T.nilable(String)).void
794
- }
795
- def initialize(mandate_options: nil, verification_method: nil); end
796
- end
797
- class Bancontact < Stripe::RequestParams
798
- # Preferred language of the Bancontact authorization page that the customer is redirected to.
799
- sig { returns(T.nilable(String)) }
800
- attr_accessor :preferred_language
801
- sig { params(preferred_language: T.nilable(String)).void }
802
- def initialize(preferred_language: nil); end
803
- end
804
- class Card < Stripe::RequestParams
805
- class Installments < Stripe::RequestParams
806
- class Plan < Stripe::RequestParams
807
- # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
808
- sig { returns(T.nilable(Integer)) }
809
- attr_accessor :count
810
- # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
811
- # One of `month`.
812
- sig { returns(T.nilable(String)) }
813
- attr_accessor :interval
814
- # Type of installment plan, one of `fixed_count`.
815
- sig { returns(String) }
816
- attr_accessor :type
817
- sig {
818
- params(count: T.nilable(Integer), interval: T.nilable(String), type: String).void
819
- }
820
- def initialize(count: nil, interval: nil, type: nil); end
821
- end
822
- # Setting to true enables installments for this invoice.
823
- # Setting to false will prevent any selected plan from applying to a payment.
824
- sig { returns(T.nilable(T::Boolean)) }
825
- attr_accessor :enabled
826
- # The selected installment plan to use for this invoice.
827
- sig {
828
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::Card::Installments::Plan))))
829
- }
830
- attr_accessor :plan
831
- sig {
832
- params(enabled: T.nilable(T::Boolean), plan: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::Card::Installments::Plan)))).void
833
- }
834
- def initialize(enabled: nil, plan: nil); end
835
- end
836
- # Installment configuration for payments attempted on this invoice (Mexico Only).
837
- #
838
- # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
839
- sig {
840
- returns(T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::Card::Installments))
841
- }
842
- attr_accessor :installments
843
- # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
844
- sig { returns(T.nilable(String)) }
845
- attr_accessor :request_three_d_secure
846
- sig {
847
- params(installments: T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::Card::Installments), request_three_d_secure: T.nilable(String)).void
848
- }
849
- def initialize(installments: nil, request_three_d_secure: nil); end
850
- end
851
- class CustomerBalance < Stripe::RequestParams
852
- class BankTransfer < Stripe::RequestParams
853
- class EuBankTransfer < Stripe::RequestParams
854
- # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
855
- sig { returns(String) }
856
- attr_accessor :country
857
- sig { params(country: String).void }
858
- def initialize(country: nil); end
859
- end
860
- # Configuration for eu_bank_transfer funding type.
861
- sig {
862
- returns(T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer))
863
- }
864
- attr_accessor :eu_bank_transfer
865
- # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
866
- sig { returns(T.nilable(String)) }
867
- attr_accessor :type
868
- sig {
869
- params(eu_bank_transfer: T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer), type: T.nilable(String)).void
870
- }
871
- def initialize(eu_bank_transfer: nil, type: nil); end
872
- end
873
- # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
874
- sig {
875
- returns(T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer))
876
- }
877
- attr_accessor :bank_transfer
878
- # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
879
- sig { returns(T.nilable(String)) }
880
- attr_accessor :funding_type
881
- sig {
882
- params(bank_transfer: T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer), funding_type: T.nilable(String)).void
883
- }
884
- def initialize(bank_transfer: nil, funding_type: nil); end
885
- end
886
- class Konbini < Stripe::RequestParams
887
-
888
- end
889
- class SepaDebit < Stripe::RequestParams
890
-
891
- end
892
- class UsBankAccount < Stripe::RequestParams
893
- class FinancialConnections < Stripe::RequestParams
894
- class Filters < Stripe::RequestParams
895
- # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
896
- sig { returns(T.nilable(T::Array[String])) }
897
- attr_accessor :account_subcategories
898
- sig { params(account_subcategories: T.nilable(T::Array[String])).void }
899
- def initialize(account_subcategories: nil); end
900
- end
901
- # Provide filters for the linked accounts that the customer can select for the payment method.
902
- sig {
903
- returns(T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
904
- }
905
- attr_accessor :filters
906
- # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
907
- sig { returns(T.nilable(T::Array[String])) }
908
- attr_accessor :permissions
909
- # List of data features that you would like to retrieve upon account creation.
910
- sig { returns(T.nilable(T::Array[String])) }
911
- attr_accessor :prefetch
912
- sig {
913
- params(filters: T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String])).void
914
- }
915
- def initialize(filters: nil, permissions: nil, prefetch: nil); end
916
- end
917
- # Additional fields for Financial Connections Session creation
918
- sig {
919
- returns(T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections))
920
- }
921
- attr_accessor :financial_connections
922
- # Verification method for the intent
923
- sig { returns(T.nilable(String)) }
924
- attr_accessor :verification_method
925
- sig {
926
- params(financial_connections: T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections), verification_method: T.nilable(String)).void
927
- }
928
- def initialize(financial_connections: nil, verification_method: nil); end
929
- end
930
- # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
931
- sig {
932
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))))
933
- }
934
- attr_accessor :acss_debit
935
- # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
936
- sig {
937
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact))))
938
- }
939
- attr_accessor :bancontact
940
- # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
941
- sig {
942
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::Card))))
943
- }
944
- attr_accessor :card
945
- # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
946
- sig {
947
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))))
948
- }
949
- attr_accessor :customer_balance
950
- # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
951
- sig {
952
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini))))
953
- }
954
- attr_accessor :konbini
955
- # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
956
- sig {
957
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))))
958
- }
959
- attr_accessor :sepa_debit
960
- # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
961
- sig {
962
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount))))
963
- }
964
- attr_accessor :us_bank_account
965
- sig {
966
- params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact))), card: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::Card))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)))).void
967
- }
968
- def initialize(
969
- acss_debit: nil,
970
- bancontact: nil,
971
- card: nil,
972
- customer_balance: nil,
973
- konbini: nil,
974
- sepa_debit: nil,
975
- us_bank_account: nil
976
- ); end
977
- end
978
- # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set.
979
- sig { returns(T.nilable(T.nilable(String))) }
980
- attr_accessor :default_mandate
981
- # Payment-method-specific configuration to provide to the invoice’s PaymentIntent.
982
- sig {
983
- returns(T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions))
984
- }
985
- attr_accessor :payment_method_options
986
- # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration
987
- sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
988
- attr_accessor :payment_method_types
989
- sig {
990
- params(default_mandate: T.nilable(T.nilable(String)), payment_method_options: T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions), payment_method_types: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
991
- }
992
- def initialize(
993
- default_mandate: nil,
994
- payment_method_options: nil,
995
- payment_method_types: nil
996
- ); end
997
- end
998
- class Rendering < Stripe::RequestParams
999
- class Pdf < Stripe::RequestParams
1000
- # Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`.
1001
- # If set to `auto`, invoice PDF page size defaults to `a4` for customers with
1002
- # Japanese locale and `letter` for customers with other locales.
1003
- sig { returns(T.nilable(String)) }
1004
- attr_accessor :page_size
1005
- sig { params(page_size: T.nilable(String)).void }
1006
- def initialize(page_size: nil); end
1007
- end
1008
- # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
1009
- sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
1010
- attr_accessor :amount_tax_display
1011
- # Invoice pdf rendering options
1012
- sig { returns(T.nilable(::Stripe::InvoiceService::CreateParams::Rendering::Pdf)) }
1013
- attr_accessor :pdf
1014
- # ID of the invoice rendering template to use for this invoice.
1015
- sig { returns(T.nilable(String)) }
1016
- attr_accessor :template
1017
- # The specific version of invoice rendering template to use for this invoice.
1018
- sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
1019
- attr_accessor :template_version
1020
- sig {
1021
- params(amount_tax_display: T.nilable(T.nilable(T.any(String, String))), pdf: T.nilable(::Stripe::InvoiceService::CreateParams::Rendering::Pdf), template: T.nilable(String), template_version: T.nilable(T.nilable(T.any(String, Integer)))).void
1022
- }
1023
- def initialize(amount_tax_display: nil, pdf: nil, template: nil, template_version: nil); end
1024
- end
1025
- class ShippingCost < Stripe::RequestParams
1026
- class ShippingRateData < Stripe::RequestParams
1027
- class DeliveryEstimate < Stripe::RequestParams
1028
- class Maximum < Stripe::RequestParams
1029
- # A unit of time.
1030
- sig { returns(String) }
1031
- attr_accessor :unit
1032
- # Must be greater than 0.
1033
- sig { returns(Integer) }
1034
- attr_accessor :value
1035
- sig { params(unit: String, value: Integer).void }
1036
- def initialize(unit: nil, value: nil); end
1037
- end
1038
- class Minimum < Stripe::RequestParams
1039
- # A unit of time.
1040
- sig { returns(String) }
1041
- attr_accessor :unit
1042
- # Must be greater than 0.
1043
- sig { returns(Integer) }
1044
- attr_accessor :value
1045
- sig { params(unit: String, value: Integer).void }
1046
- def initialize(unit: nil, value: nil); end
1047
- end
1048
- # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
1049
- sig {
1050
- returns(T.nilable(::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum))
1051
- }
1052
- attr_accessor :maximum
1053
- # The lower bound of the estimated range. If empty, represents no lower bound.
1054
- sig {
1055
- returns(T.nilable(::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum))
1056
- }
1057
- attr_accessor :minimum
1058
- sig {
1059
- params(maximum: T.nilable(::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum), minimum: T.nilable(::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum)).void
1060
- }
1061
- def initialize(maximum: nil, minimum: nil); end
1062
- end
1063
- class FixedAmount < Stripe::RequestParams
1064
- class CurrencyOptions < Stripe::RequestParams
1065
- # A non-negative integer in cents representing how much to charge.
1066
- sig { returns(Integer) }
1067
- attr_accessor :amount
1068
- # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
1069
- sig { returns(T.nilable(String)) }
1070
- attr_accessor :tax_behavior
1071
- sig { params(amount: Integer, tax_behavior: T.nilable(String)).void }
1072
- def initialize(amount: nil, tax_behavior: nil); end
1073
- end
1074
- # A non-negative integer in cents representing how much to charge.
1075
- sig { returns(Integer) }
1076
- attr_accessor :amount
1077
- # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
1078
- sig { returns(String) }
1079
- attr_accessor :currency
1080
- # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
1081
- sig {
1082
- returns(T.nilable(T::Hash[String, ::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions]))
1083
- }
1084
- attr_accessor :currency_options
1085
- sig {
1086
- params(amount: Integer, currency: String, currency_options: T.nilable(T::Hash[String, ::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions])).void
1087
- }
1088
- def initialize(amount: nil, currency: nil, currency_options: nil); end
1089
- end
1090
- # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
1091
- sig {
1092
- returns(T.nilable(::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate))
1093
- }
1094
- attr_accessor :delivery_estimate
1095
- # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
1096
- sig { returns(String) }
1097
- attr_accessor :display_name
1098
- # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
1099
- sig {
1100
- returns(T.nilable(::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData::FixedAmount))
1101
- }
1102
- attr_accessor :fixed_amount
1103
- # 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`.
1104
- sig { returns(T.nilable(T::Hash[String, String])) }
1105
- attr_accessor :metadata
1106
- # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
1107
- sig { returns(T.nilable(String)) }
1108
- attr_accessor :tax_behavior
1109
- # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
1110
- sig { returns(T.nilable(String)) }
1111
- attr_accessor :tax_code
1112
- # The type of calculation to use on the shipping rate.
1113
- sig { returns(T.nilable(String)) }
1114
- attr_accessor :type
1115
- sig {
1116
- params(delivery_estimate: T.nilable(::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate), display_name: String, fixed_amount: T.nilable(::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData::FixedAmount), metadata: T.nilable(T::Hash[String, String]), tax_behavior: T.nilable(String), tax_code: T.nilable(String), type: T.nilable(String)).void
1117
- }
1118
- def initialize(
1119
- delivery_estimate: nil,
1120
- display_name: nil,
1121
- fixed_amount: nil,
1122
- metadata: nil,
1123
- tax_behavior: nil,
1124
- tax_code: nil,
1125
- type: nil
1126
- ); end
1127
- end
1128
- # The ID of the shipping rate to use for this order.
1129
- sig { returns(T.nilable(String)) }
1130
- attr_accessor :shipping_rate
1131
- # Parameters to create a new ad-hoc shipping rate for this order.
1132
- sig {
1133
- returns(T.nilable(::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData))
1134
- }
1135
- attr_accessor :shipping_rate_data
1136
- sig {
1137
- params(shipping_rate: T.nilable(String), shipping_rate_data: T.nilable(::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData)).void
1138
- }
1139
- def initialize(shipping_rate: nil, shipping_rate_data: nil); end
1140
- end
1141
- class ShippingDetails < Stripe::RequestParams
1142
- class Address < Stripe::RequestParams
1143
- # City, district, suburb, town, or village.
1144
- sig { returns(T.nilable(String)) }
1145
- attr_accessor :city
1146
- # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
1147
- sig { returns(T.nilable(String)) }
1148
- attr_accessor :country
1149
- # Address line 1 (e.g., street, PO Box, or company name).
1150
- sig { returns(T.nilable(String)) }
1151
- attr_accessor :line1
1152
- # Address line 2 (e.g., apartment, suite, unit, or building).
1153
- sig { returns(T.nilable(String)) }
1154
- attr_accessor :line2
1155
- # ZIP or postal code.
1156
- sig { returns(T.nilable(String)) }
1157
- attr_accessor :postal_code
1158
- # State, county, province, or region.
1159
- sig { returns(T.nilable(String)) }
1160
- attr_accessor :state
1161
- sig {
1162
- params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
1163
- }
1164
- def initialize(
1165
- city: nil,
1166
- country: nil,
1167
- line1: nil,
1168
- line2: nil,
1169
- postal_code: nil,
1170
- state: nil
1171
- ); end
1172
- end
1173
- # Shipping address
1174
- sig { returns(::Stripe::InvoiceService::CreateParams::ShippingDetails::Address) }
1175
- attr_accessor :address
1176
- # Recipient name.
1177
- sig { returns(String) }
1178
- attr_accessor :name
1179
- # Recipient phone (including extension)
1180
- sig { returns(T.nilable(T.nilable(String))) }
1181
- attr_accessor :phone
1182
- sig {
1183
- params(address: ::Stripe::InvoiceService::CreateParams::ShippingDetails::Address, name: String, phone: T.nilable(T.nilable(String))).void
1184
- }
1185
- def initialize(address: nil, name: nil, phone: nil); end
1186
- end
1187
- class TransferData < Stripe::RequestParams
1188
- # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred.
1189
- sig { returns(T.nilable(Integer)) }
1190
- attr_accessor :amount
1191
- # ID of an existing, connected Stripe account.
1192
- sig { returns(String) }
1193
- attr_accessor :destination
1194
- sig { params(amount: T.nilable(Integer), destination: String).void }
1195
- def initialize(amount: nil, destination: nil); end
1196
- end
1197
- # The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
1198
- sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
1199
- attr_accessor :account_tax_ids
1200
- # A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
1201
- sig { returns(T.nilable(Integer)) }
1202
- attr_accessor :application_fee_amount
1203
- # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action.
1204
- sig { returns(T.nilable(T::Boolean)) }
1205
- attr_accessor :auto_advance
1206
- # Settings for automatic tax lookup for this invoice.
1207
- sig { returns(T.nilable(::Stripe::InvoiceService::CreateParams::AutomaticTax)) }
1208
- attr_accessor :automatic_tax
1209
- # The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state.
1210
- sig { returns(T.nilable(Integer)) }
1211
- attr_accessor :automatically_finalizes_at
1212
- # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. Defaults to `charge_automatically`.
1213
- sig { returns(T.nilable(String)) }
1214
- attr_accessor :collection_method
1215
- # The currency to create this invoice in. Defaults to that of `customer` if not specified.
1216
- sig { returns(T.nilable(String)) }
1217
- attr_accessor :currency
1218
- # A list of up to 4 custom fields to be displayed on the invoice.
1219
- sig {
1220
- returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreateParams::CustomField]))))
1221
- }
1222
- attr_accessor :custom_fields
1223
- # The ID of the customer who will be billed.
1224
- sig { returns(T.nilable(String)) }
1225
- attr_accessor :customer
1226
- # The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.
1227
- sig { returns(T.nilable(Integer)) }
1228
- attr_accessor :days_until_due
1229
- # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
1230
- sig { returns(T.nilable(String)) }
1231
- attr_accessor :default_payment_method
1232
- # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
1233
- sig { returns(T.nilable(String)) }
1234
- attr_accessor :default_source
1235
- # The tax rates that will apply to any line item that does not have `tax_rates` set.
1236
- sig { returns(T.nilable(T::Array[String])) }
1237
- attr_accessor :default_tax_rates
1238
- # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
1239
- sig { returns(T.nilable(String)) }
1240
- attr_accessor :description
1241
- # The coupons and promotion codes to redeem into discounts for the invoice. If not specified, inherits the discount from the invoice's customer. Pass an empty string to avoid inheriting any discounts.
1242
- sig {
1243
- returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreateParams::Discount]))))
1244
- }
1245
- attr_accessor :discounts
1246
- # The date on which payment for this invoice is due. Valid only for invoices where `collection_method=send_invoice`.
1247
- sig { returns(T.nilable(Integer)) }
1248
- attr_accessor :due_date
1249
- # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt.
1250
- sig { returns(T.nilable(Integer)) }
1251
- attr_accessor :effective_at
1252
- # Specifies which fields in the response should be expanded.
1253
- sig { returns(T.nilable(T::Array[String])) }
1254
- attr_accessor :expand
1255
- # Footer to be displayed on the invoice.
1256
- sig { returns(T.nilable(String)) }
1257
- attr_accessor :footer
1258
- # Revise an existing invoice. The new invoice will be created in `status=draft`. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details.
1259
- sig { returns(T.nilable(::Stripe::InvoiceService::CreateParams::FromInvoice)) }
1260
- attr_accessor :from_invoice
1261
- # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
1262
- sig { returns(T.nilable(::Stripe::InvoiceService::CreateParams::Issuer)) }
1263
- attr_accessor :issuer
1264
- # 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`.
1265
- sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
1266
- attr_accessor :metadata
1267
- # Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically.
1268
- sig { returns(T.nilable(String)) }
1269
- attr_accessor :number
1270
- # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.
1271
- sig { returns(T.nilable(String)) }
1272
- attr_accessor :on_behalf_of
1273
- # Configuration settings for the PaymentIntent that is generated when the invoice is finalized.
1274
- sig { returns(T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings)) }
1275
- attr_accessor :payment_settings
1276
- # How to handle pending invoice items on invoice creation. Defaults to `exclude` if the parameter is omitted.
1277
- sig { returns(T.nilable(String)) }
1278
- attr_accessor :pending_invoice_items_behavior
1279
- # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
1280
- sig { returns(T.nilable(::Stripe::InvoiceService::CreateParams::Rendering)) }
1281
- attr_accessor :rendering
1282
- # Settings for the cost of shipping for this invoice.
1283
- sig { returns(T.nilable(::Stripe::InvoiceService::CreateParams::ShippingCost)) }
1284
- attr_accessor :shipping_cost
1285
- # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer.
1286
- sig { returns(T.nilable(::Stripe::InvoiceService::CreateParams::ShippingDetails)) }
1287
- attr_accessor :shipping_details
1288
- # Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`.
1289
- sig { returns(T.nilable(String)) }
1290
- attr_accessor :statement_descriptor
1291
- # The ID of the subscription to invoice, if any. If set, the created invoice will only include pending invoice items for that subscription. The subscription's billing cycle and regular subscription events won't be affected.
1292
- sig { returns(T.nilable(String)) }
1293
- attr_accessor :subscription
1294
- # If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge.
1295
- sig { returns(T.nilable(::Stripe::InvoiceService::CreateParams::TransferData)) }
1296
- attr_accessor :transfer_data
1297
- sig {
1298
- params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), application_fee_amount: T.nilable(Integer), auto_advance: T.nilable(T::Boolean), automatic_tax: T.nilable(::Stripe::InvoiceService::CreateParams::AutomaticTax), automatically_finalizes_at: T.nilable(Integer), collection_method: T.nilable(String), currency: T.nilable(String), custom_fields: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreateParams::CustomField]))), customer: T.nilable(String), days_until_due: T.nilable(Integer), default_payment_method: T.nilable(String), default_source: T.nilable(String), default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreateParams::Discount]))), due_date: T.nilable(Integer), effective_at: T.nilable(Integer), expand: T.nilable(T::Array[String]), footer: T.nilable(String), from_invoice: T.nilable(::Stripe::InvoiceService::CreateParams::FromInvoice), issuer: T.nilable(::Stripe::InvoiceService::CreateParams::Issuer), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), number: T.nilable(String), on_behalf_of: T.nilable(String), payment_settings: T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings), pending_invoice_items_behavior: T.nilable(String), rendering: T.nilable(::Stripe::InvoiceService::CreateParams::Rendering), shipping_cost: T.nilable(::Stripe::InvoiceService::CreateParams::ShippingCost), shipping_details: T.nilable(::Stripe::InvoiceService::CreateParams::ShippingDetails), statement_descriptor: T.nilable(String), subscription: T.nilable(String), transfer_data: T.nilable(::Stripe::InvoiceService::CreateParams::TransferData)).void
1299
- }
1300
- def initialize(
1301
- account_tax_ids: nil,
1302
- application_fee_amount: nil,
1303
- auto_advance: nil,
1304
- automatic_tax: nil,
1305
- automatically_finalizes_at: nil,
1306
- collection_method: nil,
1307
- currency: nil,
1308
- custom_fields: nil,
1309
- customer: nil,
1310
- days_until_due: nil,
1311
- default_payment_method: nil,
1312
- default_source: nil,
1313
- default_tax_rates: nil,
1314
- description: nil,
1315
- discounts: nil,
1316
- due_date: nil,
1317
- effective_at: nil,
1318
- expand: nil,
1319
- footer: nil,
1320
- from_invoice: nil,
1321
- issuer: nil,
1322
- metadata: nil,
1323
- number: nil,
1324
- on_behalf_of: nil,
1325
- payment_settings: nil,
1326
- pending_invoice_items_behavior: nil,
1327
- rendering: nil,
1328
- shipping_cost: nil,
1329
- shipping_details: nil,
1330
- statement_descriptor: nil,
1331
- subscription: nil,
1332
- transfer_data: nil
1333
- ); end
1334
- end
1335
- class SearchParams < Stripe::RequestParams
1336
- # Specifies which fields in the response should be expanded.
1337
- sig { returns(T.nilable(T::Array[String])) }
1338
- attr_accessor :expand
1339
- # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
1340
- sig { returns(T.nilable(Integer)) }
1341
- attr_accessor :limit
1342
- # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
1343
- sig { returns(T.nilable(String)) }
1344
- attr_accessor :page
1345
- # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for invoices](https://stripe.com/docs/search#query-fields-for-invoices).
1346
- sig { returns(String) }
1347
- attr_accessor :query
1348
- sig {
1349
- params(expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), page: T.nilable(String), query: String).void
1350
- }
1351
- def initialize(expand: nil, limit: nil, page: nil, query: nil); end
1352
- end
1353
- class AddLinesParams < Stripe::RequestParams
1354
- class Line < Stripe::RequestParams
1355
- class Discount < Stripe::RequestParams
1356
- # ID of the coupon to create a new discount for.
1357
- sig { returns(T.nilable(String)) }
1358
- attr_accessor :coupon
1359
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1360
- sig { returns(T.nilable(String)) }
1361
- attr_accessor :discount
1362
- # ID of the promotion code to create a new discount for.
1363
- sig { returns(T.nilable(String)) }
1364
- attr_accessor :promotion_code
1365
- sig {
1366
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
1367
- }
1368
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
1369
- end
1370
- class Period < Stripe::RequestParams
1371
- # The end of the period, which must be greater than or equal to the start. This value is inclusive.
1372
- sig { returns(Integer) }
1373
- attr_accessor :end
1374
- # The start of the period. This value is inclusive.
1375
- sig { returns(Integer) }
1376
- attr_accessor :start
1377
- sig { params(end_: Integer, start: Integer).void }
1378
- def initialize(end_: nil, start: nil); end
1379
- end
1380
- class PriceData < Stripe::RequestParams
1381
- class ProductData < Stripe::RequestParams
1382
- # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
1383
- sig { returns(T.nilable(String)) }
1384
- attr_accessor :description
1385
- # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
1386
- sig { returns(T.nilable(T::Array[String])) }
1387
- attr_accessor :images
1388
- # 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`.
1389
- sig { returns(T.nilable(T::Hash[String, String])) }
1390
- attr_accessor :metadata
1391
- # The product's name, meant to be displayable to the customer.
1392
- sig { returns(String) }
1393
- attr_accessor :name
1394
- # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
1395
- sig { returns(T.nilable(String)) }
1396
- attr_accessor :tax_code
1397
- sig {
1398
- params(description: T.nilable(String), images: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), name: String, tax_code: T.nilable(String)).void
1399
- }
1400
- def initialize(
1401
- description: nil,
1402
- images: nil,
1403
- metadata: nil,
1404
- name: nil,
1405
- tax_code: nil
1406
- ); end
1407
- end
1408
- # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
1409
- sig { returns(String) }
1410
- attr_accessor :currency
1411
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required.
1412
- sig { returns(T.nilable(String)) }
1413
- attr_accessor :product
1414
- # Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
1415
- sig {
1416
- returns(T.nilable(::Stripe::InvoiceService::AddLinesParams::Line::PriceData::ProductData))
1417
- }
1418
- attr_accessor :product_data
1419
- # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
1420
- sig { returns(T.nilable(String)) }
1421
- attr_accessor :tax_behavior
1422
- # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
1423
- sig { returns(T.nilable(Integer)) }
1424
- attr_accessor :unit_amount
1425
- # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
1426
- sig { returns(T.nilable(String)) }
1427
- attr_accessor :unit_amount_decimal
1428
- sig {
1429
- params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::InvoiceService::AddLinesParams::Line::PriceData::ProductData), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
1430
- }
1431
- def initialize(
1432
- currency: nil,
1433
- product: nil,
1434
- product_data: nil,
1435
- tax_behavior: nil,
1436
- unit_amount: nil,
1437
- unit_amount_decimal: nil
1438
- ); end
1439
- end
1440
- class Pricing < Stripe::RequestParams
1441
- # The ID of the price object.
1442
- sig { returns(T.nilable(String)) }
1443
- attr_accessor :price
1444
- sig { params(price: T.nilable(String)).void }
1445
- def initialize(price: nil); end
1446
- end
1447
- class TaxAmount < Stripe::RequestParams
1448
- class TaxRateData < Stripe::RequestParams
1449
- # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
1450
- sig { returns(T.nilable(String)) }
1451
- attr_accessor :country
1452
- # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
1453
- sig { returns(T.nilable(String)) }
1454
- attr_accessor :description
1455
- # The display name of the tax rate, which will be shown to users.
1456
- sig { returns(String) }
1457
- attr_accessor :display_name
1458
- # This specifies if the tax rate is inclusive or exclusive.
1459
- sig { returns(T::Boolean) }
1460
- attr_accessor :inclusive
1461
- # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
1462
- sig { returns(T.nilable(String)) }
1463
- attr_accessor :jurisdiction
1464
- # The level of the jurisdiction that imposes this tax rate.
1465
- sig { returns(T.nilable(String)) }
1466
- attr_accessor :jurisdiction_level
1467
- # The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero.
1468
- sig { returns(Float) }
1469
- attr_accessor :percentage
1470
- # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States.
1471
- sig { returns(T.nilable(String)) }
1472
- attr_accessor :state
1473
- # The high-level tax type, such as `vat` or `sales_tax`.
1474
- sig { returns(T.nilable(String)) }
1475
- attr_accessor :tax_type
1476
- sig {
1477
- params(country: T.nilable(String), description: T.nilable(String), display_name: String, inclusive: T::Boolean, jurisdiction: T.nilable(String), jurisdiction_level: T.nilable(String), percentage: Float, state: T.nilable(String), tax_type: T.nilable(String)).void
1478
- }
1479
- def initialize(
1480
- country: nil,
1481
- description: nil,
1482
- display_name: nil,
1483
- inclusive: nil,
1484
- jurisdiction: nil,
1485
- jurisdiction_level: nil,
1486
- percentage: nil,
1487
- state: nil,
1488
- tax_type: nil
1489
- ); end
1490
- end
1491
- # The amount, in cents (or local equivalent), of the tax.
1492
- sig { returns(Integer) }
1493
- attr_accessor :amount
1494
- # Data to find or create a TaxRate object.
1495
- #
1496
- # Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items.
1497
- sig { returns(::Stripe::InvoiceService::AddLinesParams::Line::TaxAmount::TaxRateData) }
1498
- attr_accessor :tax_rate_data
1499
- # The reasoning behind this tax, for example, if the product is tax exempt.
1500
- sig { returns(T.nilable(String)) }
1501
- attr_accessor :taxability_reason
1502
- # The amount on which tax is calculated, in cents (or local equivalent).
1503
- sig { returns(Integer) }
1504
- attr_accessor :taxable_amount
1505
- sig {
1506
- params(amount: Integer, tax_rate_data: ::Stripe::InvoiceService::AddLinesParams::Line::TaxAmount::TaxRateData, taxability_reason: T.nilable(String), taxable_amount: Integer).void
1507
- }
1508
- def initialize(
1509
- amount: nil,
1510
- tax_rate_data: nil,
1511
- taxability_reason: nil,
1512
- taxable_amount: nil
1513
- ); end
1514
- end
1515
- # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.
1516
- sig { returns(T.nilable(Integer)) }
1517
- attr_accessor :amount
1518
- # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
1519
- sig { returns(T.nilable(String)) }
1520
- attr_accessor :description
1521
- # Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations.
1522
- sig { returns(T.nilable(T::Boolean)) }
1523
- attr_accessor :discountable
1524
- # The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
1525
- sig {
1526
- returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::AddLinesParams::Line::Discount]))))
1527
- }
1528
- attr_accessor :discounts
1529
- # ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created.
1530
- sig { returns(T.nilable(String)) }
1531
- attr_accessor :invoice_item
1532
- # 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`.
1533
- sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
1534
- attr_accessor :metadata
1535
- # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
1536
- sig { returns(T.nilable(::Stripe::InvoiceService::AddLinesParams::Line::Period)) }
1537
- attr_accessor :period
1538
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
1539
- sig { returns(T.nilable(::Stripe::InvoiceService::AddLinesParams::Line::PriceData)) }
1540
- attr_accessor :price_data
1541
- # The pricing information for the invoice item.
1542
- sig { returns(T.nilable(::Stripe::InvoiceService::AddLinesParams::Line::Pricing)) }
1543
- attr_accessor :pricing
1544
- # Non-negative integer. The quantity of units for the line item.
1545
- sig { returns(T.nilable(Integer)) }
1546
- attr_accessor :quantity
1547
- # A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts.
1548
- sig {
1549
- returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::AddLinesParams::Line::TaxAmount]))))
1550
- }
1551
- attr_accessor :tax_amounts
1552
- # The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates.
1553
- sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
1554
- attr_accessor :tax_rates
1555
- sig {
1556
- params(amount: T.nilable(Integer), description: T.nilable(String), discountable: T.nilable(T::Boolean), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::AddLinesParams::Line::Discount]))), invoice_item: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), period: T.nilable(::Stripe::InvoiceService::AddLinesParams::Line::Period), price_data: T.nilable(::Stripe::InvoiceService::AddLinesParams::Line::PriceData), pricing: T.nilable(::Stripe::InvoiceService::AddLinesParams::Line::Pricing), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::AddLinesParams::Line::TaxAmount]))), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
1557
- }
1558
- def initialize(
1559
- amount: nil,
1560
- description: nil,
1561
- discountable: nil,
1562
- discounts: nil,
1563
- invoice_item: nil,
1564
- metadata: nil,
1565
- period: nil,
1566
- price_data: nil,
1567
- pricing: nil,
1568
- quantity: nil,
1569
- tax_amounts: nil,
1570
- tax_rates: nil
1571
- ); end
1572
- end
1573
- # Specifies which fields in the response should be expanded.
1574
- sig { returns(T.nilable(T::Array[String])) }
1575
- attr_accessor :expand
1576
- # 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`.
1577
- sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
1578
- attr_accessor :invoice_metadata
1579
- # The line items to add.
1580
- sig { returns(T::Array[::Stripe::InvoiceService::AddLinesParams::Line]) }
1581
- attr_accessor :lines
1582
- sig {
1583
- params(expand: T.nilable(T::Array[String]), invoice_metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), lines: T::Array[::Stripe::InvoiceService::AddLinesParams::Line]).void
1584
- }
1585
- def initialize(expand: nil, invoice_metadata: nil, lines: nil); end
1586
- end
1587
- class FinalizeInvoiceParams < Stripe::RequestParams
1588
- # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action.
1589
- sig { returns(T.nilable(T::Boolean)) }
1590
- attr_accessor :auto_advance
1591
- # Specifies which fields in the response should be expanded.
1592
- sig { returns(T.nilable(T::Array[String])) }
1593
- attr_accessor :expand
1594
- sig { params(auto_advance: T.nilable(T::Boolean), expand: T.nilable(T::Array[String])).void }
1595
- def initialize(auto_advance: nil, expand: nil); end
1596
- end
1597
- class MarkUncollectibleParams < Stripe::RequestParams
1598
- # Specifies which fields in the response should be expanded.
1599
- sig { returns(T.nilable(T::Array[String])) }
1600
- attr_accessor :expand
1601
- sig { params(expand: T.nilable(T::Array[String])).void }
1602
- def initialize(expand: nil); end
1603
- end
1604
- class PayParams < Stripe::RequestParams
1605
- # Specifies which fields in the response should be expanded.
1606
- sig { returns(T.nilable(T::Array[String])) }
1607
- attr_accessor :expand
1608
- # In cases where the source used to pay the invoice has insufficient funds, passing `forgive=true` controls whether a charge should be attempted for the full amount available on the source, up to the amount to fully pay the invoice. This effectively forgives the difference between the amount available on the source and the amount due.
1609
- #
1610
- # Passing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`.
1611
- sig { returns(T.nilable(T::Boolean)) }
1612
- attr_accessor :forgive
1613
- # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the payment_method param or the invoice's default_payment_method or default_source, if set.
1614
- sig { returns(T.nilable(T.nilable(String))) }
1615
- attr_accessor :mandate
1616
- # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session).
1617
- sig { returns(T.nilable(T::Boolean)) }
1618
- attr_accessor :off_session
1619
- # Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`.
1620
- sig { returns(T.nilable(T::Boolean)) }
1621
- attr_accessor :paid_out_of_band
1622
- # A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid.
1623
- sig { returns(T.nilable(String)) }
1624
- attr_accessor :payment_method
1625
- # A payment source to be charged. The source must be the ID of a source belonging to the customer associated with the invoice being paid.
1626
- sig { returns(T.nilable(String)) }
1627
- attr_accessor :source
1628
- sig {
1629
- params(expand: T.nilable(T::Array[String]), forgive: T.nilable(T::Boolean), mandate: T.nilable(T.nilable(String)), off_session: T.nilable(T::Boolean), paid_out_of_band: T.nilable(T::Boolean), payment_method: T.nilable(String), source: T.nilable(String)).void
1630
- }
1631
- def initialize(
1632
- expand: nil,
1633
- forgive: nil,
1634
- mandate: nil,
1635
- off_session: nil,
1636
- paid_out_of_band: nil,
1637
- payment_method: nil,
1638
- source: nil
1639
- ); end
1640
- end
1641
- class RemoveLinesParams < Stripe::RequestParams
1642
- class Line < Stripe::RequestParams
1643
- # Either `delete` or `unassign`. Deleted line items are permanently deleted. Unassigned line items can be reassigned to an invoice.
1644
- sig { returns(String) }
1645
- attr_accessor :behavior
1646
- # ID of an existing line item to remove from this invoice.
1647
- sig { returns(String) }
1648
- attr_accessor :id
1649
- sig { params(behavior: String, id: String).void }
1650
- def initialize(behavior: nil, id: nil); end
1651
- end
1652
- # Specifies which fields in the response should be expanded.
1653
- sig { returns(T.nilable(T::Array[String])) }
1654
- attr_accessor :expand
1655
- # 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`.
1656
- sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
1657
- attr_accessor :invoice_metadata
1658
- # The line items to remove.
1659
- sig { returns(T::Array[::Stripe::InvoiceService::RemoveLinesParams::Line]) }
1660
- attr_accessor :lines
1661
- sig {
1662
- params(expand: T.nilable(T::Array[String]), invoice_metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), lines: T::Array[::Stripe::InvoiceService::RemoveLinesParams::Line]).void
1663
- }
1664
- def initialize(expand: nil, invoice_metadata: nil, lines: nil); end
1665
- end
1666
- class SendInvoiceParams < Stripe::RequestParams
1667
- # Specifies which fields in the response should be expanded.
1668
- sig { returns(T.nilable(T::Array[String])) }
1669
- attr_accessor :expand
1670
- sig { params(expand: T.nilable(T::Array[String])).void }
1671
- def initialize(expand: nil); end
1672
- end
1673
- class UpdateLinesParams < Stripe::RequestParams
1674
- class Line < Stripe::RequestParams
1675
- class Discount < Stripe::RequestParams
1676
- # ID of the coupon to create a new discount for.
1677
- sig { returns(T.nilable(String)) }
1678
- attr_accessor :coupon
1679
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1680
- sig { returns(T.nilable(String)) }
1681
- attr_accessor :discount
1682
- # ID of the promotion code to create a new discount for.
1683
- sig { returns(T.nilable(String)) }
1684
- attr_accessor :promotion_code
1685
- sig {
1686
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
1687
- }
1688
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
1689
- end
1690
- class Period < Stripe::RequestParams
1691
- # The end of the period, which must be greater than or equal to the start. This value is inclusive.
1692
- sig { returns(Integer) }
1693
- attr_accessor :end
1694
- # The start of the period. This value is inclusive.
1695
- sig { returns(Integer) }
1696
- attr_accessor :start
1697
- sig { params(end_: Integer, start: Integer).void }
1698
- def initialize(end_: nil, start: nil); end
1699
- end
1700
- class PriceData < Stripe::RequestParams
1701
- class ProductData < Stripe::RequestParams
1702
- # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
1703
- sig { returns(T.nilable(String)) }
1704
- attr_accessor :description
1705
- # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
1706
- sig { returns(T.nilable(T::Array[String])) }
1707
- attr_accessor :images
1708
- # 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`.
1709
- sig { returns(T.nilable(T::Hash[String, String])) }
1710
- attr_accessor :metadata
1711
- # The product's name, meant to be displayable to the customer.
1712
- sig { returns(String) }
1713
- attr_accessor :name
1714
- # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
1715
- sig { returns(T.nilable(String)) }
1716
- attr_accessor :tax_code
1717
- sig {
1718
- params(description: T.nilable(String), images: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), name: String, tax_code: T.nilable(String)).void
1719
- }
1720
- def initialize(
1721
- description: nil,
1722
- images: nil,
1723
- metadata: nil,
1724
- name: nil,
1725
- tax_code: nil
1726
- ); end
1727
- end
1728
- # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
1729
- sig { returns(String) }
1730
- attr_accessor :currency
1731
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required.
1732
- sig { returns(T.nilable(String)) }
1733
- attr_accessor :product
1734
- # Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
1735
- sig {
1736
- returns(T.nilable(::Stripe::InvoiceService::UpdateLinesParams::Line::PriceData::ProductData))
1737
- }
1738
- attr_accessor :product_data
1739
- # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
1740
- sig { returns(T.nilable(String)) }
1741
- attr_accessor :tax_behavior
1742
- # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
1743
- sig { returns(T.nilable(Integer)) }
1744
- attr_accessor :unit_amount
1745
- # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
1746
- sig { returns(T.nilable(String)) }
1747
- attr_accessor :unit_amount_decimal
1748
- sig {
1749
- params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::InvoiceService::UpdateLinesParams::Line::PriceData::ProductData), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
1750
- }
1751
- def initialize(
1752
- currency: nil,
1753
- product: nil,
1754
- product_data: nil,
1755
- tax_behavior: nil,
1756
- unit_amount: nil,
1757
- unit_amount_decimal: nil
1758
- ); end
1759
- end
1760
- class Pricing < Stripe::RequestParams
1761
- # The ID of the price object.
1762
- sig { returns(T.nilable(String)) }
1763
- attr_accessor :price
1764
- sig { params(price: T.nilable(String)).void }
1765
- def initialize(price: nil); end
1766
- end
1767
- class TaxAmount < Stripe::RequestParams
1768
- class TaxRateData < Stripe::RequestParams
1769
- # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
1770
- sig { returns(T.nilable(String)) }
1771
- attr_accessor :country
1772
- # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
1773
- sig { returns(T.nilable(String)) }
1774
- attr_accessor :description
1775
- # The display name of the tax rate, which will be shown to users.
1776
- sig { returns(String) }
1777
- attr_accessor :display_name
1778
- # This specifies if the tax rate is inclusive or exclusive.
1779
- sig { returns(T::Boolean) }
1780
- attr_accessor :inclusive
1781
- # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
1782
- sig { returns(T.nilable(String)) }
1783
- attr_accessor :jurisdiction
1784
- # The level of the jurisdiction that imposes this tax rate.
1785
- sig { returns(T.nilable(String)) }
1786
- attr_accessor :jurisdiction_level
1787
- # The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero.
1788
- sig { returns(Float) }
1789
- attr_accessor :percentage
1790
- # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States.
1791
- sig { returns(T.nilable(String)) }
1792
- attr_accessor :state
1793
- # The high-level tax type, such as `vat` or `sales_tax`.
1794
- sig { returns(T.nilable(String)) }
1795
- attr_accessor :tax_type
1796
- sig {
1797
- params(country: T.nilable(String), description: T.nilable(String), display_name: String, inclusive: T::Boolean, jurisdiction: T.nilable(String), jurisdiction_level: T.nilable(String), percentage: Float, state: T.nilable(String), tax_type: T.nilable(String)).void
1798
- }
1799
- def initialize(
1800
- country: nil,
1801
- description: nil,
1802
- display_name: nil,
1803
- inclusive: nil,
1804
- jurisdiction: nil,
1805
- jurisdiction_level: nil,
1806
- percentage: nil,
1807
- state: nil,
1808
- tax_type: nil
1809
- ); end
1810
- end
1811
- # The amount, in cents (or local equivalent), of the tax.
1812
- sig { returns(Integer) }
1813
- attr_accessor :amount
1814
- # Data to find or create a TaxRate object.
1815
- #
1816
- # Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items.
1817
- sig { returns(::Stripe::InvoiceService::UpdateLinesParams::Line::TaxAmount::TaxRateData) }
1818
- attr_accessor :tax_rate_data
1819
- # The reasoning behind this tax, for example, if the product is tax exempt.
1820
- sig { returns(T.nilable(String)) }
1821
- attr_accessor :taxability_reason
1822
- # The amount on which tax is calculated, in cents (or local equivalent).
1823
- sig { returns(Integer) }
1824
- attr_accessor :taxable_amount
1825
- sig {
1826
- params(amount: Integer, tax_rate_data: ::Stripe::InvoiceService::UpdateLinesParams::Line::TaxAmount::TaxRateData, taxability_reason: T.nilable(String), taxable_amount: Integer).void
1827
- }
1828
- def initialize(
1829
- amount: nil,
1830
- tax_rate_data: nil,
1831
- taxability_reason: nil,
1832
- taxable_amount: nil
1833
- ); end
1834
- end
1835
- # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.
1836
- sig { returns(T.nilable(Integer)) }
1837
- attr_accessor :amount
1838
- # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
1839
- sig { returns(T.nilable(String)) }
1840
- attr_accessor :description
1841
- # Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations.
1842
- sig { returns(T.nilable(T::Boolean)) }
1843
- attr_accessor :discountable
1844
- # The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
1845
- sig {
1846
- returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::UpdateLinesParams::Line::Discount]))))
1847
- }
1848
- attr_accessor :discounts
1849
- # ID of an existing line item on the invoice.
1850
- sig { returns(String) }
1851
- attr_accessor :id
1852
- # 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`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
1853
- sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
1854
- attr_accessor :metadata
1855
- # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
1856
- sig { returns(T.nilable(::Stripe::InvoiceService::UpdateLinesParams::Line::Period)) }
1857
- attr_accessor :period
1858
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
1859
- sig { returns(T.nilable(::Stripe::InvoiceService::UpdateLinesParams::Line::PriceData)) }
1860
- attr_accessor :price_data
1861
- # The pricing information for the invoice item.
1862
- sig { returns(T.nilable(::Stripe::InvoiceService::UpdateLinesParams::Line::Pricing)) }
1863
- attr_accessor :pricing
1864
- # Non-negative integer. The quantity of units for the line item.
1865
- sig { returns(T.nilable(Integer)) }
1866
- attr_accessor :quantity
1867
- # A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts.
1868
- sig {
1869
- returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::UpdateLinesParams::Line::TaxAmount]))))
1870
- }
1871
- attr_accessor :tax_amounts
1872
- # The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates.
1873
- sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
1874
- attr_accessor :tax_rates
1875
- sig {
1876
- params(amount: T.nilable(Integer), description: T.nilable(String), discountable: T.nilable(T::Boolean), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::UpdateLinesParams::Line::Discount]))), id: String, metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), period: T.nilable(::Stripe::InvoiceService::UpdateLinesParams::Line::Period), price_data: T.nilable(::Stripe::InvoiceService::UpdateLinesParams::Line::PriceData), pricing: T.nilable(::Stripe::InvoiceService::UpdateLinesParams::Line::Pricing), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::UpdateLinesParams::Line::TaxAmount]))), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
1877
- }
1878
- def initialize(
1879
- amount: nil,
1880
- description: nil,
1881
- discountable: nil,
1882
- discounts: nil,
1883
- id: nil,
1884
- metadata: nil,
1885
- period: nil,
1886
- price_data: nil,
1887
- pricing: nil,
1888
- quantity: nil,
1889
- tax_amounts: nil,
1890
- tax_rates: nil
1891
- ); end
1892
- end
1893
- # Specifies which fields in the response should be expanded.
1894
- sig { returns(T.nilable(T::Array[String])) }
1895
- attr_accessor :expand
1896
- # 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`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
1897
- sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
1898
- attr_accessor :invoice_metadata
1899
- # The line items to update.
1900
- sig { returns(T::Array[::Stripe::InvoiceService::UpdateLinesParams::Line]) }
1901
- attr_accessor :lines
1902
- sig {
1903
- params(expand: T.nilable(T::Array[String]), invoice_metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), lines: T::Array[::Stripe::InvoiceService::UpdateLinesParams::Line]).void
1904
- }
1905
- def initialize(expand: nil, invoice_metadata: nil, lines: nil); end
1906
- end
1907
- class VoidInvoiceParams < Stripe::RequestParams
1908
- # Specifies which fields in the response should be expanded.
1909
- sig { returns(T.nilable(T::Array[String])) }
1910
- attr_accessor :expand
1911
- sig { params(expand: T.nilable(T::Array[String])).void }
1912
- def initialize(expand: nil); end
1913
- end
1914
- class CreatePreviewParams < Stripe::RequestParams
1915
- class AutomaticTax < Stripe::RequestParams
1916
- class Liability < Stripe::RequestParams
1917
- # The connected account being referenced when `type` is `account`.
1918
- sig { returns(T.nilable(String)) }
1919
- attr_accessor :account
1920
- # Type of the account referenced in the request.
1921
- sig { returns(String) }
1922
- attr_accessor :type
1923
- sig { params(account: T.nilable(String), type: String).void }
1924
- def initialize(account: nil, type: nil); end
1925
- end
1926
- # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
1927
- sig { returns(T::Boolean) }
1928
- attr_accessor :enabled
1929
- # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
1930
- sig {
1931
- returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::AutomaticTax::Liability))
1932
- }
1933
- attr_accessor :liability
1934
- sig {
1935
- params(enabled: T::Boolean, liability: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::AutomaticTax::Liability)).void
1936
- }
1937
- def initialize(enabled: nil, liability: nil); end
1938
- end
1939
- class CustomerDetails < Stripe::RequestParams
1940
- class Address < Stripe::RequestParams
1941
- # City, district, suburb, town, or village.
1942
- sig { returns(T.nilable(String)) }
1943
- attr_accessor :city
1944
- # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
1945
- sig { returns(T.nilable(String)) }
1946
- attr_accessor :country
1947
- # Address line 1 (e.g., street, PO Box, or company name).
1948
- sig { returns(T.nilable(String)) }
1949
- attr_accessor :line1
1950
- # Address line 2 (e.g., apartment, suite, unit, or building).
1951
- sig { returns(T.nilable(String)) }
1952
- attr_accessor :line2
1953
- # ZIP or postal code.
1954
- sig { returns(T.nilable(String)) }
1955
- attr_accessor :postal_code
1956
- # State, county, province, or region.
1957
- sig { returns(T.nilable(String)) }
1958
- attr_accessor :state
1959
- sig {
1960
- params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
1961
- }
1962
- def initialize(
1963
- city: nil,
1964
- country: nil,
1965
- line1: nil,
1966
- line2: nil,
1967
- postal_code: nil,
1968
- state: nil
1969
- ); end
1970
- end
1971
- class Shipping < Stripe::RequestParams
1972
- class Address < Stripe::RequestParams
1973
- # City, district, suburb, town, or village.
1974
- sig { returns(T.nilable(String)) }
1975
- attr_accessor :city
1976
- # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
1977
- sig { returns(T.nilable(String)) }
1978
- attr_accessor :country
1979
- # Address line 1 (e.g., street, PO Box, or company name).
1980
- sig { returns(T.nilable(String)) }
1981
- attr_accessor :line1
1982
- # Address line 2 (e.g., apartment, suite, unit, or building).
1983
- sig { returns(T.nilable(String)) }
1984
- attr_accessor :line2
1985
- # ZIP or postal code.
1986
- sig { returns(T.nilable(String)) }
1987
- attr_accessor :postal_code
1988
- # State, county, province, or region.
1989
- sig { returns(T.nilable(String)) }
1990
- attr_accessor :state
1991
- sig {
1992
- params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
1993
- }
1994
- def initialize(
1995
- city: nil,
1996
- country: nil,
1997
- line1: nil,
1998
- line2: nil,
1999
- postal_code: nil,
2000
- state: nil
2001
- ); end
2002
- end
2003
- # Customer shipping address.
2004
- sig {
2005
- returns(::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails::Shipping::Address)
2006
- }
2007
- attr_accessor :address
2008
- # Customer name.
2009
- sig { returns(String) }
2010
- attr_accessor :name
2011
- # Customer phone (including extension).
2012
- sig { returns(T.nilable(String)) }
2013
- attr_accessor :phone
2014
- sig {
2015
- params(address: ::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails::Shipping::Address, name: String, phone: T.nilable(String)).void
2016
- }
2017
- def initialize(address: nil, name: nil, phone: nil); end
2018
- end
2019
- class Tax < Stripe::RequestParams
2020
- # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes.
2021
- sig { returns(T.nilable(T.nilable(String))) }
2022
- attr_accessor :ip_address
2023
- sig { params(ip_address: T.nilable(T.nilable(String))).void }
2024
- def initialize(ip_address: nil); end
2025
- end
2026
- class TaxId < Stripe::RequestParams
2027
- # 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`
2028
- sig { returns(String) }
2029
- attr_accessor :type
2030
- # Value of the tax ID.
2031
- sig { returns(String) }
2032
- attr_accessor :value
2033
- sig { params(type: String, value: String).void }
2034
- def initialize(type: nil, value: nil); end
2035
- end
2036
- # The customer's address.
2037
- sig {
2038
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails::Address))))
2039
- }
2040
- attr_accessor :address
2041
- # The customer's shipping information. Appears on invoices emailed to this customer.
2042
- sig {
2043
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails::Shipping))))
2044
- }
2045
- attr_accessor :shipping
2046
- # Tax details about the customer.
2047
- sig {
2048
- returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails::Tax))
2049
- }
2050
- attr_accessor :tax
2051
- # The customer's tax exemption. One of `none`, `exempt`, or `reverse`.
2052
- sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
2053
- attr_accessor :tax_exempt
2054
- # The customer's tax IDs.
2055
- sig {
2056
- returns(T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails::TaxId]))
2057
- }
2058
- attr_accessor :tax_ids
2059
- sig {
2060
- params(address: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails::Address))), shipping: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails::Shipping))), tax: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails::Tax), tax_exempt: T.nilable(T.nilable(T.any(String, String))), tax_ids: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails::TaxId])).void
2061
- }
2062
- def initialize(address: nil, shipping: nil, tax: nil, tax_exempt: nil, tax_ids: nil); end
2063
- end
2064
- class Discount < Stripe::RequestParams
2065
- # ID of the coupon to create a new discount for.
2066
- sig { returns(T.nilable(String)) }
2067
- attr_accessor :coupon
2068
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
2069
- sig { returns(T.nilable(String)) }
2070
- attr_accessor :discount
2071
- # ID of the promotion code to create a new discount for.
2072
- sig { returns(T.nilable(String)) }
2073
- attr_accessor :promotion_code
2074
- sig {
2075
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
2076
- }
2077
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
2078
- end
2079
- class InvoiceItem < Stripe::RequestParams
2080
- class Discount < Stripe::RequestParams
2081
- # ID of the coupon to create a new discount for.
2082
- sig { returns(T.nilable(String)) }
2083
- attr_accessor :coupon
2084
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
2085
- sig { returns(T.nilable(String)) }
2086
- attr_accessor :discount
2087
- # ID of the promotion code to create a new discount for.
2088
- sig { returns(T.nilable(String)) }
2089
- attr_accessor :promotion_code
2090
- sig {
2091
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
2092
- }
2093
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
2094
- end
2095
- class Period < Stripe::RequestParams
2096
- # The end of the period, which must be greater than or equal to the start. This value is inclusive.
2097
- sig { returns(Integer) }
2098
- attr_accessor :end
2099
- # The start of the period. This value is inclusive.
2100
- sig { returns(Integer) }
2101
- attr_accessor :start
2102
- sig { params(end_: Integer, start: Integer).void }
2103
- def initialize(end_: nil, start: nil); end
2104
- end
2105
- class PriceData < Stripe::RequestParams
2106
- # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
2107
- sig { returns(String) }
2108
- attr_accessor :currency
2109
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
2110
- sig { returns(String) }
2111
- attr_accessor :product
2112
- # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
2113
- sig { returns(T.nilable(String)) }
2114
- attr_accessor :tax_behavior
2115
- # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
2116
- sig { returns(T.nilable(Integer)) }
2117
- attr_accessor :unit_amount
2118
- # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
2119
- sig { returns(T.nilable(String)) }
2120
- attr_accessor :unit_amount_decimal
2121
- sig {
2122
- params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
2123
- }
2124
- def initialize(
2125
- currency: nil,
2126
- product: nil,
2127
- tax_behavior: nil,
2128
- unit_amount: nil,
2129
- unit_amount_decimal: nil
2130
- ); end
2131
- end
2132
- # The integer amount in cents (or local equivalent) of previewed invoice item.
2133
- sig { returns(T.nilable(Integer)) }
2134
- attr_accessor :amount
2135
- # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Only applicable to new invoice items.
2136
- sig { returns(T.nilable(String)) }
2137
- attr_accessor :currency
2138
- # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
2139
- sig { returns(T.nilable(String)) }
2140
- attr_accessor :description
2141
- # Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items.
2142
- sig { returns(T.nilable(T::Boolean)) }
2143
- attr_accessor :discountable
2144
- # The coupons to redeem into discounts for the invoice item in the preview.
2145
- sig {
2146
- returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreatePreviewParams::InvoiceItem::Discount]))))
2147
- }
2148
- attr_accessor :discounts
2149
- # The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice.
2150
- sig { returns(T.nilable(String)) }
2151
- attr_accessor :invoiceitem
2152
- # 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`.
2153
- sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
2154
- attr_accessor :metadata
2155
- # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
2156
- sig {
2157
- returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::InvoiceItem::Period))
2158
- }
2159
- attr_accessor :period
2160
- # The ID of the price object. One of `price` or `price_data` is required.
2161
- sig { returns(T.nilable(String)) }
2162
- attr_accessor :price
2163
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
2164
- sig {
2165
- returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::InvoiceItem::PriceData))
2166
- }
2167
- attr_accessor :price_data
2168
- # Non-negative integer. The quantity of units for the invoice item.
2169
- sig { returns(T.nilable(Integer)) }
2170
- attr_accessor :quantity
2171
- # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
2172
- sig { returns(T.nilable(String)) }
2173
- attr_accessor :tax_behavior
2174
- # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
2175
- sig { returns(T.nilable(T.nilable(String))) }
2176
- attr_accessor :tax_code
2177
- # The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item.
2178
- sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
2179
- attr_accessor :tax_rates
2180
- # The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount.
2181
- sig { returns(T.nilable(Integer)) }
2182
- attr_accessor :unit_amount
2183
- # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
2184
- sig { returns(T.nilable(String)) }
2185
- attr_accessor :unit_amount_decimal
2186
- sig {
2187
- params(amount: T.nilable(Integer), currency: T.nilable(String), description: T.nilable(String), discountable: T.nilable(T::Boolean), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreatePreviewParams::InvoiceItem::Discount]))), invoiceitem: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), period: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::InvoiceItem::Period), price: T.nilable(String), price_data: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::InvoiceItem::PriceData), quantity: T.nilable(Integer), tax_behavior: T.nilable(String), tax_code: T.nilable(T.nilable(String)), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
2188
- }
2189
- def initialize(
2190
- amount: nil,
2191
- currency: nil,
2192
- description: nil,
2193
- discountable: nil,
2194
- discounts: nil,
2195
- invoiceitem: nil,
2196
- metadata: nil,
2197
- period: nil,
2198
- price: nil,
2199
- price_data: nil,
2200
- quantity: nil,
2201
- tax_behavior: nil,
2202
- tax_code: nil,
2203
- tax_rates: nil,
2204
- unit_amount: nil,
2205
- unit_amount_decimal: nil
2206
- ); end
2207
- end
2208
- class Issuer < Stripe::RequestParams
2209
- # The connected account being referenced when `type` is `account`.
2210
- sig { returns(T.nilable(String)) }
2211
- attr_accessor :account
2212
- # Type of the account referenced in the request.
2213
- sig { returns(String) }
2214
- attr_accessor :type
2215
- sig { params(account: T.nilable(String), type: String).void }
2216
- def initialize(account: nil, type: nil); end
2217
- end
2218
- class ScheduleDetails < Stripe::RequestParams
2219
- class Phase < Stripe::RequestParams
2220
- class AddInvoiceItem < Stripe::RequestParams
2221
- class Discount < Stripe::RequestParams
2222
- # ID of the coupon to create a new discount for.
2223
- sig { returns(T.nilable(String)) }
2224
- attr_accessor :coupon
2225
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
2226
- sig { returns(T.nilable(String)) }
2227
- attr_accessor :discount
2228
- # ID of the promotion code to create a new discount for.
2229
- sig { returns(T.nilable(String)) }
2230
- attr_accessor :promotion_code
2231
- sig {
2232
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
2233
- }
2234
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
2235
- end
2236
- class PriceData < Stripe::RequestParams
2237
- # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
2238
- sig { returns(String) }
2239
- attr_accessor :currency
2240
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
2241
- sig { returns(String) }
2242
- attr_accessor :product
2243
- # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
2244
- sig { returns(T.nilable(String)) }
2245
- attr_accessor :tax_behavior
2246
- # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
2247
- sig { returns(T.nilable(Integer)) }
2248
- attr_accessor :unit_amount
2249
- # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
2250
- sig { returns(T.nilable(String)) }
2251
- attr_accessor :unit_amount_decimal
2252
- sig {
2253
- params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
2254
- }
2255
- def initialize(
2256
- currency: nil,
2257
- product: nil,
2258
- tax_behavior: nil,
2259
- unit_amount: nil,
2260
- unit_amount_decimal: nil
2261
- ); end
2262
- end
2263
- # The coupons to redeem into discounts for the item.
2264
- sig {
2265
- returns(T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::Discount]))
2266
- }
2267
- attr_accessor :discounts
2268
- # The ID of the price object. One of `price` or `price_data` is required.
2269
- sig { returns(T.nilable(String)) }
2270
- attr_accessor :price
2271
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
2272
- sig {
2273
- returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::PriceData))
2274
- }
2275
- attr_accessor :price_data
2276
- # Quantity for this item. Defaults to 1.
2277
- sig { returns(T.nilable(Integer)) }
2278
- attr_accessor :quantity
2279
- # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
2280
- sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
2281
- attr_accessor :tax_rates
2282
- sig {
2283
- params(discounts: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::Discount]), price: T.nilable(String), price_data: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
2284
- }
2285
- def initialize(
2286
- discounts: nil,
2287
- price: nil,
2288
- price_data: nil,
2289
- quantity: nil,
2290
- tax_rates: nil
2291
- ); end
2292
- end
2293
- class AutomaticTax < Stripe::RequestParams
2294
- class Liability < Stripe::RequestParams
2295
- # The connected account being referenced when `type` is `account`.
2296
- sig { returns(T.nilable(String)) }
2297
- attr_accessor :account
2298
- # Type of the account referenced in the request.
2299
- sig { returns(String) }
2300
- attr_accessor :type
2301
- sig { params(account: T.nilable(String), type: String).void }
2302
- def initialize(account: nil, type: nil); end
2303
- end
2304
- # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
2305
- sig { returns(T::Boolean) }
2306
- attr_accessor :enabled
2307
- # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
2308
- sig {
2309
- returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AutomaticTax::Liability))
2310
- }
2311
- attr_accessor :liability
2312
- sig {
2313
- params(enabled: T::Boolean, liability: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AutomaticTax::Liability)).void
2314
- }
2315
- def initialize(enabled: nil, liability: nil); end
2316
- end
2317
- class Discount < Stripe::RequestParams
2318
- # ID of the coupon to create a new discount for.
2319
- sig { returns(T.nilable(String)) }
2320
- attr_accessor :coupon
2321
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
2322
- sig { returns(T.nilable(String)) }
2323
- attr_accessor :discount
2324
- # ID of the promotion code to create a new discount for.
2325
- sig { returns(T.nilable(String)) }
2326
- attr_accessor :promotion_code
2327
- sig {
2328
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
2329
- }
2330
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
2331
- end
2332
- class InvoiceSettings < Stripe::RequestParams
2333
- class Issuer < Stripe::RequestParams
2334
- # The connected account being referenced when `type` is `account`.
2335
- sig { returns(T.nilable(String)) }
2336
- attr_accessor :account
2337
- # Type of the account referenced in the request.
2338
- sig { returns(String) }
2339
- attr_accessor :type
2340
- sig { params(account: T.nilable(String), type: String).void }
2341
- def initialize(account: nil, type: nil); end
2342
- end
2343
- # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
2344
- sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
2345
- attr_accessor :account_tax_ids
2346
- # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
2347
- sig { returns(T.nilable(Integer)) }
2348
- attr_accessor :days_until_due
2349
- # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
2350
- sig {
2351
- returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::InvoiceSettings::Issuer))
2352
- }
2353
- attr_accessor :issuer
2354
- sig {
2355
- params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), days_until_due: T.nilable(Integer), issuer: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::InvoiceSettings::Issuer)).void
2356
- }
2357
- def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
2358
- end
2359
- class Item < Stripe::RequestParams
2360
- class Discount < Stripe::RequestParams
2361
- # ID of the coupon to create a new discount for.
2362
- sig { returns(T.nilable(String)) }
2363
- attr_accessor :coupon
2364
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
2365
- sig { returns(T.nilable(String)) }
2366
- attr_accessor :discount
2367
- # ID of the promotion code to create a new discount for.
2368
- sig { returns(T.nilable(String)) }
2369
- attr_accessor :promotion_code
2370
- sig {
2371
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
2372
- }
2373
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
2374
- end
2375
- class PriceData < Stripe::RequestParams
2376
- class Recurring < Stripe::RequestParams
2377
- # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
2378
- sig { returns(String) }
2379
- attr_accessor :interval
2380
- # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
2381
- sig { returns(T.nilable(Integer)) }
2382
- attr_accessor :interval_count
2383
- sig { params(interval: String, interval_count: T.nilable(Integer)).void }
2384
- def initialize(interval: nil, interval_count: nil); end
2385
- end
2386
- # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
2387
- sig { returns(String) }
2388
- attr_accessor :currency
2389
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
2390
- sig { returns(String) }
2391
- attr_accessor :product
2392
- # The recurring components of a price such as `interval` and `interval_count`.
2393
- sig {
2394
- returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item::PriceData::Recurring)
2395
- }
2396
- attr_accessor :recurring
2397
- # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
2398
- sig { returns(T.nilable(String)) }
2399
- attr_accessor :tax_behavior
2400
- # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
2401
- sig { returns(T.nilable(Integer)) }
2402
- attr_accessor :unit_amount
2403
- # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
2404
- sig { returns(T.nilable(String)) }
2405
- attr_accessor :unit_amount_decimal
2406
- sig {
2407
- params(currency: String, product: String, recurring: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
2408
- }
2409
- def initialize(
2410
- currency: nil,
2411
- product: nil,
2412
- recurring: nil,
2413
- tax_behavior: nil,
2414
- unit_amount: nil,
2415
- unit_amount_decimal: nil
2416
- ); end
2417
- end
2418
- # The coupons to redeem into discounts for the subscription item.
2419
- sig {
2420
- returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item::Discount]))))
2421
- }
2422
- attr_accessor :discounts
2423
- # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
2424
- sig { returns(T.nilable(T::Hash[String, String])) }
2425
- attr_accessor :metadata
2426
- # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
2427
- sig { returns(T.nilable(String)) }
2428
- attr_accessor :plan
2429
- # The ID of the price object.
2430
- sig { returns(T.nilable(String)) }
2431
- attr_accessor :price
2432
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
2433
- sig {
2434
- returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item::PriceData))
2435
- }
2436
- attr_accessor :price_data
2437
- # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
2438
- sig { returns(T.nilable(Integer)) }
2439
- attr_accessor :quantity
2440
- # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
2441
- sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
2442
- attr_accessor :tax_rates
2443
- sig {
2444
- params(discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item::Discount]))), metadata: T.nilable(T::Hash[String, String]), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
2445
- }
2446
- def initialize(
2447
- discounts: nil,
2448
- metadata: nil,
2449
- plan: nil,
2450
- price: nil,
2451
- price_data: nil,
2452
- quantity: nil,
2453
- tax_rates: nil
2454
- ); end
2455
- end
2456
- class TransferData < Stripe::RequestParams
2457
- # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
2458
- sig { returns(T.nilable(Float)) }
2459
- attr_accessor :amount_percent
2460
- # ID of an existing, connected Stripe account.
2461
- sig { returns(String) }
2462
- attr_accessor :destination
2463
- sig { params(amount_percent: T.nilable(Float), destination: String).void }
2464
- def initialize(amount_percent: nil, destination: nil); end
2465
- end
2466
- # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
2467
- sig {
2468
- returns(T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem]))
2469
- }
2470
- attr_accessor :add_invoice_items
2471
- # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
2472
- sig { returns(T.nilable(Float)) }
2473
- attr_accessor :application_fee_percent
2474
- # Automatic tax settings for this phase.
2475
- sig {
2476
- returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AutomaticTax))
2477
- }
2478
- attr_accessor :automatic_tax
2479
- # 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).
2480
- sig { returns(T.nilable(String)) }
2481
- attr_accessor :billing_cycle_anchor
2482
- # 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.
2483
- sig { returns(T.nilable(String)) }
2484
- attr_accessor :collection_method
2485
- # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
2486
- sig { returns(T.nilable(String)) }
2487
- attr_accessor :currency
2488
- # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
2489
- sig { returns(T.nilable(String)) }
2490
- attr_accessor :default_payment_method
2491
- # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase.
2492
- sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
2493
- attr_accessor :default_tax_rates
2494
- # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
2495
- sig { returns(T.nilable(T.nilable(String))) }
2496
- attr_accessor :description
2497
- # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
2498
- sig {
2499
- returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Discount]))))
2500
- }
2501
- attr_accessor :discounts
2502
- # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
2503
- sig { returns(T.nilable(T.any(Integer, String))) }
2504
- attr_accessor :end_date
2505
- # All invoices will be billed using the specified settings.
2506
- sig {
2507
- returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::InvoiceSettings))
2508
- }
2509
- attr_accessor :invoice_settings
2510
- # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
2511
- sig {
2512
- returns(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item])
2513
- }
2514
- attr_accessor :items
2515
- # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set.
2516
- sig { returns(T.nilable(Integer)) }
2517
- attr_accessor :iterations
2518
- # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
2519
- sig { returns(T.nilable(T::Hash[String, String])) }
2520
- attr_accessor :metadata
2521
- # The account on behalf of which to charge, for each of the associated subscription's invoices.
2522
- sig { returns(T.nilable(String)) }
2523
- attr_accessor :on_behalf_of
2524
- # 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.
2525
- sig { returns(T.nilable(String)) }
2526
- attr_accessor :proration_behavior
2527
- # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
2528
- sig { returns(T.nilable(T.any(Integer, String))) }
2529
- attr_accessor :start_date
2530
- # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
2531
- sig {
2532
- returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::TransferData))
2533
- }
2534
- attr_accessor :transfer_data
2535
- # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
2536
- sig { returns(T.nilable(T::Boolean)) }
2537
- attr_accessor :trial
2538
- # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
2539
- sig { returns(T.nilable(T.any(Integer, String))) }
2540
- attr_accessor :trial_end
2541
- sig {
2542
- params(add_invoice_items: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem]), application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::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::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Discount]))), end_date: T.nilable(T.any(Integer, String)), invoice_settings: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::InvoiceSettings), items: T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::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::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::TransferData), trial: T.nilable(T::Boolean), trial_end: T.nilable(T.any(Integer, String))).void
2543
- }
2544
- def initialize(
2545
- add_invoice_items: nil,
2546
- application_fee_percent: nil,
2547
- automatic_tax: nil,
2548
- billing_cycle_anchor: nil,
2549
- collection_method: nil,
2550
- currency: nil,
2551
- default_payment_method: nil,
2552
- default_tax_rates: nil,
2553
- description: nil,
2554
- discounts: nil,
2555
- end_date: nil,
2556
- invoice_settings: nil,
2557
- items: nil,
2558
- iterations: nil,
2559
- metadata: nil,
2560
- on_behalf_of: nil,
2561
- proration_behavior: nil,
2562
- start_date: nil,
2563
- transfer_data: nil,
2564
- trial: nil,
2565
- trial_end: nil
2566
- ); end
2567
- end
2568
- # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
2569
- sig { returns(T.nilable(String)) }
2570
- attr_accessor :end_behavior
2571
- # 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.
2572
- sig {
2573
- returns(T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase]))
2574
- }
2575
- attr_accessor :phases
2576
- # In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
2577
- sig { returns(T.nilable(String)) }
2578
- attr_accessor :proration_behavior
2579
- sig {
2580
- params(end_behavior: T.nilable(String), phases: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase]), proration_behavior: T.nilable(String)).void
2581
- }
2582
- def initialize(end_behavior: nil, phases: nil, proration_behavior: nil); end
2583
- end
2584
- class SubscriptionDetails < Stripe::RequestParams
2585
- class Item < Stripe::RequestParams
2586
- class Discount < Stripe::RequestParams
2587
- # ID of the coupon to create a new discount for.
2588
- sig { returns(T.nilable(String)) }
2589
- attr_accessor :coupon
2590
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
2591
- sig { returns(T.nilable(String)) }
2592
- attr_accessor :discount
2593
- # ID of the promotion code to create a new discount for.
2594
- sig { returns(T.nilable(String)) }
2595
- attr_accessor :promotion_code
2596
- sig {
2597
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
2598
- }
2599
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
2600
- end
2601
- class PriceData < Stripe::RequestParams
2602
- class Recurring < Stripe::RequestParams
2603
- # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
2604
- sig { returns(String) }
2605
- attr_accessor :interval
2606
- # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
2607
- sig { returns(T.nilable(Integer)) }
2608
- attr_accessor :interval_count
2609
- sig { params(interval: String, interval_count: T.nilable(Integer)).void }
2610
- def initialize(interval: nil, interval_count: nil); end
2611
- end
2612
- # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
2613
- sig { returns(String) }
2614
- attr_accessor :currency
2615
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
2616
- sig { returns(String) }
2617
- attr_accessor :product
2618
- # The recurring components of a price such as `interval` and `interval_count`.
2619
- sig {
2620
- returns(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item::PriceData::Recurring)
2621
- }
2622
- attr_accessor :recurring
2623
- # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
2624
- sig { returns(T.nilable(String)) }
2625
- attr_accessor :tax_behavior
2626
- # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
2627
- sig { returns(T.nilable(Integer)) }
2628
- attr_accessor :unit_amount
2629
- # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
2630
- sig { returns(T.nilable(String)) }
2631
- attr_accessor :unit_amount_decimal
2632
- sig {
2633
- params(currency: String, product: String, recurring: ::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
2634
- }
2635
- def initialize(
2636
- currency: nil,
2637
- product: nil,
2638
- recurring: nil,
2639
- tax_behavior: nil,
2640
- unit_amount: nil,
2641
- unit_amount_decimal: nil
2642
- ); end
2643
- end
2644
- # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached.
2645
- sig { returns(T.nilable(T::Boolean)) }
2646
- attr_accessor :clear_usage
2647
- # A flag that, if set to `true`, will delete the specified item.
2648
- sig { returns(T.nilable(T::Boolean)) }
2649
- attr_accessor :deleted
2650
- # The coupons to redeem into discounts for the subscription item.
2651
- sig {
2652
- returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item::Discount]))))
2653
- }
2654
- attr_accessor :discounts
2655
- # Subscription item to update.
2656
- sig { returns(T.nilable(String)) }
2657
- attr_accessor :id
2658
- # 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`.
2659
- sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
2660
- attr_accessor :metadata
2661
- # Plan ID for this item, as a string.
2662
- sig { returns(T.nilable(String)) }
2663
- attr_accessor :plan
2664
- # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
2665
- sig { returns(T.nilable(String)) }
2666
- attr_accessor :price
2667
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
2668
- sig {
2669
- returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item::PriceData))
2670
- }
2671
- attr_accessor :price_data
2672
- # Quantity for this item.
2673
- sig { returns(T.nilable(Integer)) }
2674
- attr_accessor :quantity
2675
- # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
2676
- sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
2677
- attr_accessor :tax_rates
2678
- sig {
2679
- params(clear_usage: T.nilable(T::Boolean), deleted: T.nilable(T::Boolean), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item::Discount]))), id: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
2680
- }
2681
- def initialize(
2682
- clear_usage: nil,
2683
- deleted: nil,
2684
- discounts: nil,
2685
- id: nil,
2686
- metadata: nil,
2687
- plan: nil,
2688
- price: nil,
2689
- price_data: nil,
2690
- quantity: nil,
2691
- tax_rates: nil
2692
- ); end
2693
- end
2694
- # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`.
2695
- sig { returns(T.nilable(T.any(String, Integer))) }
2696
- attr_accessor :billing_cycle_anchor
2697
- # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
2698
- sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
2699
- attr_accessor :cancel_at
2700
- # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
2701
- sig { returns(T.nilable(T::Boolean)) }
2702
- attr_accessor :cancel_at_period_end
2703
- # This simulates the subscription being canceled or expired immediately.
2704
- sig { returns(T.nilable(T::Boolean)) }
2705
- attr_accessor :cancel_now
2706
- # If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set.
2707
- sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
2708
- attr_accessor :default_tax_rates
2709
- # A list of up to 20 subscription items, each with an attached price.
2710
- sig {
2711
- returns(T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item]))
2712
- }
2713
- attr_accessor :items
2714
- # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
2715
- sig { returns(T.nilable(String)) }
2716
- attr_accessor :proration_behavior
2717
- # If previewing an update to a subscription, and doing proration, `subscription_details.proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_details.items`, or `subscription_details.trial_end` are required. Also, `subscription_details.proration_behavior` cannot be set to 'none'.
2718
- sig { returns(T.nilable(Integer)) }
2719
- attr_accessor :proration_date
2720
- # For paused subscriptions, setting `subscription_details.resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed.
2721
- sig { returns(T.nilable(String)) }
2722
- attr_accessor :resume_at
2723
- # Date a subscription is intended to start (can be future or past).
2724
- sig { returns(T.nilable(Integer)) }
2725
- attr_accessor :start_date
2726
- # If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_details.items` or `subscription` is required.
2727
- sig { returns(T.nilable(T.any(String, Integer))) }
2728
- attr_accessor :trial_end
2729
- sig {
2730
- params(billing_cycle_anchor: T.nilable(T.any(String, Integer)), cancel_at: T.nilable(T.nilable(T.any(String, Integer))), cancel_at_period_end: T.nilable(T::Boolean), cancel_now: T.nilable(T::Boolean), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), items: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item]), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer), resume_at: T.nilable(String), start_date: T.nilable(Integer), trial_end: T.nilable(T.any(String, Integer))).void
2731
- }
2732
- def initialize(
2733
- billing_cycle_anchor: nil,
2734
- cancel_at: nil,
2735
- cancel_at_period_end: nil,
2736
- cancel_now: nil,
2737
- default_tax_rates: nil,
2738
- items: nil,
2739
- proration_behavior: nil,
2740
- proration_date: nil,
2741
- resume_at: nil,
2742
- start_date: nil,
2743
- trial_end: nil
2744
- ); end
2745
- end
2746
- # Settings for automatic tax lookup for this invoice preview.
2747
- sig { returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::AutomaticTax)) }
2748
- attr_accessor :automatic_tax
2749
- # The currency to preview this invoice in. Defaults to that of `customer` if not specified.
2750
- sig { returns(T.nilable(String)) }
2751
- attr_accessor :currency
2752
- # The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
2753
- sig { returns(T.nilable(String)) }
2754
- attr_accessor :customer
2755
- # Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
2756
- sig { returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails)) }
2757
- attr_accessor :customer_details
2758
- # The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts.
2759
- sig {
2760
- returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreatePreviewParams::Discount]))))
2761
- }
2762
- attr_accessor :discounts
2763
- # Specifies which fields in the response should be expanded.
2764
- sig { returns(T.nilable(T::Array[String])) }
2765
- attr_accessor :expand
2766
- # List of invoice items to add or update in the upcoming invoice preview (up to 250).
2767
- sig {
2768
- returns(T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::InvoiceItem]))
2769
- }
2770
- attr_accessor :invoice_items
2771
- # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
2772
- sig { returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::Issuer)) }
2773
- attr_accessor :issuer
2774
- # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.
2775
- sig { returns(T.nilable(T.nilable(String))) }
2776
- attr_accessor :on_behalf_of
2777
- # Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified.
2778
- sig { returns(T.nilable(String)) }
2779
- attr_accessor :preview_mode
2780
- # The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields.
2781
- sig { returns(T.nilable(String)) }
2782
- attr_accessor :schedule
2783
- # The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields.
2784
- sig { returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails)) }
2785
- attr_accessor :schedule_details
2786
- # The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions.
2787
- sig { returns(T.nilable(String)) }
2788
- attr_accessor :subscription
2789
- # The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields.
2790
- sig { returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails)) }
2791
- attr_accessor :subscription_details
2792
- sig {
2793
- params(automatic_tax: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::AutomaticTax), currency: T.nilable(String), customer: T.nilable(String), customer_details: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreatePreviewParams::Discount]))), expand: T.nilable(T::Array[String]), invoice_items: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::InvoiceItem]), issuer: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::Issuer), on_behalf_of: T.nilable(T.nilable(String)), preview_mode: T.nilable(String), schedule: T.nilable(String), schedule_details: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails), subscription: T.nilable(String), subscription_details: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails)).void
2794
- }
2795
- def initialize(
2796
- automatic_tax: nil,
2797
- currency: nil,
2798
- customer: nil,
2799
- customer_details: nil,
2800
- discounts: nil,
2801
- expand: nil,
2802
- invoice_items: nil,
2803
- issuer: nil,
2804
- on_behalf_of: nil,
2805
- preview_mode: nil,
2806
- schedule: nil,
2807
- schedule_details: nil,
2808
- subscription: nil,
2809
- subscription_details: nil
2810
- ); end
2811
- end
2812
- # Adds multiple line items to an invoice. This is only possible when an invoice is still a draft.
2813
- sig {
2814
- params(invoice: String, params: T.any(::Stripe::InvoiceService::AddLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
2815
- }
2816
- def add_lines(invoice, params = {}, opts = {}); end
2817
-
2818
- # This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you [finalize the invoice, which allows you to [pay](#pay_invoice) or <a href="#send_invoice">send](https://stripe.com/docs/api#finalize_invoice) the invoice to your customers.
2819
- sig {
2820
- params(params: T.any(::Stripe::InvoiceService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
2821
- }
2822
- def create(params = {}, opts = {}); end
2823
-
2824
- # At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.
2825
- #
2826
- # Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer's discount.
2827
- #
2828
- # You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the subscription_details.proration_date parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_details.proration_date value passed in the request.
2829
- #
2830
- # Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. [Learn more](https://docs.stripe.com/currencies/conversions)
2831
- sig {
2832
- params(params: T.any(::Stripe::InvoiceService::CreatePreviewParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
2833
- }
2834
- def create_preview(params = {}, opts = {}); end
2835
-
2836
- # Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://stripe.com/docs/api#void_invoice).
2837
- sig {
2838
- params(invoice: String, params: T.any(::Stripe::InvoiceService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
2839
- }
2840
- def delete(invoice, params = {}, opts = {}); end
2841
-
2842
- # Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you'd like to finalize a draft invoice manually, you can do so using this method.
2843
- sig {
2844
- params(invoice: String, params: T.any(::Stripe::InvoiceService::FinalizeInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
2845
- }
2846
- def finalize_invoice(invoice, params = {}, opts = {}); end
2847
-
2848
- # You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first.
2849
- sig {
2850
- params(params: T.any(::Stripe::InvoiceService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
2851
- }
2852
- def list(params = {}, opts = {}); end
2853
-
2854
- # Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.
2855
- sig {
2856
- params(invoice: String, params: T.any(::Stripe::InvoiceService::MarkUncollectibleParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
2857
- }
2858
- def mark_uncollectible(invoice, params = {}, opts = {}); end
2859
-
2860
- # Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.
2861
- sig {
2862
- params(invoice: String, params: T.any(::Stripe::InvoiceService::PayParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
2863
- }
2864
- def pay(invoice, params = {}, opts = {}); end
2865
-
2866
- # Removes multiple line items from an invoice. This is only possible when an invoice is still a draft.
2867
- sig {
2868
- params(invoice: String, params: T.any(::Stripe::InvoiceService::RemoveLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
2869
- }
2870
- def remove_lines(invoice, params = {}, opts = {}); end
2871
-
2872
- # Retrieves the invoice with the given ID.
2873
- sig {
2874
- params(invoice: String, params: T.any(::Stripe::InvoiceService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
2875
- }
2876
- def retrieve(invoice, params = {}, opts = {}); end
2877
-
2878
- # Search for invoices you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language).
2879
- # Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating
2880
- # conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up
2881
- # to an hour behind during outages. Search functionality is not available to merchants in India.
2882
- sig {
2883
- params(params: T.any(::Stripe::InvoiceService::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SearchResultObject)
2884
- }
2885
- def search(params = {}, opts = {}); end
2886
-
2887
- # Stripe will automatically send invoices to customers according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.
2888
- #
2889
- # Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event.
2890
- sig {
2891
- params(invoice: String, params: T.any(::Stripe::InvoiceService::SendInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
2892
- }
2893
- def send_invoice(invoice, params = {}, opts = {}); end
2894
-
2895
- # Draft invoices are fully editable. Once an invoice is [finalized](https://stripe.com/docs/billing/invoices/workflow#finalized),
2896
- # monetary values, as well as collection_method, become uneditable.
2897
- #
2898
- # If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on,
2899
- # sending reminders for, or [automatically reconciling](https://stripe.com/docs/billing/invoices/reconciliation) invoices, pass
2900
- # auto_advance=false.
2901
- sig {
2902
- params(invoice: String, params: T.any(::Stripe::InvoiceService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
2903
- }
2904
- def update(invoice, params = {}, opts = {}); end
2905
-
2906
- # Updates multiple line items on an invoice. This is only possible when an invoice is still a draft.
2907
- sig {
2908
- params(invoice: String, params: T.any(::Stripe::InvoiceService::UpdateLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
2909
- }
2910
- def update_lines(invoice, params = {}, opts = {}); end
2911
-
2912
- # Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://stripe.com/docs/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.
2913
- #
2914
- # Consult with local regulations to determine whether and how an invoice might be amended, canceled, or voided in the jurisdiction you're doing business in. You might need to [issue another invoice or <a href="#create_credit_note">credit note](https://stripe.com/docs/api#create_invoice) instead. Stripe recommends that you consult with your legal counsel for advice specific to your business.
2915
- sig {
2916
- params(invoice: String, params: T.any(::Stripe::InvoiceService::VoidInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
2917
- }
2918
- def void_invoice(invoice, params = {}, opts = {}); end
2919
- end
2920
- end