stripe 15.5.0 → 15.6.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 (598) hide show
  1. checksums.yaml +4 -4
  2. data/API_VERSION +1 -1
  3. data/CHANGELOG.md +1670 -659
  4. data/README.md +4 -6
  5. data/VERSION +1 -1
  6. data/lib/stripe/api_requestor.rb +32 -0
  7. data/lib/stripe/api_version.rb +1 -2
  8. data/lib/stripe/errors.rb +60 -0
  9. data/lib/stripe/event_types.rb +102 -0
  10. data/lib/stripe/events/v2_core_account_closed_event.rb +21 -0
  11. data/lib/stripe/events/v2_core_account_created_event.rb +21 -0
  12. data/lib/stripe/events/v2_core_account_including_configuration_customer_capability_status_updated_event.rb +23 -0
  13. data/lib/stripe/events/v2_core_account_including_configuration_customer_updated_event.rb +21 -0
  14. data/lib/stripe/events/v2_core_account_including_configuration_merchant_capability_status_updated_event.rb +23 -0
  15. data/lib/stripe/events/v2_core_account_including_configuration_merchant_updated_event.rb +21 -0
  16. data/lib/stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event.rb +23 -0
  17. data/lib/stripe/events/v2_core_account_including_configuration_recipient_updated_event.rb +21 -0
  18. data/lib/stripe/events/v2_core_account_including_configuration_storer_capability_status_updated_event.rb +23 -0
  19. data/lib/stripe/events/v2_core_account_including_configuration_storer_updated_event.rb +21 -0
  20. data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +21 -0
  21. data/lib/stripe/events/v2_core_account_including_identity_updated_event.rb +21 -0
  22. data/lib/stripe/events/v2_core_account_including_requirements_updated_event.rb +21 -0
  23. data/lib/stripe/events/v2_core_account_link_returned_event.rb +13 -0
  24. data/lib/stripe/events/v2_core_account_person_created_event.rb +23 -0
  25. data/lib/stripe/events/v2_core_account_person_deleted_event.rb +23 -0
  26. data/lib/stripe/events/v2_core_account_person_updated_event.rb +23 -0
  27. data/lib/stripe/events/v2_core_account_updated_event.rb +21 -0
  28. data/lib/stripe/events/v2_money_management_adjustment_created_event.rb +21 -0
  29. data/lib/stripe/events/v2_money_management_financial_account_created_event.rb +21 -0
  30. data/lib/stripe/events/v2_money_management_financial_account_updated_event.rb +21 -0
  31. data/lib/stripe/events/v2_money_management_financial_address_activated_event.rb +21 -0
  32. data/lib/stripe/events/v2_money_management_financial_address_failed_event.rb +21 -0
  33. data/lib/stripe/events/v2_money_management_inbound_transfer_available_event.rb +23 -0
  34. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +21 -0
  35. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +21 -0
  36. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +21 -0
  37. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +21 -0
  38. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +21 -0
  39. data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +21 -0
  40. data/lib/stripe/events/v2_money_management_outbound_payment_created_event.rb +21 -0
  41. data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +21 -0
  42. data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +21 -0
  43. data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +21 -0
  44. data/lib/stripe/events/v2_money_management_outbound_payment_updated_event.rb +21 -0
  45. data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +21 -0
  46. data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +21 -0
  47. data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +21 -0
  48. data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +21 -0
  49. data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +21 -0
  50. data/lib/stripe/events/v2_money_management_outbound_transfer_updated_event.rb +21 -0
  51. data/lib/stripe/events/v2_money_management_payout_method_updated_event.rb +21 -0
  52. data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +23 -0
  53. data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +21 -0
  54. data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +21 -0
  55. data/lib/stripe/events/v2_money_management_received_credit_succeeded_event.rb +21 -0
  56. data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +21 -0
  57. data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +21 -0
  58. data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +21 -0
  59. data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +21 -0
  60. data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +21 -0
  61. data/lib/stripe/events/v2_money_management_transaction_created_event.rb +21 -0
  62. data/lib/stripe/events/v2_money_management_transaction_updated_event.rb +21 -0
  63. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_failed_event.rb +21 -0
  64. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb +22 -0
  65. data/lib/stripe/events/v2_payments_off_session_payment_canceled_event.rb +21 -0
  66. data/lib/stripe/events/v2_payments_off_session_payment_created_event.rb +21 -0
  67. data/lib/stripe/events/v2_payments_off_session_payment_failed_event.rb +21 -0
  68. data/lib/stripe/events/v2_payments_off_session_payment_succeeded_event.rb +21 -0
  69. data/lib/stripe/object_types.rb +53 -0
  70. data/lib/stripe/resources/account.rb +653 -1
  71. data/lib/stripe/resources/account_notice.rb +123 -0
  72. data/lib/stripe/resources/account_session.rb +256 -1
  73. data/lib/stripe/resources/balance_settings.rb +112 -0
  74. data/lib/stripe/resources/billing/credit_balance_summary.rb +2 -0
  75. data/lib/stripe/resources/billing/credit_balance_transaction.rb +4 -0
  76. data/lib/stripe/resources/billing/credit_grant.rb +10 -0
  77. data/lib/stripe/resources/billing/meter_usage.rb +23 -0
  78. data/lib/stripe/resources/billing/meter_usage_row.rb +28 -0
  79. data/lib/stripe/resources/billing_portal/session.rb +6 -0
  80. data/lib/stripe/resources/capital/financing_offer.rb +179 -0
  81. data/lib/stripe/resources/capital/financing_summary.rb +55 -0
  82. data/lib/stripe/resources/capital/financing_transaction.rb +114 -0
  83. data/lib/stripe/resources/card.rb +2 -0
  84. data/lib/stripe/resources/cash_balance.rb +2 -0
  85. data/lib/stripe/resources/charge.rb +1540 -0
  86. data/lib/stripe/resources/checkout/session.rb +495 -4
  87. data/lib/stripe/resources/confirmation_token.rb +170 -0
  88. data/lib/stripe/resources/coupon.rb +30 -1
  89. data/lib/stripe/resources/credit_note.rb +6 -0
  90. data/lib/stripe/resources/credit_note_line_item.rb +9 -0
  91. data/lib/stripe/resources/customer.rb +2 -0
  92. data/lib/stripe/resources/customer_balance_transaction.rb +2 -0
  93. data/lib/stripe/resources/customer_cash_balance_transaction.rb +2 -0
  94. data/lib/stripe/resources/customer_session.rb +6 -1
  95. data/lib/stripe/resources/discount.rb +2 -0
  96. data/lib/stripe/resources/dispute.rb +11 -0
  97. data/lib/stripe/resources/event.rb +31 -0
  98. data/lib/stripe/resources/financial_connections/account.rb +22 -1
  99. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +27 -0
  100. data/lib/stripe/resources/financial_connections/institution.rb +92 -0
  101. data/lib/stripe/resources/financial_connections/session.rb +62 -2
  102. data/lib/stripe/resources/fx_quote.rb +186 -0
  103. data/lib/stripe/resources/identity/verification_session.rb +10 -0
  104. data/lib/stripe/resources/invoice.rb +1140 -16
  105. data/lib/stripe/resources/invoice_item.rb +78 -2
  106. data/lib/stripe/resources/invoice_line_item.rb +55 -1
  107. data/lib/stripe/resources/invoice_payment.rb +6 -1
  108. data/lib/stripe/resources/issuing/cardholder.rb +2 -1
  109. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +602 -0
  110. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +82 -0
  111. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +86 -0
  112. data/lib/stripe/resources/issuing/settlement.rb +53 -0
  113. data/lib/stripe/resources/issuing/transaction.rb +6 -0
  114. data/lib/stripe/resources/line_item.rb +37 -0
  115. data/lib/stripe/resources/mandate.rb +89 -1
  116. data/lib/stripe/resources/margin.rb +115 -0
  117. data/lib/stripe/resources/order.rb +2958 -0
  118. data/lib/stripe/resources/payment_attempt_record.rb +1181 -0
  119. data/lib/stripe/resources/payment_intent.rb +6448 -545
  120. data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +72 -0
  121. data/lib/stripe/resources/payment_method.rb +194 -1
  122. data/lib/stripe/resources/payment_method_configuration.rb +295 -0
  123. data/lib/stripe/resources/payment_record.rb +1727 -0
  124. data/lib/stripe/resources/price.rb +30 -0
  125. data/lib/stripe/resources/privacy/redaction_job.rb +298 -0
  126. data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +33 -0
  127. data/lib/stripe/resources/promotion_code.rb +10 -0
  128. data/lib/stripe/resources/quote.rb +2038 -7
  129. data/lib/stripe/resources/quote_line.rb +274 -0
  130. data/lib/stripe/resources/quote_preview_invoice.rb +680 -0
  131. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +395 -0
  132. data/lib/stripe/resources/refund.rb +9 -0
  133. data/lib/stripe/resources/setup_attempt.rb +24 -0
  134. data/lib/stripe/resources/setup_intent.rb +771 -9
  135. data/lib/stripe/resources/source.rb +29 -0
  136. data/lib/stripe/resources/subscription.rb +365 -9
  137. data/lib/stripe/resources/subscription_item.rb +84 -3
  138. data/lib/stripe/resources/subscription_schedule.rb +1007 -10
  139. data/lib/stripe/resources/tax/association.rb +66 -0
  140. data/lib/stripe/resources/tax/form.rb +211 -0
  141. data/lib/stripe/resources/tax_id.rb +12 -2
  142. data/lib/stripe/resources/terminal/configuration.rb +33 -0
  143. data/lib/stripe/resources/terminal/onboarding_link.rb +84 -0
  144. data/lib/stripe/resources/terminal/reader.rb +8 -0
  145. data/lib/stripe/resources/terminal/reader_collected_data.rb +31 -0
  146. data/lib/stripe/resources/transfer.rb +6 -0
  147. data/lib/stripe/resources/treasury/financial_account.rb +22 -3
  148. data/lib/stripe/resources/treasury/financial_account_features.rb +2 -0
  149. data/lib/stripe/resources/treasury/outbound_transfer.rb +37 -0
  150. data/lib/stripe/resources/treasury/received_credit.rb +38 -1
  151. data/lib/stripe/resources/treasury/received_debit.rb +40 -1
  152. data/lib/stripe/resources/v2/core/account.rb +1938 -0
  153. data/lib/stripe/resources/v2/core/account_link.rb +72 -0
  154. data/lib/stripe/resources/v2/core/person.rb +276 -0
  155. data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +74 -0
  156. data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +39 -0
  157. data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +20 -0
  158. data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +22 -0
  159. data/lib/stripe/resources/v2/money_management/adjustment.rb +51 -0
  160. data/lib/stripe/resources/v2/money_management/financial_account.rb +79 -0
  161. data/lib/stripe/resources/v2/money_management/financial_address.rb +68 -0
  162. data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +94 -0
  163. data/lib/stripe/resources/v2/money_management/outbound_payment.rb +129 -0
  164. data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +82 -0
  165. data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +45 -0
  166. data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +117 -0
  167. data/lib/stripe/resources/v2/money_management/payout_method.rb +77 -0
  168. data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +49 -0
  169. data/lib/stripe/resources/v2/money_management/received_credit.rb +122 -0
  170. data/lib/stripe/resources/v2/money_management/received_debit.rb +84 -0
  171. data/lib/stripe/resources/v2/money_management/transaction.rb +80 -0
  172. data/lib/stripe/resources/v2/money_management/transaction_entry.rb +70 -0
  173. data/lib/stripe/resources/v2/payments/off_session_payment.rb +89 -0
  174. data/lib/stripe/resources.rb +109 -0
  175. data/lib/stripe/services/account_notice_service.rb +101 -0
  176. data/lib/stripe/services/account_service.rb +562 -1
  177. data/lib/stripe/services/account_session_service.rb +226 -1
  178. data/lib/stripe/services/balance_settings_service.rb +99 -0
  179. data/lib/stripe/services/billing/credit_balance_summary_service.rb +4 -1
  180. data/lib/stripe/services/billing/credit_balance_transaction_service.rb +4 -0
  181. data/lib/stripe/services/billing/credit_grant_service.rb +8 -0
  182. data/lib/stripe/services/billing/meter_usage_service.rb +76 -0
  183. data/lib/stripe/services/billing_portal/session_service.rb +4 -0
  184. data/lib/stripe/services/billing_service.rb +2 -1
  185. data/lib/stripe/services/capital/financing_offer_service.rb +112 -0
  186. data/lib/stripe/services/capital/financing_summary_service.rb +28 -0
  187. data/lib/stripe/services/capital/financing_transaction_service.rb +79 -0
  188. data/lib/stripe/services/capital_service.rb +15 -0
  189. data/lib/stripe/services/charge_service.rb +1418 -0
  190. data/lib/stripe/services/checkout/session_service.rb +392 -4
  191. data/lib/stripe/services/coupon_service.rb +17 -1
  192. data/lib/stripe/services/credit_note_service.rb +4 -0
  193. data/lib/stripe/services/customer_session_service.rb +4 -1
  194. data/{rbi/stripe/services/account_external_account_service.rbi → lib/stripe/services/external_account_service.rb} +135 -122
  195. data/{rbi/stripe/services/tax/transaction_line_item_service.rbi → lib/stripe/services/financial_connections/account_inferred_balance_service.rb} +21 -17
  196. data/lib/stripe/services/financial_connections/account_service.rb +7 -2
  197. data/{rbi/stripe/services/climate/supplier_service.rbi → lib/stripe/services/financial_connections/institution_service.rb} +36 -25
  198. data/lib/stripe/services/financial_connections/session_service.rb +34 -2
  199. data/lib/stripe/services/financial_connections_service.rb +2 -1
  200. data/lib/stripe/services/fx_quote_service.rb +123 -0
  201. data/lib/stripe/services/identity/verification_session_service.rb +8 -0
  202. data/lib/stripe/services/invoice_item_service.rb +74 -2
  203. data/lib/stripe/services/invoice_line_item_service.rb +33 -1
  204. data/lib/stripe/services/invoice_payment_service.rb +4 -1
  205. data/lib/stripe/services/invoice_service.rb +1074 -16
  206. data/lib/stripe/services/issuing/cardholder_service.rb +2 -1
  207. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +504 -0
  208. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +66 -0
  209. data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +83 -0
  210. data/lib/stripe/services/issuing/transaction_service.rb +4 -0
  211. data/lib/stripe/services/issuing_service.rb +5 -1
  212. data/lib/stripe/services/mandate_service.rb +40 -0
  213. data/lib/stripe/services/margin_service.rb +119 -0
  214. data/{rbi/stripe/services/source_transaction_service.rbi → lib/stripe/services/order_line_item_service.rb} +20 -16
  215. data/lib/stripe/services/order_service.rb +2388 -0
  216. data/lib/stripe/services/payment_attempt_record_service.rb +52 -0
  217. data/{rbi/stripe/services/quote_line_item_service.rbi → lib/stripe/services/payment_intent_amount_details_line_item_service.rb} +20 -16
  218. data/lib/stripe/services/payment_intent_service.rb +7630 -2215
  219. data/lib/stripe/services/payment_method_configuration_service.rb +210 -0
  220. data/lib/stripe/services/payment_method_service.rb +120 -1
  221. data/lib/stripe/services/payment_record_service.rb +562 -0
  222. data/lib/stripe/services/price_service.rb +19 -0
  223. data/lib/stripe/services/privacy/redaction_job_service.rb +240 -0
  224. data/{rbi/stripe/services/tax/calculation_line_item_service.rbi → lib/stripe/services/privacy/redaction_job_validation_error_service.rb} +21 -17
  225. data/lib/stripe/services/privacy_service.rb +13 -0
  226. data/lib/stripe/services/promotion_code_service.rb +8 -0
  227. data/{rbi/stripe/services/credit_note_line_item_service.rbi → lib/stripe/services/quote_line_service.rb} +20 -16
  228. data/{rbi/stripe/services/payment_link_line_item_service.rbi → lib/stripe/services/quote_preview_invoice_service.rb} +20 -16
  229. data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +35 -0
  230. data/lib/stripe/services/quote_service.rb +1723 -8
  231. data/lib/stripe/services/setup_intent_service.rb +691 -9
  232. data/lib/stripe/services/subscription_item_service.rb +75 -3
  233. data/lib/stripe/services/subscription_schedule_service.rb +911 -10
  234. data/lib/stripe/services/subscription_service.rb +309 -9
  235. data/lib/stripe/services/tax/association_service.rb +31 -0
  236. data/lib/stripe/services/tax/form_service.rb +100 -0
  237. data/lib/stripe/services/tax_id_service.rb +8 -2
  238. data/lib/stripe/services/tax_service.rb +3 -1
  239. data/lib/stripe/services/terminal/configuration_service.rb +26 -0
  240. data/lib/stripe/services/terminal/onboarding_link_service.rb +56 -0
  241. data/lib/stripe/services/terminal/reader_collected_data_service.rb +28 -0
  242. data/lib/stripe/services/terminal_service.rb +3 -1
  243. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +97 -0
  244. data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +25 -1
  245. data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +25 -1
  246. data/lib/stripe/services/transfer_service.rb +4 -0
  247. data/lib/stripe/services/treasury/financial_account_features_service.rb +4 -1
  248. data/lib/stripe/services/treasury/financial_account_service.rb +16 -2
  249. data/lib/stripe/services/treasury/outbound_transfer_service.rb +24 -0
  250. data/lib/stripe/services/v1_services.rb +11 -1
  251. data/lib/stripe/services/v2/core/account_link_service.rb +114 -0
  252. data/lib/stripe/services/v2/core/account_service.rb +4536 -0
  253. data/lib/stripe/services/v2/core/accounts/person_service.rb +1045 -0
  254. data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +130 -0
  255. data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +107 -0
  256. data/lib/stripe/services/v2/core/vault_service.rb +18 -0
  257. data/lib/stripe/services/v2/core_service.rb +4 -1
  258. data/lib/stripe/services/v2/money_management/adjustment_service.rb +74 -0
  259. data/lib/stripe/services/v2/money_management/financial_account_service.rb +119 -0
  260. data/lib/stripe/services/v2/money_management/financial_address_service.rb +82 -0
  261. data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +125 -0
  262. data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +95 -0
  263. data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +199 -0
  264. data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +235 -0
  265. data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +172 -0
  266. data/lib/stripe/services/v2/money_management/payout_method_service.rb +90 -0
  267. data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +32 -0
  268. data/lib/stripe/services/v2/money_management/received_credit_service.rb +70 -0
  269. data/lib/stripe/services/v2/money_management/received_debit_service.rb +43 -0
  270. data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +69 -0
  271. data/lib/stripe/services/v2/money_management/transaction_service.rb +73 -0
  272. data/lib/stripe/services/v2/money_management_service.rb +31 -0
  273. data/lib/stripe/services/v2/payment_service.rb +15 -0
  274. data/lib/stripe/services/v2/payments/off_session_payment_service.rb +152 -0
  275. data/lib/stripe/services/v2/test_helper_service.rb +15 -0
  276. data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +53 -0
  277. data/lib/stripe/services/v2_services.rb +4 -1
  278. data/lib/stripe/services.rb +55 -0
  279. data/lib/stripe/stripe_configuration.rb +3 -1
  280. data/lib/stripe/stripe_object.rb +1 -1
  281. data/lib/stripe/util.rb +7 -1
  282. data/lib/stripe/version.rb +1 -1
  283. data/lib/stripe.rb +53 -0
  284. data/rbi/stripe.rbi +201354 -0
  285. data/stripe.gemspec +4 -1
  286. metadata +168 -323
  287. data/rbi/stripe/resources/account.rbi +0 -4991
  288. data/rbi/stripe/resources/account_link.rbi +0 -76
  289. data/rbi/stripe/resources/account_session.rbi +0 -1173
  290. data/rbi/stripe/resources/apple_pay_domain.rbi +0 -88
  291. data/rbi/stripe/resources/application.rbi +0 -20
  292. data/rbi/stripe/resources/application_fee.rbi +0 -118
  293. data/rbi/stripe/resources/application_fee_refund.rbi +0 -37
  294. data/rbi/stripe/resources/apps/secret.rbi +0 -195
  295. data/rbi/stripe/resources/balance.rbi +0 -230
  296. data/rbi/stripe/resources/balance_transaction.rbi +0 -147
  297. data/rbi/stripe/resources/bank_account.rbi +0 -127
  298. data/rbi/stripe/resources/billing/alert.rbi +0 -201
  299. data/rbi/stripe/resources/billing/alert_triggered.rbi +0 -28
  300. data/rbi/stripe/resources/billing/credit_balance_summary.rbi +0 -63
  301. data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +0 -147
  302. data/rbi/stripe/resources/billing/credit_grant.rbi +0 -291
  303. data/rbi/stripe/resources/billing/meter.rbi +0 -226
  304. data/rbi/stripe/resources/billing/meter_event.rbi +0 -64
  305. data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +0 -64
  306. data/rbi/stripe/resources/billing/meter_event_summary.rbi +0 -35
  307. data/rbi/stripe/resources/billing_portal/configuration.rbi +0 -712
  308. data/rbi/stripe/resources/billing_portal/session.rbi +0 -345
  309. data/rbi/stripe/resources/capability.rbi +0 -125
  310. data/rbi/stripe/resources/card.rbi +0 -125
  311. data/rbi/stripe/resources/cash_balance.rbi +0 -32
  312. data/rbi/stripe/resources/charge.rbi +0 -2136
  313. data/rbi/stripe/resources/checkout/session.rbi +0 -4105
  314. data/rbi/stripe/resources/climate/order.rbi +0 -245
  315. data/rbi/stripe/resources/climate/product.rbi +0 -75
  316. data/rbi/stripe/resources/climate/supplier.rbi +0 -72
  317. data/rbi/stripe/resources/confirmation_token.rbi +0 -1818
  318. data/rbi/stripe/resources/connect_collection_transfer.rbi +0 -26
  319. data/rbi/stripe/resources/country_spec.rbi +0 -85
  320. data/rbi/stripe/resources/coupon.rbi +0 -250
  321. data/rbi/stripe/resources/credit_note.rbi +0 -752
  322. data/rbi/stripe/resources/credit_note_line_item.rbi +0 -101
  323. data/rbi/stripe/resources/customer.rbi +0 -993
  324. data/rbi/stripe/resources/customer_balance_transaction.rbi +0 -56
  325. data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +0 -151
  326. data/rbi/stripe/resources/customer_session.rbi +0 -200
  327. data/rbi/stripe/resources/discount.rbi +0 -53
  328. data/rbi/stripe/resources/dispute.rbi +0 -761
  329. data/rbi/stripe/resources/entitlements/active_entitlement.rbi +0 -58
  330. data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +0 -23
  331. data/rbi/stripe/resources/entitlements/feature.rbi +0 -117
  332. data/rbi/stripe/resources/ephemeral_key.rbi +0 -44
  333. data/rbi/stripe/resources/event.rbi +0 -137
  334. data/rbi/stripe/resources/exchange_rate.rbi +0 -66
  335. data/rbi/stripe/resources/file.rbi +0 -143
  336. data/rbi/stripe/resources/file_link.rbi +0 -141
  337. data/rbi/stripe/resources/financial_connections/account.rbi +0 -339
  338. data/rbi/stripe/resources/financial_connections/account_owner.rbi +0 -35
  339. data/rbi/stripe/resources/financial_connections/account_ownership.rbi +0 -23
  340. data/rbi/stripe/resources/financial_connections/session.rbi +0 -123
  341. data/rbi/stripe/resources/financial_connections/transaction.rbi +0 -124
  342. data/rbi/stripe/resources/forwarding/request.rbi +0 -216
  343. data/rbi/stripe/resources/funding_instructions.rbi +0 -437
  344. data/rbi/stripe/resources/identity/verification_report.rbi +0 -360
  345. data/rbi/stripe/resources/identity/verification_session.rbi +0 -564
  346. data/rbi/stripe/resources/invoice.rbi +0 -3894
  347. data/rbi/stripe/resources/invoice_item.rbi +0 -470
  348. data/rbi/stripe/resources/invoice_line_item.rbi +0 -432
  349. data/rbi/stripe/resources/invoice_payment.rbi +0 -121
  350. data/rbi/stripe/resources/invoice_rendering_template.rbi +0 -104
  351. data/rbi/stripe/resources/issuing/authorization.rbi +0 -1283
  352. data/rbi/stripe/resources/issuing/card.rbi +0 -749
  353. data/rbi/stripe/resources/issuing/cardholder.rbi +0 -744
  354. data/rbi/stripe/resources/issuing/dispute.rbi +0 -913
  355. data/rbi/stripe/resources/issuing/personalization_design.rbi +0 -338
  356. data/rbi/stripe/resources/issuing/physical_bundle.rbi +0 -79
  357. data/rbi/stripe/resources/issuing/token.rbi +0 -226
  358. data/rbi/stripe/resources/issuing/transaction.rbi +0 -1061
  359. data/rbi/stripe/resources/line_item.rbi +0 -72
  360. data/rbi/stripe/resources/login_link.rbi +0 -19
  361. data/rbi/stripe/resources/mandate.rbi +0 -191
  362. data/rbi/stripe/resources/payment_intent.rbi +0 -10011
  363. data/rbi/stripe/resources/payment_link.rbi +0 -1891
  364. data/rbi/stripe/resources/payment_method.rbi +0 -1770
  365. data/rbi/stripe/resources/payment_method_configuration.rbi +0 -3550
  366. data/rbi/stripe/resources/payment_method_domain.rbi +0 -228
  367. data/rbi/stripe/resources/payout.rbi +0 -307
  368. data/rbi/stripe/resources/person.rbi +0 -401
  369. data/rbi/stripe/resources/plan.rbi +0 -371
  370. data/rbi/stripe/resources/price.rbi +0 -694
  371. data/rbi/stripe/resources/product.rbi +0 -553
  372. data/rbi/stripe/resources/product_feature.rbi +0 -26
  373. data/rbi/stripe/resources/promotion_code.rbi +0 -264
  374. data/rbi/stripe/resources/quote.rbi +0 -1137
  375. data/rbi/stripe/resources/radar/early_fraud_warning.rbi +0 -98
  376. data/rbi/stripe/resources/radar/value_list.rbi +0 -168
  377. data/rbi/stripe/resources/radar/value_list_item.rbi +0 -129
  378. data/rbi/stripe/resources/refund.rbi +0 -523
  379. data/rbi/stripe/resources/reporting/report_run.rbi +0 -191
  380. data/rbi/stripe/resources/reporting/report_type.rbi +0 -57
  381. data/rbi/stripe/resources/reserve_transaction.rbi +0 -23
  382. data/rbi/stripe/resources/reversal.rbi +0 -51
  383. data/rbi/stripe/resources/review.rbi +0 -154
  384. data/rbi/stripe/resources/setup_attempt.rbi +0 -477
  385. data/rbi/stripe/resources/setup_intent.rbi +0 -3974
  386. data/rbi/stripe/resources/shipping_rate.rbi +0 -305
  387. data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +0 -75
  388. data/rbi/stripe/resources/source.rbi +0 -1496
  389. data/rbi/stripe/resources/source_mandate_notification.rbi +0 -77
  390. data/rbi/stripe/resources/source_transaction.rbi +0 -127
  391. data/rbi/stripe/resources/subscription.rbi +0 -2154
  392. data/rbi/stripe/resources/subscription_item.rbi +0 -404
  393. data/rbi/stripe/resources/subscription_schedule.rbi +0 -1795
  394. data/rbi/stripe/resources/tax/calculation.rbi +0 -478
  395. data/rbi/stripe/resources/tax/calculation_line_item.rbi +0 -91
  396. data/rbi/stripe/resources/tax/registration.rbi +0 -3216
  397. data/rbi/stripe/resources/tax/settings.rbi +0 -141
  398. data/rbi/stripe/resources/tax/transaction.rbi +0 -351
  399. data/rbi/stripe/resources/tax/transaction_line_item.rbi +0 -54
  400. data/rbi/stripe/resources/tax_code.rbi +0 -44
  401. data/rbi/stripe/resources/tax_deducted_at_source.rbi +0 -23
  402. data/rbi/stripe/resources/tax_id.rbi +0 -165
  403. data/rbi/stripe/resources/tax_rate.rbi +0 -239
  404. data/rbi/stripe/resources/terminal/configuration.rbi +0 -1647
  405. data/rbi/stripe/resources/terminal/connection_token.rbi +0 -37
  406. data/rbi/stripe/resources/terminal/location.rbi +0 -222
  407. data/rbi/stripe/resources/terminal/reader.rbi +0 -1016
  408. data/rbi/stripe/resources/test_helpers/test_clock.rbi +0 -132
  409. data/rbi/stripe/resources/token.rbi +0 -1281
  410. data/rbi/stripe/resources/topup.rbi +0 -222
  411. data/rbi/stripe/resources/transfer.rbi +0 -199
  412. data/rbi/stripe/resources/treasury/credit_reversal.rbi +0 -119
  413. data/rbi/stripe/resources/treasury/debit_reversal.rbi +0 -131
  414. data/rbi/stripe/resources/treasury/financial_account.rbi +0 -869
  415. data/rbi/stripe/resources/treasury/financial_account_features.rbi +0 -260
  416. data/rbi/stripe/resources/treasury/inbound_transfer.rbi +0 -295
  417. data/rbi/stripe/resources/treasury/outbound_payment.rbi +0 -592
  418. data/rbi/stripe/resources/treasury/outbound_transfer.rbi +0 -431
  419. data/rbi/stripe/resources/treasury/received_credit.rbi +0 -302
  420. data/rbi/stripe/resources/treasury/received_debit.rbi +0 -256
  421. data/rbi/stripe/resources/treasury/transaction.rbi +0 -215
  422. data/rbi/stripe/resources/treasury/transaction_entry.rbi +0 -192
  423. data/rbi/stripe/resources/v2/amount.rbi +0 -14
  424. data/rbi/stripe/resources/v2/billing/meter_event.rbi +0 -37
  425. data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +0 -41
  426. data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +0 -31
  427. data/rbi/stripe/resources/v2/event.rbi +0 -48
  428. data/rbi/stripe/resources/v2/event_destination.rbi +0 -91
  429. data/rbi/stripe/resources/webhook_endpoint.rbi +0 -168
  430. data/rbi/stripe/services/account_capability_service.rbi +0 -51
  431. data/rbi/stripe/services/account_link_service.rbi +0 -60
  432. data/rbi/stripe/services/account_login_link_service.rbi +0 -22
  433. data/rbi/stripe/services/account_person_service.rbi +0 -1007
  434. data/rbi/stripe/services/account_service.rbi +0 -4281
  435. data/rbi/stripe/services/account_session_service.rbi +0 -748
  436. data/rbi/stripe/services/apple_pay_domain_service.rbi +0 -76
  437. data/rbi/stripe/services/application_fee_refund_service.rbi +0 -93
  438. data/rbi/stripe/services/application_fee_service.rbi +0 -78
  439. data/rbi/stripe/services/apps/secret_service.rbi +0 -151
  440. data/rbi/stripe/services/apps_service.rbi +0 -9
  441. data/rbi/stripe/services/balance_service.rbi +0 -21
  442. data/rbi/stripe/services/balance_transaction_service.rbi +0 -93
  443. data/rbi/stripe/services/billing/alert_service.rbi +0 -152
  444. data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +0 -68
  445. data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +0 -59
  446. data/rbi/stripe/services/billing/credit_grant_service.rbi +0 -211
  447. data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +0 -42
  448. data/rbi/stripe/services/billing/meter_event_service.rbi +0 -42
  449. data/rbi/stripe/services/billing/meter_event_summary_service.rbi +0 -54
  450. data/rbi/stripe/services/billing/meter_service.rbi +0 -163
  451. data/rbi/stripe/services/billing_portal/configuration_service.rbi +0 -561
  452. data/rbi/stripe/services/billing_portal/session_service.rbi +0 -204
  453. data/rbi/stripe/services/billing_portal_service.rbi +0 -10
  454. data/rbi/stripe/services/billing_service.rbi +0 -15
  455. data/rbi/stripe/services/charge_service.rbi +0 -448
  456. data/rbi/stripe/services/checkout/session_line_item_service.rbi +0 -33
  457. data/rbi/stripe/services/checkout/session_service.rbi +0 -2697
  458. data/rbi/stripe/services/checkout_service.rbi +0 -9
  459. data/rbi/stripe/services/climate/order_service.rbi +0 -142
  460. data/rbi/stripe/services/climate/product_service.rbi +0 -46
  461. data/rbi/stripe/services/climate_service.rbi +0 -11
  462. data/rbi/stripe/services/confirmation_token_service.rbi +0 -20
  463. data/rbi/stripe/services/country_spec_service.rbi +0 -44
  464. data/rbi/stripe/services/coupon_service.rbi +0 -194
  465. data/rbi/stripe/services/credit_note_preview_lines_service.rbi +0 -167
  466. data/rbi/stripe/services/credit_note_service.rbi +0 -415
  467. data/rbi/stripe/services/customer_balance_transaction_service.rbi +0 -92
  468. data/rbi/stripe/services/customer_cash_balance_service.rbi +0 -45
  469. data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +0 -44
  470. data/rbi/stripe/services/customer_funding_instructions_service.rbi +0 -59
  471. data/rbi/stripe/services/customer_payment_method_service.rbi +0 -57
  472. data/rbi/stripe/services/customer_payment_source_service.rbi +0 -232
  473. data/rbi/stripe/services/customer_service.rbi +0 -635
  474. data/rbi/stripe/services/customer_session_service.rbi +0 -116
  475. data/rbi/stripe/services/customer_tax_id_service.rbi +0 -70
  476. data/rbi/stripe/services/dispute_service.rbi +0 -424
  477. data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +0 -55
  478. data/rbi/stripe/services/entitlements/feature_service.rbi +0 -107
  479. data/rbi/stripe/services/entitlements_service.rbi +0 -10
  480. data/rbi/stripe/services/ephemeral_key_service.rbi +0 -53
  481. data/rbi/stripe/services/event_service.rbi +0 -83
  482. data/rbi/stripe/services/exchange_rate_service.rbi +0 -44
  483. data/rbi/stripe/services/file_link_service.rbi +0 -124
  484. data/rbi/stripe/services/file_service.rbi +0 -116
  485. data/rbi/stripe/services/financial_connections/account_owner_service.rbi +0 -42
  486. data/rbi/stripe/services/financial_connections/account_service.rbi +0 -133
  487. data/rbi/stripe/services/financial_connections/session_service.rbi +0 -88
  488. data/rbi/stripe/services/financial_connections/transaction_service.rbi +0 -92
  489. data/rbi/stripe/services/financial_connections_service.rbi +0 -11
  490. data/rbi/stripe/services/forwarding/request_service.rbi +0 -134
  491. data/rbi/stripe/services/forwarding_service.rbi +0 -9
  492. data/rbi/stripe/services/identity/verification_report_service.rbi +0 -87
  493. data/rbi/stripe/services/identity/verification_session_service.rbi +0 -339
  494. data/rbi/stripe/services/identity_service.rbi +0 -10
  495. data/rbi/stripe/services/invoice_item_service.rbi +0 -366
  496. data/rbi/stripe/services/invoice_line_item_service.rbi +0 -259
  497. data/rbi/stripe/services/invoice_payment_service.rbi +0 -71
  498. data/rbi/stripe/services/invoice_rendering_template_service.rbi +0 -82
  499. data/rbi/stripe/services/invoice_service.rbi +0 -3073
  500. data/rbi/stripe/services/issuing/authorization_service.rbi +0 -146
  501. data/rbi/stripe/services/issuing/card_service.rbi +0 -503
  502. data/rbi/stripe/services/issuing/cardholder_service.rbi +0 -587
  503. data/rbi/stripe/services/issuing/dispute_service.rbi +0 -707
  504. data/rbi/stripe/services/issuing/personalization_design_service.rbi +0 -243
  505. data/rbi/stripe/services/issuing/physical_bundle_service.rbi +0 -59
  506. data/rbi/stripe/services/issuing/token_service.rbi +0 -99
  507. data/rbi/stripe/services/issuing/transaction_service.rbi +0 -105
  508. data/rbi/stripe/services/issuing_service.rbi +0 -16
  509. data/rbi/stripe/services/mandate_service.rbi +0 -20
  510. data/rbi/stripe/services/payment_intent_service.rbi +0 -8010
  511. data/rbi/stripe/services/payment_link_service.rbi +0 -1441
  512. data/rbi/stripe/services/payment_method_configuration_service.rbi +0 -2487
  513. data/rbi/stripe/services/payment_method_domain_service.rbi +0 -112
  514. data/rbi/stripe/services/payment_method_service.rbi +0 -781
  515. data/rbi/stripe/services/payout_service.rbi +0 -209
  516. data/rbi/stripe/services/plan_service.rbi +0 -282
  517. data/rbi/stripe/services/price_service.rbi +0 -546
  518. data/rbi/stripe/services/product_feature_service.rbi +0 -67
  519. data/rbi/stripe/services/product_service.rbi +0 -477
  520. data/rbi/stripe/services/promotion_code_service.rbi +0 -214
  521. data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +0 -31
  522. data/rbi/stripe/services/quote_service.rbi +0 -695
  523. data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +0 -85
  524. data/rbi/stripe/services/radar/value_list_item_service.rbi +0 -109
  525. data/rbi/stripe/services/radar/value_list_service.rbi +0 -141
  526. data/rbi/stripe/services/radar_service.rbi +0 -11
  527. data/rbi/stripe/services/refund_service.rbi +0 -185
  528. data/rbi/stripe/services/reporting/report_run_service.rbi +0 -135
  529. data/rbi/stripe/services/reporting/report_type_service.rbi +0 -35
  530. data/rbi/stripe/services/reporting_service.rbi +0 -10
  531. data/rbi/stripe/services/review_service.rbi +0 -84
  532. data/rbi/stripe/services/setup_attempt_service.rbi +0 -65
  533. data/rbi/stripe/services/setup_intent_service.rbi +0 -3709
  534. data/rbi/stripe/services/shipping_rate_service.rbi +0 -241
  535. data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +0 -46
  536. data/rbi/stripe/services/sigma_service.rbi +0 -9
  537. data/rbi/stripe/services/source_service.rbi +0 -663
  538. data/rbi/stripe/services/subscription_item_service.rbi +0 -350
  539. data/rbi/stripe/services/subscription_schedule_service.rbi +0 -1425
  540. data/rbi/stripe/services/subscription_service.rbi +0 -1768
  541. data/rbi/stripe/services/tax/calculation_service.rbi +0 -234
  542. data/rbi/stripe/services/tax/registration_service.rbi +0 -2278
  543. data/rbi/stripe/services/tax/settings_service.rbi +0 -93
  544. data/rbi/stripe/services/tax/transaction_service.rbi +0 -146
  545. data/rbi/stripe/services/tax_code_service.rbi +0 -44
  546. data/rbi/stripe/services/tax_id_service.rbi +0 -110
  547. data/rbi/stripe/services/tax_rate_service.rbi +0 -185
  548. data/rbi/stripe/services/tax_service.rbi +0 -12
  549. data/rbi/stripe/services/terminal/configuration_service.rbi +0 -1328
  550. data/rbi/stripe/services/terminal/connection_token_service.rbi +0 -25
  551. data/rbi/stripe/services/terminal/location_service.rbi +0 -182
  552. data/rbi/stripe/services/terminal/reader_service.rbi +0 -540
  553. data/rbi/stripe/services/terminal_service.rbi +0 -12
  554. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +0 -746
  555. data/rbi/stripe/services/test_helpers/customer_service.rbi +0 -33
  556. data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +0 -848
  557. data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +0 -76
  558. data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +0 -69
  559. data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +0 -711
  560. data/rbi/stripe/services/test_helpers/issuing_service.rbi +0 -14
  561. data/rbi/stripe/services/test_helpers/refund_service.rbi +0 -22
  562. data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +0 -117
  563. data/rbi/stripe/services/test_helpers/terminal_service.rbi +0 -11
  564. data/rbi/stripe/services/test_helpers/test_clock_service.rbi +0 -90
  565. data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +0 -64
  566. data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +0 -125
  567. data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +0 -125
  568. data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +0 -87
  569. data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +0 -87
  570. data/rbi/stripe/services/test_helpers/treasury_service.rbi +0 -15
  571. data/rbi/stripe/services/test_helpers_service.rbi +0 -15
  572. data/rbi/stripe/services/token_service.rbi +0 -1255
  573. data/rbi/stripe/services/topup_service.rbi +0 -176
  574. data/rbi/stripe/services/transfer_reversal_service.rbi +0 -101
  575. data/rbi/stripe/services/transfer_service.rbi +0 -152
  576. data/rbi/stripe/services/treasury/credit_reversal_service.rbi +0 -84
  577. data/rbi/stripe/services/treasury/debit_reversal_service.rbi +0 -88
  578. data/rbi/stripe/services/treasury/financial_account_features_service.rbi +0 -198
  579. data/rbi/stripe/services/treasury/financial_account_service.rbi +0 -566
  580. data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +0 -117
  581. data/rbi/stripe/services/treasury/outbound_payment_service.rbi +0 -304
  582. data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +0 -157
  583. data/rbi/stripe/services/treasury/received_credit_service.rbi +0 -72
  584. data/rbi/stripe/services/treasury/received_debit_service.rbi +0 -59
  585. data/rbi/stripe/services/treasury/transaction_entry_service.rbi +0 -111
  586. data/rbi/stripe/services/treasury/transaction_service.rbi +0 -122
  587. data/rbi/stripe/services/treasury_service.rbi +0 -18
  588. data/rbi/stripe/services/v1_services.rbi +0 -77
  589. data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +0 -39
  590. data/rbi/stripe/services/v2/billing/meter_event_service.rbi +0 -42
  591. data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +0 -18
  592. data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +0 -55
  593. data/rbi/stripe/services/v2/billing_service.rbi +0 -14
  594. data/rbi/stripe/services/v2/core/event_destination_service.rbi +0 -192
  595. data/rbi/stripe/services/v2/core/event_service.rbi +0 -36
  596. data/rbi/stripe/services/v2/core_service.rbi +0 -12
  597. data/rbi/stripe/services/v2_services.rbi +0 -10
  598. data/rbi/stripe/services/webhook_endpoint_service.rbi +0 -129
@@ -1,3894 +0,0 @@
1
- # File generated from our OpenAPI spec
2
- # frozen_string_literal: true
3
-
4
- # typed: true
5
- module Stripe
6
- # Invoices are statements of amounts owed by a customer, and are either
7
- # generated one-off, or generated periodically from a subscription.
8
- #
9
- # They contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments
10
- # that may be caused by subscription upgrades/downgrades (if necessary).
11
- #
12
- # If your invoice is configured to be billed through automatic charges,
13
- # Stripe automatically finalizes your invoice and attempts payment. Note
14
- # that finalizing the invoice,
15
- # [when automatic](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection), does
16
- # not happen immediately as the invoice is created. Stripe waits
17
- # until one hour after the last webhook was successfully sent (or the last
18
- # webhook timed out after failing). If you (and the platforms you may have
19
- # connected to) have no webhooks configured, Stripe waits one hour after
20
- # creation to finalize the invoice.
21
- #
22
- # If your invoice is configured to be billed by sending an email, then based on your
23
- # [email settings](https://dashboard.stripe.com/account/billing/automatic),
24
- # Stripe will email the invoice to your customer and await payment. These
25
- # emails can contain a link to a hosted page to pay the invoice.
26
- #
27
- # Stripe applies any customer credit on the account before determining the
28
- # amount due for the invoice (i.e., the amount that will be actually
29
- # charged). If the amount due for the invoice is less than Stripe's [minimum allowed charge
30
- # per currency](https://docs.stripe.com/docs/currencies#minimum-and-maximum-charge-amounts), the
31
- # invoice is automatically marked paid, and we add the amount due to the
32
- # customer's credit balance which is applied to the next invoice.
33
- #
34
- # More details on the customer's credit balance are
35
- # [here](https://stripe.com/docs/billing/customer/balance).
36
- #
37
- # Related guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending)
38
- class Invoice < APIResource
39
- class AutomaticTax < Stripe::StripeObject
40
- class Liability < Stripe::StripeObject
41
- # The connected account being referenced when `type` is `account`.
42
- sig { returns(T.any(String, Stripe::Account)) }
43
- attr_reader :account
44
- # Type of the account referenced.
45
- sig { returns(String) }
46
- attr_reader :type
47
- end
48
- # If Stripe disabled automatic tax, this enum describes why.
49
- sig { returns(T.nilable(String)) }
50
- attr_reader :disabled_reason
51
- # 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.
52
- sig { returns(T::Boolean) }
53
- attr_reader :enabled
54
- # 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.
55
- sig { returns(T.nilable(Liability)) }
56
- attr_reader :liability
57
- # The tax provider powering automatic tax.
58
- sig { returns(T.nilable(String)) }
59
- attr_reader :provider
60
- # The status of the most recent automated tax calculation for this invoice.
61
- sig { returns(T.nilable(String)) }
62
- attr_reader :status
63
- end
64
- class ConfirmationSecret < Stripe::StripeObject
65
- # The client_secret of the payment that Stripe creates for the invoice after finalization.
66
- sig { returns(String) }
67
- attr_reader :client_secret
68
- # The type of client_secret. Currently this is always payment_intent, referencing the default payment_intent that Stripe creates during invoice finalization
69
- sig { returns(String) }
70
- attr_reader :type
71
- end
72
- class CustomField < Stripe::StripeObject
73
- # The name of the custom field.
74
- sig { returns(String) }
75
- attr_reader :name
76
- # The value of the custom field.
77
- sig { returns(String) }
78
- attr_reader :value
79
- end
80
- class CustomerAddress < Stripe::StripeObject
81
- # City, district, suburb, town, or village.
82
- sig { returns(T.nilable(String)) }
83
- attr_reader :city
84
- # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
85
- sig { returns(T.nilable(String)) }
86
- attr_reader :country
87
- # Address line 1 (e.g., street, PO Box, or company name).
88
- sig { returns(T.nilable(String)) }
89
- attr_reader :line1
90
- # Address line 2 (e.g., apartment, suite, unit, or building).
91
- sig { returns(T.nilable(String)) }
92
- attr_reader :line2
93
- # ZIP or postal code.
94
- sig { returns(T.nilable(String)) }
95
- attr_reader :postal_code
96
- # State, county, province, or region.
97
- sig { returns(T.nilable(String)) }
98
- attr_reader :state
99
- end
100
- class CustomerShipping < Stripe::StripeObject
101
- class Address < Stripe::StripeObject
102
- # City, district, suburb, town, or village.
103
- sig { returns(T.nilable(String)) }
104
- attr_reader :city
105
- # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
106
- sig { returns(T.nilable(String)) }
107
- attr_reader :country
108
- # Address line 1 (e.g., street, PO Box, or company name).
109
- sig { returns(T.nilable(String)) }
110
- attr_reader :line1
111
- # Address line 2 (e.g., apartment, suite, unit, or building).
112
- sig { returns(T.nilable(String)) }
113
- attr_reader :line2
114
- # ZIP or postal code.
115
- sig { returns(T.nilable(String)) }
116
- attr_reader :postal_code
117
- # State, county, province, or region.
118
- sig { returns(T.nilable(String)) }
119
- attr_reader :state
120
- end
121
- # Attribute for field address
122
- sig { returns(Address) }
123
- attr_reader :address
124
- # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
125
- sig { returns(T.nilable(String)) }
126
- attr_reader :carrier
127
- # Recipient name.
128
- sig { returns(String) }
129
- attr_reader :name
130
- # Recipient phone (including extension).
131
- sig { returns(T.nilable(String)) }
132
- attr_reader :phone
133
- # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
134
- sig { returns(T.nilable(String)) }
135
- attr_reader :tracking_number
136
- end
137
- class CustomerTaxId < Stripe::StripeObject
138
- # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, `aw_tin`, `az_tin`, `bd_bin`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, or `unknown`
139
- sig { returns(String) }
140
- attr_reader :type
141
- # The value of the tax ID.
142
- sig { returns(T.nilable(String)) }
143
- attr_reader :value
144
- end
145
- class FromInvoice < Stripe::StripeObject
146
- # The relation between this invoice and the cloned invoice
147
- sig { returns(String) }
148
- attr_reader :action
149
- # The invoice that was cloned.
150
- sig { returns(T.any(String, Stripe::Invoice)) }
151
- attr_reader :invoice
152
- end
153
- class Issuer < Stripe::StripeObject
154
- # The connected account being referenced when `type` is `account`.
155
- sig { returns(T.any(String, Stripe::Account)) }
156
- attr_reader :account
157
- # Type of the account referenced.
158
- sig { returns(String) }
159
- attr_reader :type
160
- end
161
- class LastFinalizationError < Stripe::StripeObject
162
- # For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://stripe.com/docs/declines#retrying-issuer-declines) if they provide one.
163
- sig { returns(String) }
164
- attr_reader :advice_code
165
- # For card errors, the ID of the failed charge.
166
- sig { returns(String) }
167
- attr_reader :charge
168
- # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported.
169
- sig { returns(String) }
170
- attr_reader :code
171
- # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one.
172
- sig { returns(String) }
173
- attr_reader :decline_code
174
- # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported.
175
- sig { returns(String) }
176
- attr_reader :doc_url
177
- # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.
178
- sig { returns(String) }
179
- attr_reader :message
180
- # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error.
181
- sig { returns(String) }
182
- attr_reader :network_advice_code
183
- # For payments declined by the network, an alphanumeric code which indicates the reason the payment failed.
184
- sig { returns(String) }
185
- attr_reader :network_decline_code
186
- # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.
187
- sig { returns(String) }
188
- attr_reader :param
189
- # A PaymentIntent guides you through the process of collecting a payment from your customer.
190
- # We recommend that you create exactly one PaymentIntent for each order or
191
- # customer session in your system. You can reference the PaymentIntent later to
192
- # see the history of payment attempts for a particular session.
193
- #
194
- # A PaymentIntent transitions through
195
- # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses)
196
- # throughout its lifetime as it interfaces with Stripe.js to perform
197
- # authentication flows and ultimately creates at most one successful charge.
198
- #
199
- # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents)
200
- sig { returns(Stripe::PaymentIntent) }
201
- attr_reader :payment_intent
202
- # PaymentMethod objects represent your customer's payment instruments.
203
- # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to
204
- # Customer objects to store instrument details for future payments.
205
- #
206
- # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios).
207
- sig { returns(Stripe::PaymentMethod) }
208
- attr_reader :payment_method
209
- # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors.
210
- sig { returns(String) }
211
- attr_reader :payment_method_type
212
- # A URL to the request log entry in your dashboard.
213
- sig { returns(String) }
214
- attr_reader :request_log_url
215
- # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments.
216
- # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment.
217
- # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow.
218
- #
219
- # Create a SetupIntent when you're ready to collect your customer's payment credentials.
220
- # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid.
221
- # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides
222
- # you through the setup process.
223
- #
224
- # Successful SetupIntents result in payment credentials that are optimized for future payments.
225
- # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through
226
- # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection
227
- # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents).
228
- # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer),
229
- # it automatically attaches the resulting payment method to that Customer after successful setup.
230
- # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on
231
- # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods.
232
- #
233
- # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time.
234
- #
235
- # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents)
236
- sig { returns(Stripe::SetupIntent) }
237
- attr_reader :setup_intent
238
- # Attribute for field source
239
- sig { returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)) }
240
- attr_reader :source
241
- # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error`
242
- sig { returns(String) }
243
- attr_reader :type
244
- end
245
- class Parent < Stripe::StripeObject
246
- class QuoteDetails < Stripe::StripeObject
247
- # The quote that generated this invoice
248
- sig { returns(String) }
249
- attr_reader :quote
250
- end
251
- class SubscriptionDetails < Stripe::StripeObject
252
- # Set of [key-value pairs](https://stripe.com/docs/api/metadata) defined as subscription metadata when an invoice is created. Becomes an immutable snapshot of the subscription metadata at the time of invoice finalization.
253
- # *Note: This attribute is populated only for invoices created on or after June 29, 2023.*
254
- sig { returns(T.nilable(T::Hash[String, String])) }
255
- attr_reader :metadata
256
- # The subscription that generated this invoice
257
- sig { returns(T.any(String, Stripe::Subscription)) }
258
- attr_reader :subscription
259
- # Only set for upcoming invoices that preview prorations. The time used to calculate prorations.
260
- sig { returns(Integer) }
261
- attr_reader :subscription_proration_date
262
- end
263
- # Details about the quote that generated this invoice
264
- sig { returns(T.nilable(QuoteDetails)) }
265
- attr_reader :quote_details
266
- # Details about the subscription that generated this invoice
267
- sig { returns(T.nilable(SubscriptionDetails)) }
268
- attr_reader :subscription_details
269
- # The type of parent that generated this invoice
270
- sig { returns(String) }
271
- attr_reader :type
272
- end
273
- class PaymentSettings < Stripe::StripeObject
274
- class PaymentMethodOptions < Stripe::StripeObject
275
- class AcssDebit < Stripe::StripeObject
276
- class MandateOptions < Stripe::StripeObject
277
- # Transaction type of the mandate.
278
- sig { returns(T.nilable(String)) }
279
- attr_reader :transaction_type
280
- end
281
- # Attribute for field mandate_options
282
- sig { returns(MandateOptions) }
283
- attr_reader :mandate_options
284
- # Bank account verification method.
285
- sig { returns(String) }
286
- attr_reader :verification_method
287
- end
288
- class Bancontact < Stripe::StripeObject
289
- # Preferred language of the Bancontact authorization page that the customer is redirected to.
290
- sig { returns(String) }
291
- attr_reader :preferred_language
292
- end
293
- class Card < Stripe::StripeObject
294
- class Installments < Stripe::StripeObject
295
- # Whether Installments are enabled for this Invoice.
296
- sig { returns(T.nilable(T::Boolean)) }
297
- attr_reader :enabled
298
- end
299
- # Attribute for field installments
300
- sig { returns(Installments) }
301
- attr_reader :installments
302
- # 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.
303
- sig { returns(T.nilable(String)) }
304
- attr_reader :request_three_d_secure
305
- end
306
- class CustomerBalance < Stripe::StripeObject
307
- class BankTransfer < Stripe::StripeObject
308
- class EuBankTransfer < Stripe::StripeObject
309
- # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
310
- sig { returns(String) }
311
- attr_reader :country
312
- end
313
- # Attribute for field eu_bank_transfer
314
- sig { returns(EuBankTransfer) }
315
- attr_reader :eu_bank_transfer
316
- # 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`.
317
- sig { returns(T.nilable(String)) }
318
- attr_reader :type
319
- end
320
- # Attribute for field bank_transfer
321
- sig { returns(BankTransfer) }
322
- attr_reader :bank_transfer
323
- # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
324
- sig { returns(T.nilable(String)) }
325
- attr_reader :funding_type
326
- end
327
- class Konbini < Stripe::StripeObject; end
328
- class SepaDebit < Stripe::StripeObject; end
329
- class UsBankAccount < Stripe::StripeObject
330
- class FinancialConnections < Stripe::StripeObject
331
- class Filters < Stripe::StripeObject
332
- # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
333
- sig { returns(T::Array[String]) }
334
- attr_reader :account_subcategories
335
- end
336
- # Attribute for field filters
337
- sig { returns(Filters) }
338
- attr_reader :filters
339
- # The list of permissions to request. The `payment_method` permission must be included.
340
- sig { returns(T::Array[String]) }
341
- attr_reader :permissions
342
- # Data features requested to be retrieved upon account creation.
343
- sig { returns(T.nilable(T::Array[String])) }
344
- attr_reader :prefetch
345
- end
346
- # Attribute for field financial_connections
347
- sig { returns(FinancialConnections) }
348
- attr_reader :financial_connections
349
- # Bank account verification method.
350
- sig { returns(String) }
351
- attr_reader :verification_method
352
- end
353
- # 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.
354
- sig { returns(T.nilable(AcssDebit)) }
355
- attr_reader :acss_debit
356
- # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
357
- sig { returns(T.nilable(Bancontact)) }
358
- attr_reader :bancontact
359
- # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
360
- sig { returns(T.nilable(Card)) }
361
- attr_reader :card
362
- # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
363
- sig { returns(T.nilable(CustomerBalance)) }
364
- attr_reader :customer_balance
365
- # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
366
- sig { returns(T.nilable(Konbini)) }
367
- attr_reader :konbini
368
- # 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.
369
- sig { returns(T.nilable(SepaDebit)) }
370
- attr_reader :sepa_debit
371
- # 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.
372
- sig { returns(T.nilable(UsBankAccount)) }
373
- attr_reader :us_bank_account
374
- end
375
- # 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.
376
- sig { returns(T.nilable(String)) }
377
- attr_reader :default_mandate
378
- # Payment-method-specific configuration to provide to the invoice’s PaymentIntent.
379
- sig { returns(T.nilable(PaymentMethodOptions)) }
380
- attr_reader :payment_method_options
381
- # 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).
382
- sig { returns(T.nilable(T::Array[String])) }
383
- attr_reader :payment_method_types
384
- end
385
- class Rendering < Stripe::StripeObject
386
- class Pdf < Stripe::StripeObject
387
- # Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size will be switched to a4 or letter based on customer locale.
388
- sig { returns(T.nilable(String)) }
389
- attr_reader :page_size
390
- end
391
- # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
392
- sig { returns(T.nilable(String)) }
393
- attr_reader :amount_tax_display
394
- # Invoice pdf rendering options
395
- sig { returns(T.nilable(Pdf)) }
396
- attr_reader :pdf
397
- # ID of the rendering template that the invoice is formatted by.
398
- sig { returns(T.nilable(String)) }
399
- attr_reader :template
400
- # Version of the rendering template that the invoice is using.
401
- sig { returns(T.nilable(Integer)) }
402
- attr_reader :template_version
403
- end
404
- class ShippingCost < Stripe::StripeObject
405
- class Tax < Stripe::StripeObject
406
- # Amount of tax applied for this rate.
407
- sig { returns(Integer) }
408
- attr_reader :amount
409
- # Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax.
410
- #
411
- # Related guide: [Tax rates](/billing/taxes/tax-rates)
412
- sig { returns(Stripe::TaxRate) }
413
- attr_reader :rate
414
- # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
415
- sig { returns(T.nilable(String)) }
416
- attr_reader :taxability_reason
417
- # The amount on which tax is calculated, in cents (or local equivalent).
418
- sig { returns(T.nilable(Integer)) }
419
- attr_reader :taxable_amount
420
- end
421
- # Total shipping cost before any taxes are applied.
422
- sig { returns(Integer) }
423
- attr_reader :amount_subtotal
424
- # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0.
425
- sig { returns(Integer) }
426
- attr_reader :amount_tax
427
- # Total shipping cost after taxes are applied.
428
- sig { returns(Integer) }
429
- attr_reader :amount_total
430
- # The ID of the ShippingRate for this invoice.
431
- sig { returns(T.nilable(T.any(String, Stripe::ShippingRate))) }
432
- attr_reader :shipping_rate
433
- # The taxes applied to the shipping rate.
434
- sig { returns(T::Array[Tax]) }
435
- attr_reader :taxes
436
- end
437
- class ShippingDetails < Stripe::StripeObject
438
- class Address < Stripe::StripeObject
439
- # City, district, suburb, town, or village.
440
- sig { returns(T.nilable(String)) }
441
- attr_reader :city
442
- # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
443
- sig { returns(T.nilable(String)) }
444
- attr_reader :country
445
- # Address line 1 (e.g., street, PO Box, or company name).
446
- sig { returns(T.nilable(String)) }
447
- attr_reader :line1
448
- # Address line 2 (e.g., apartment, suite, unit, or building).
449
- sig { returns(T.nilable(String)) }
450
- attr_reader :line2
451
- # ZIP or postal code.
452
- sig { returns(T.nilable(String)) }
453
- attr_reader :postal_code
454
- # State, county, province, or region.
455
- sig { returns(T.nilable(String)) }
456
- attr_reader :state
457
- end
458
- # Attribute for field address
459
- sig { returns(Address) }
460
- attr_reader :address
461
- # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
462
- sig { returns(T.nilable(String)) }
463
- attr_reader :carrier
464
- # Recipient name.
465
- sig { returns(String) }
466
- attr_reader :name
467
- # Recipient phone (including extension).
468
- sig { returns(T.nilable(String)) }
469
- attr_reader :phone
470
- # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
471
- sig { returns(T.nilable(String)) }
472
- attr_reader :tracking_number
473
- end
474
- class StatusTransitions < Stripe::StripeObject
475
- # The time that the invoice draft was finalized.
476
- sig { returns(T.nilable(Integer)) }
477
- attr_reader :finalized_at
478
- # The time that the invoice was marked uncollectible.
479
- sig { returns(T.nilable(Integer)) }
480
- attr_reader :marked_uncollectible_at
481
- # The time that the invoice was paid.
482
- sig { returns(T.nilable(Integer)) }
483
- attr_reader :paid_at
484
- # The time that the invoice was voided.
485
- sig { returns(T.nilable(Integer)) }
486
- attr_reader :voided_at
487
- end
488
- class ThresholdReason < Stripe::StripeObject
489
- class ItemReason < Stripe::StripeObject
490
- # The IDs of the line items that triggered the threshold invoice.
491
- sig { returns(T::Array[String]) }
492
- attr_reader :line_item_ids
493
- # The quantity threshold boundary that applied to the given line item.
494
- sig { returns(Integer) }
495
- attr_reader :usage_gte
496
- end
497
- # The total invoice amount threshold boundary if it triggered the threshold invoice.
498
- sig { returns(T.nilable(Integer)) }
499
- attr_reader :amount_gte
500
- # Indicates which line items triggered a threshold invoice.
501
- sig { returns(T::Array[ItemReason]) }
502
- attr_reader :item_reasons
503
- end
504
- class TotalDiscountAmount < Stripe::StripeObject
505
- # The amount, in cents (or local equivalent), of the discount.
506
- sig { returns(Integer) }
507
- attr_reader :amount
508
- # The discount that was applied to get this discount amount.
509
- sig { returns(T.any(String, Stripe::Discount)) }
510
- attr_reader :discount
511
- end
512
- class TotalPretaxCreditAmount < Stripe::StripeObject
513
- # The amount, in cents (or local equivalent), of the pretax credit amount.
514
- sig { returns(Integer) }
515
- attr_reader :amount
516
- # The credit balance transaction that was applied to get this pretax credit amount.
517
- sig { returns(T.nilable(T.any(String, Stripe::Billing::CreditBalanceTransaction))) }
518
- attr_reader :credit_balance_transaction
519
- # The discount that was applied to get this pretax credit amount.
520
- sig { returns(T.any(String, Stripe::Discount)) }
521
- attr_reader :discount
522
- # Type of the pretax credit amount referenced.
523
- sig { returns(String) }
524
- attr_reader :type
525
- end
526
- class TotalTax < Stripe::StripeObject
527
- class TaxRateDetails < Stripe::StripeObject
528
- # Attribute for field tax_rate
529
- sig { returns(String) }
530
- attr_reader :tax_rate
531
- end
532
- # The amount of the tax, in cents (or local equivalent).
533
- sig { returns(Integer) }
534
- attr_reader :amount
535
- # Whether this tax is inclusive or exclusive.
536
- sig { returns(String) }
537
- attr_reader :tax_behavior
538
- # Additional details about the tax rate. Only present when `type` is `tax_rate_details`.
539
- sig { returns(T.nilable(TaxRateDetails)) }
540
- attr_reader :tax_rate_details
541
- # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
542
- sig { returns(String) }
543
- attr_reader :taxability_reason
544
- # The amount on which tax is calculated, in cents (or local equivalent).
545
- sig { returns(T.nilable(Integer)) }
546
- attr_reader :taxable_amount
547
- # The type of tax information.
548
- sig { returns(String) }
549
- attr_reader :type
550
- end
551
- # The country of the business associated with this invoice, most often the business creating the invoice.
552
- sig { returns(T.nilable(String)) }
553
- attr_reader :account_country
554
- # The public name of the business associated with this invoice, most often the business creating the invoice.
555
- sig { returns(T.nilable(String)) }
556
- attr_reader :account_name
557
- # The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
558
- sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) }
559
- attr_reader :account_tax_ids
560
- # Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`.
561
- sig { returns(Integer) }
562
- attr_reader :amount_due
563
- # Amount that was overpaid on the invoice. The amount overpaid is credited to the customer's credit balance.
564
- sig { returns(Integer) }
565
- attr_reader :amount_overpaid
566
- # The amount, in cents (or local equivalent), that was paid.
567
- sig { returns(Integer) }
568
- attr_reader :amount_paid
569
- # The difference between amount_due and amount_paid, in cents (or local equivalent).
570
- sig { returns(Integer) }
571
- attr_reader :amount_remaining
572
- # This is the sum of all the shipping amounts.
573
- sig { returns(Integer) }
574
- attr_reader :amount_shipping
575
- # ID of the Connect Application that created the invoice.
576
- sig { returns(T.nilable(T.any(String, Stripe::Application))) }
577
- attr_reader :application
578
- # Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained.
579
- sig { returns(Integer) }
580
- attr_reader :attempt_count
581
- # Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users.
582
- sig { returns(T::Boolean) }
583
- attr_reader :attempted
584
- # 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.
585
- sig { returns(T::Boolean) }
586
- attr_reader :auto_advance
587
- # Attribute for field automatic_tax
588
- sig { returns(AutomaticTax) }
589
- attr_reader :automatic_tax
590
- # The time when this invoice is currently scheduled to be automatically finalized. The field will be `null` if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be `null` - see `finalized_at` for the time when an already-finalized invoice was finalized.
591
- sig { returns(T.nilable(Integer)) }
592
- attr_reader :automatically_finalizes_at
593
- # Indicates the reason why the invoice was created.
594
- #
595
- # * `manual`: Unrelated to a subscription, for example, created via the invoice editor.
596
- # * `subscription`: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds.
597
- # * `subscription_create`: A new subscription was created.
598
- # * `subscription_cycle`: A subscription advanced into a new period.
599
- # * `subscription_threshold`: A subscription reached a billing threshold.
600
- # * `subscription_update`: A subscription was updated.
601
- # * `upcoming`: Reserved for simulated invoices, per the upcoming invoice endpoint.
602
- sig { returns(T.nilable(String)) }
603
- attr_reader :billing_reason
604
- # 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.
605
- sig { returns(String) }
606
- attr_reader :collection_method
607
- # The confirmation secret associated with this invoice. Currently, this contains the client_secret of the PaymentIntent that Stripe creates during invoice finalization.
608
- sig { returns(T.nilable(ConfirmationSecret)) }
609
- attr_reader :confirmation_secret
610
- # Time at which the object was created. Measured in seconds since the Unix epoch.
611
- sig { returns(Integer) }
612
- attr_reader :created
613
- # 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).
614
- sig { returns(String) }
615
- attr_reader :currency
616
- # Custom fields displayed on the invoice.
617
- sig { returns(T.nilable(T::Array[CustomField])) }
618
- attr_reader :custom_fields
619
- # The ID of the customer who will be billed.
620
- sig { returns(T.nilable(T.any(String, Stripe::Customer))) }
621
- attr_reader :customer
622
- # The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated.
623
- sig { returns(T.nilable(CustomerAddress)) }
624
- attr_reader :customer_address
625
- # The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated.
626
- sig { returns(T.nilable(String)) }
627
- attr_reader :customer_email
628
- # The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated.
629
- sig { returns(T.nilable(String)) }
630
- attr_reader :customer_name
631
- # The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated.
632
- sig { returns(T.nilable(String)) }
633
- attr_reader :customer_phone
634
- # The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated.
635
- sig { returns(T.nilable(CustomerShipping)) }
636
- attr_reader :customer_shipping
637
- # The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated.
638
- sig { returns(T.nilable(String)) }
639
- attr_reader :customer_tax_exempt
640
- # The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated.
641
- sig { returns(T.nilable(T::Array[CustomerTaxId])) }
642
- attr_reader :customer_tax_ids
643
- # 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.
644
- sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) }
645
- attr_reader :default_payment_method
646
- # 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.
647
- sig {
648
- returns(T.nilable(T.any(String, T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source))))
649
- }
650
- attr_reader :default_source
651
- # The tax rates applied to this invoice, if any.
652
- sig { returns(T::Array[Stripe::TaxRate]) }
653
- attr_reader :default_tax_rates
654
- # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
655
- sig { returns(T.nilable(String)) }
656
- attr_reader :description
657
- # The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.
658
- sig { returns(T::Array[T.any(String, Stripe::Discount)]) }
659
- attr_reader :discounts
660
- # The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`.
661
- sig { returns(T.nilable(Integer)) }
662
- attr_reader :due_date
663
- # 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.
664
- sig { returns(T.nilable(Integer)) }
665
- attr_reader :effective_at
666
- # Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null.
667
- sig { returns(T.nilable(Integer)) }
668
- attr_reader :ending_balance
669
- # Footer displayed on the invoice.
670
- sig { returns(T.nilable(String)) }
671
- attr_reader :footer
672
- # Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details.
673
- sig { returns(T.nilable(FromInvoice)) }
674
- attr_reader :from_invoice
675
- # The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null.
676
- sig { returns(T.nilable(String)) }
677
- attr_reader :hosted_invoice_url
678
- # Unique identifier for the object. For preview invoices created using the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint, this id will be prefixed with `upcoming_in`.
679
- sig { returns(String) }
680
- attr_reader :id
681
- # The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null.
682
- sig { returns(T.nilable(String)) }
683
- attr_reader :invoice_pdf
684
- # Attribute for field issuer
685
- sig { returns(Issuer) }
686
- attr_reader :issuer
687
- # The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized.
688
- sig { returns(T.nilable(LastFinalizationError)) }
689
- attr_reader :last_finalization_error
690
- # The ID of the most recent non-draft revision of this invoice
691
- sig { returns(T.nilable(T.any(String, Stripe::Invoice))) }
692
- attr_reader :latest_revision
693
- # The individual line items that make up the invoice. `lines` is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order.
694
- sig { returns(Stripe::ListObject) }
695
- attr_reader :lines
696
- # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
697
- sig { returns(T::Boolean) }
698
- attr_reader :livemode
699
- # 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.
700
- sig { returns(T.nilable(T::Hash[String, String])) }
701
- attr_reader :metadata
702
- # The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`.
703
- sig { returns(T.nilable(Integer)) }
704
- attr_reader :next_payment_attempt
705
- # A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified.
706
- sig { returns(T.nilable(String)) }
707
- attr_reader :number
708
- # String representing the object's type. Objects of the same type share the same value.
709
- sig { returns(String) }
710
- attr_reader :object
711
- # 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.
712
- sig { returns(T.nilable(T.any(String, Stripe::Account))) }
713
- attr_reader :on_behalf_of
714
- # The parent that generated this invoice
715
- sig { returns(T.nilable(Parent)) }
716
- attr_reader :parent
717
- # Attribute for field payment_settings
718
- sig { returns(PaymentSettings) }
719
- attr_reader :payment_settings
720
- # Payments for this invoice
721
- sig { returns(Stripe::ListObject) }
722
- attr_reader :payments
723
- # End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price.
724
- sig { returns(Integer) }
725
- attr_reader :period_end
726
- # Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price.
727
- sig { returns(Integer) }
728
- attr_reader :period_start
729
- # Total amount of all post-payment credit notes issued for this invoice.
730
- sig { returns(Integer) }
731
- attr_reader :post_payment_credit_notes_amount
732
- # Total amount of all pre-payment credit notes issued for this invoice.
733
- sig { returns(Integer) }
734
- attr_reader :pre_payment_credit_notes_amount
735
- # This is the transaction number that appears on email receipts sent for this invoice.
736
- sig { returns(T.nilable(String)) }
737
- attr_reader :receipt_number
738
- # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
739
- sig { returns(T.nilable(Rendering)) }
740
- attr_reader :rendering
741
- # The details of the cost of shipping, including the ShippingRate applied on the invoice.
742
- sig { returns(T.nilable(ShippingCost)) }
743
- attr_reader :shipping_cost
744
- # 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.
745
- sig { returns(T.nilable(ShippingDetails)) }
746
- attr_reader :shipping_details
747
- # Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice.
748
- sig { returns(Integer) }
749
- attr_reader :starting_balance
750
- # Extra information about an invoice for the customer's credit card statement.
751
- sig { returns(T.nilable(String)) }
752
- attr_reader :statement_descriptor
753
- # The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)
754
- sig { returns(T.nilable(String)) }
755
- attr_reader :status
756
- # Attribute for field status_transitions
757
- sig { returns(StatusTransitions) }
758
- attr_reader :status_transitions
759
- # Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated
760
- sig { returns(Integer) }
761
- attr_reader :subtotal
762
- # The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated
763
- sig { returns(T.nilable(Integer)) }
764
- attr_reader :subtotal_excluding_tax
765
- # ID of the test clock this invoice belongs to.
766
- sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) }
767
- attr_reader :test_clock
768
- # Attribute for field threshold_reason
769
- sig { returns(ThresholdReason) }
770
- attr_reader :threshold_reason
771
- # Total after discounts and taxes.
772
- sig { returns(Integer) }
773
- attr_reader :total
774
- # The aggregate amounts calculated per discount across all line items.
775
- sig { returns(T.nilable(T::Array[TotalDiscountAmount])) }
776
- attr_reader :total_discount_amounts
777
- # The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax.
778
- sig { returns(T.nilable(Integer)) }
779
- attr_reader :total_excluding_tax
780
- # Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items.
781
- sig { returns(T.nilable(T::Array[TotalPretaxCreditAmount])) }
782
- attr_reader :total_pretax_credit_amounts
783
- # The aggregate tax information of all line items.
784
- sig { returns(T.nilable(T::Array[TotalTax])) }
785
- attr_reader :total_taxes
786
- # Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created.
787
- sig { returns(T.nilable(Integer)) }
788
- attr_reader :webhooks_delivered_at
789
- # Always true for a deleted object
790
- sig { returns(T::Boolean) }
791
- attr_reader :deleted
792
- class DeleteParams < Stripe::RequestParams; end
793
- class UpdateParams < Stripe::RequestParams
794
- class AutomaticTax < Stripe::RequestParams
795
- class Liability < Stripe::RequestParams
796
- # The connected account being referenced when `type` is `account`.
797
- sig { returns(T.nilable(String)) }
798
- attr_accessor :account
799
- # Type of the account referenced in the request.
800
- sig { returns(String) }
801
- attr_accessor :type
802
- sig { params(account: T.nilable(String), type: String).void }
803
- def initialize(account: nil, type: nil); end
804
- end
805
- # 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.
806
- sig { returns(T::Boolean) }
807
- attr_accessor :enabled
808
- # 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.
809
- sig { returns(T.nilable(::Stripe::Invoice::UpdateParams::AutomaticTax::Liability)) }
810
- attr_accessor :liability
811
- sig {
812
- params(enabled: T::Boolean, liability: T.nilable(::Stripe::Invoice::UpdateParams::AutomaticTax::Liability)).void
813
- }
814
- def initialize(enabled: nil, liability: nil); end
815
- end
816
- class CustomField < Stripe::RequestParams
817
- # The name of the custom field. This may be up to 40 characters.
818
- sig { returns(String) }
819
- attr_accessor :name
820
- # The value of the custom field. This may be up to 140 characters.
821
- sig { returns(String) }
822
- attr_accessor :value
823
- sig { params(name: String, value: String).void }
824
- def initialize(name: nil, value: nil); end
825
- end
826
- class Discount < Stripe::RequestParams
827
- # ID of the coupon to create a new discount for.
828
- sig { returns(T.nilable(String)) }
829
- attr_accessor :coupon
830
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
831
- sig { returns(T.nilable(String)) }
832
- attr_accessor :discount
833
- # ID of the promotion code to create a new discount for.
834
- sig { returns(T.nilable(String)) }
835
- attr_accessor :promotion_code
836
- sig {
837
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
838
- }
839
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
840
- end
841
- class Issuer < Stripe::RequestParams
842
- # The connected account being referenced when `type` is `account`.
843
- sig { returns(T.nilable(String)) }
844
- attr_accessor :account
845
- # Type of the account referenced in the request.
846
- sig { returns(String) }
847
- attr_accessor :type
848
- sig { params(account: T.nilable(String), type: String).void }
849
- def initialize(account: nil, type: nil); end
850
- end
851
- class PaymentSettings < Stripe::RequestParams
852
- class PaymentMethodOptions < Stripe::RequestParams
853
- class AcssDebit < Stripe::RequestParams
854
- class MandateOptions < Stripe::RequestParams
855
- # Transaction type of the mandate.
856
- sig { returns(T.nilable(String)) }
857
- attr_accessor :transaction_type
858
- sig { params(transaction_type: T.nilable(String)).void }
859
- def initialize(transaction_type: nil); end
860
- end
861
- # Additional fields for Mandate creation
862
- sig {
863
- returns(T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions))
864
- }
865
- attr_accessor :mandate_options
866
- # Verification method for the intent
867
- sig { returns(T.nilable(String)) }
868
- attr_accessor :verification_method
869
- sig {
870
- params(mandate_options: T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions), verification_method: T.nilable(String)).void
871
- }
872
- def initialize(mandate_options: nil, verification_method: nil); end
873
- end
874
- class Bancontact < Stripe::RequestParams
875
- # Preferred language of the Bancontact authorization page that the customer is redirected to.
876
- sig { returns(T.nilable(String)) }
877
- attr_accessor :preferred_language
878
- sig { params(preferred_language: T.nilable(String)).void }
879
- def initialize(preferred_language: nil); end
880
- end
881
- class Card < Stripe::RequestParams
882
- class Installments < Stripe::RequestParams
883
- class Plan < Stripe::RequestParams
884
- # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
885
- sig { returns(T.nilable(Integer)) }
886
- attr_accessor :count
887
- # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
888
- # One of `month`.
889
- sig { returns(T.nilable(String)) }
890
- attr_accessor :interval
891
- # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
892
- sig { returns(String) }
893
- attr_accessor :type
894
- sig {
895
- params(count: T.nilable(Integer), interval: T.nilable(String), type: String).void
896
- }
897
- def initialize(count: nil, interval: nil, type: nil); end
898
- end
899
- # Setting to true enables installments for this invoice.
900
- # Setting to false will prevent any selected plan from applying to a payment.
901
- sig { returns(T.nilable(T::Boolean)) }
902
- attr_accessor :enabled
903
- # The selected installment plan to use for this invoice.
904
- sig {
905
- returns(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::Installments::Plan)))
906
- }
907
- attr_accessor :plan
908
- sig {
909
- params(enabled: T.nilable(T::Boolean), plan: T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::Installments::Plan))).void
910
- }
911
- def initialize(enabled: nil, plan: nil); end
912
- end
913
- # Installment configuration for payments attempted on this invoice.
914
- #
915
- # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
916
- sig {
917
- returns(T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::Installments))
918
- }
919
- attr_accessor :installments
920
- # 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.
921
- sig { returns(T.nilable(String)) }
922
- attr_accessor :request_three_d_secure
923
- sig {
924
- params(installments: T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::Installments), request_three_d_secure: T.nilable(String)).void
925
- }
926
- def initialize(installments: nil, request_three_d_secure: nil); end
927
- end
928
- class CustomerBalance < Stripe::RequestParams
929
- class BankTransfer < Stripe::RequestParams
930
- class EuBankTransfer < Stripe::RequestParams
931
- # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
932
- sig { returns(String) }
933
- attr_accessor :country
934
- sig { params(country: String).void }
935
- def initialize(country: nil); end
936
- end
937
- # Configuration for eu_bank_transfer funding type.
938
- sig {
939
- returns(T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer))
940
- }
941
- attr_accessor :eu_bank_transfer
942
- # 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`.
943
- sig { returns(T.nilable(String)) }
944
- attr_accessor :type
945
- sig {
946
- params(eu_bank_transfer: T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer), type: T.nilable(String)).void
947
- }
948
- def initialize(eu_bank_transfer: nil, type: nil); end
949
- end
950
- # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
951
- sig {
952
- returns(T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer))
953
- }
954
- attr_accessor :bank_transfer
955
- # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
956
- sig { returns(T.nilable(String)) }
957
- attr_accessor :funding_type
958
- sig {
959
- params(bank_transfer: T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer), funding_type: T.nilable(String)).void
960
- }
961
- def initialize(bank_transfer: nil, funding_type: nil); end
962
- end
963
- class Konbini < Stripe::RequestParams; end
964
- class SepaDebit < Stripe::RequestParams; end
965
- class UsBankAccount < Stripe::RequestParams
966
- class FinancialConnections < Stripe::RequestParams
967
- class Filters < Stripe::RequestParams
968
- # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
969
- sig { returns(T.nilable(T::Array[String])) }
970
- attr_accessor :account_subcategories
971
- sig { params(account_subcategories: T.nilable(T::Array[String])).void }
972
- def initialize(account_subcategories: nil); end
973
- end
974
- # Provide filters for the linked accounts that the customer can select for the payment method.
975
- sig {
976
- returns(T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
977
- }
978
- attr_accessor :filters
979
- # 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`.
980
- sig { returns(T.nilable(T::Array[String])) }
981
- attr_accessor :permissions
982
- # List of data features that you would like to retrieve upon account creation.
983
- sig { returns(T.nilable(T::Array[String])) }
984
- attr_accessor :prefetch
985
- sig {
986
- params(filters: T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String])).void
987
- }
988
- def initialize(filters: nil, permissions: nil, prefetch: nil); end
989
- end
990
- # Additional fields for Financial Connections Session creation
991
- sig {
992
- returns(T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections))
993
- }
994
- attr_accessor :financial_connections
995
- # Verification method for the intent
996
- sig { returns(T.nilable(String)) }
997
- attr_accessor :verification_method
998
- sig {
999
- params(financial_connections: T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections), verification_method: T.nilable(String)).void
1000
- }
1001
- def initialize(financial_connections: nil, verification_method: nil); end
1002
- end
1003
- # 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.
1004
- sig {
1005
- returns(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit)))
1006
- }
1007
- attr_accessor :acss_debit
1008
- # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
1009
- sig {
1010
- returns(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact)))
1011
- }
1012
- attr_accessor :bancontact
1013
- # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
1014
- sig {
1015
- returns(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Card)))
1016
- }
1017
- attr_accessor :card
1018
- # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
1019
- sig {
1020
- returns(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance)))
1021
- }
1022
- attr_accessor :customer_balance
1023
- # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
1024
- sig {
1025
- returns(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini)))
1026
- }
1027
- attr_accessor :konbini
1028
- # 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.
1029
- sig {
1030
- returns(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit)))
1031
- }
1032
- attr_accessor :sepa_debit
1033
- # 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.
1034
- sig {
1035
- returns(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)))
1036
- }
1037
- attr_accessor :us_bank_account
1038
- sig {
1039
- params(acss_debit: T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit)), bancontact: T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact)), card: T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Card)), customer_balance: T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance)), konbini: T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini)), sepa_debit: T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit)), us_bank_account: T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount))).void
1040
- }
1041
- def initialize(
1042
- acss_debit: nil,
1043
- bancontact: nil,
1044
- card: nil,
1045
- customer_balance: nil,
1046
- konbini: nil,
1047
- sepa_debit: nil,
1048
- us_bank_account: nil
1049
- ); end
1050
- end
1051
- # 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.
1052
- sig { returns(T.nilable(String)) }
1053
- attr_accessor :default_mandate
1054
- # Payment-method-specific configuration to provide to the invoice’s PaymentIntent.
1055
- sig {
1056
- returns(T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions))
1057
- }
1058
- attr_accessor :payment_method_options
1059
- # 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
1060
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
1061
- attr_accessor :payment_method_types
1062
- sig {
1063
- params(default_mandate: T.nilable(String), payment_method_options: T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions), payment_method_types: T.nilable(T.any(String, T::Array[String]))).void
1064
- }
1065
- def initialize(
1066
- default_mandate: nil,
1067
- payment_method_options: nil,
1068
- payment_method_types: nil
1069
- ); end
1070
- end
1071
- class Rendering < Stripe::RequestParams
1072
- class Pdf < Stripe::RequestParams
1073
- # Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`.
1074
- # If set to `auto`, invoice PDF page size defaults to `a4` for customers with
1075
- # Japanese locale and `letter` for customers with other locales.
1076
- sig { returns(T.nilable(String)) }
1077
- attr_accessor :page_size
1078
- sig { params(page_size: T.nilable(String)).void }
1079
- def initialize(page_size: nil); end
1080
- end
1081
- # 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.
1082
- sig { returns(T.nilable(T.any(String, String))) }
1083
- attr_accessor :amount_tax_display
1084
- # Invoice pdf rendering options
1085
- sig { returns(T.nilable(::Stripe::Invoice::UpdateParams::Rendering::Pdf)) }
1086
- attr_accessor :pdf
1087
- # ID of the invoice rendering template to use for this invoice.
1088
- sig { returns(T.nilable(String)) }
1089
- attr_accessor :template
1090
- # The specific version of invoice rendering template to use for this invoice.
1091
- sig { returns(T.nilable(T.any(String, Integer))) }
1092
- attr_accessor :template_version
1093
- sig {
1094
- params(amount_tax_display: T.nilable(T.any(String, String)), pdf: T.nilable(::Stripe::Invoice::UpdateParams::Rendering::Pdf), template: T.nilable(String), template_version: T.nilable(T.any(String, Integer))).void
1095
- }
1096
- def initialize(amount_tax_display: nil, pdf: nil, template: nil, template_version: nil); end
1097
- end
1098
- class ShippingCost < Stripe::RequestParams
1099
- class ShippingRateData < Stripe::RequestParams
1100
- class DeliveryEstimate < Stripe::RequestParams
1101
- class Maximum < Stripe::RequestParams
1102
- # A unit of time.
1103
- sig { returns(String) }
1104
- attr_accessor :unit
1105
- # Must be greater than 0.
1106
- sig { returns(Integer) }
1107
- attr_accessor :value
1108
- sig { params(unit: String, value: Integer).void }
1109
- def initialize(unit: nil, value: nil); end
1110
- end
1111
- class Minimum < Stripe::RequestParams
1112
- # A unit of time.
1113
- sig { returns(String) }
1114
- attr_accessor :unit
1115
- # Must be greater than 0.
1116
- sig { returns(Integer) }
1117
- attr_accessor :value
1118
- sig { params(unit: String, value: Integer).void }
1119
- def initialize(unit: nil, value: nil); end
1120
- end
1121
- # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
1122
- sig {
1123
- returns(T.nilable(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum))
1124
- }
1125
- attr_accessor :maximum
1126
- # The lower bound of the estimated range. If empty, represents no lower bound.
1127
- sig {
1128
- returns(T.nilable(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum))
1129
- }
1130
- attr_accessor :minimum
1131
- sig {
1132
- params(maximum: T.nilable(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum), minimum: T.nilable(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum)).void
1133
- }
1134
- def initialize(maximum: nil, minimum: nil); end
1135
- end
1136
- class FixedAmount < Stripe::RequestParams
1137
- class CurrencyOptions < Stripe::RequestParams
1138
- # A non-negative integer in cents representing how much to charge.
1139
- sig { returns(Integer) }
1140
- attr_accessor :amount
1141
- # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
1142
- sig { returns(T.nilable(String)) }
1143
- attr_accessor :tax_behavior
1144
- sig { params(amount: Integer, tax_behavior: T.nilable(String)).void }
1145
- def initialize(amount: nil, tax_behavior: nil); end
1146
- end
1147
- # A non-negative integer in cents representing how much to charge.
1148
- sig { returns(Integer) }
1149
- attr_accessor :amount
1150
- # 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).
1151
- sig { returns(String) }
1152
- attr_accessor :currency
1153
- # 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).
1154
- sig {
1155
- returns(T.nilable(T::Hash[String, ::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions]))
1156
- }
1157
- attr_accessor :currency_options
1158
- sig {
1159
- params(amount: Integer, currency: String, currency_options: T.nilable(T::Hash[String, ::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions])).void
1160
- }
1161
- def initialize(amount: nil, currency: nil, currency_options: nil); end
1162
- end
1163
- # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
1164
- sig {
1165
- returns(T.nilable(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate))
1166
- }
1167
- attr_accessor :delivery_estimate
1168
- # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
1169
- sig { returns(String) }
1170
- attr_accessor :display_name
1171
- # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
1172
- sig {
1173
- returns(T.nilable(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::FixedAmount))
1174
- }
1175
- attr_accessor :fixed_amount
1176
- # 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`.
1177
- sig { returns(T.nilable(T::Hash[String, String])) }
1178
- attr_accessor :metadata
1179
- # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
1180
- sig { returns(T.nilable(String)) }
1181
- attr_accessor :tax_behavior
1182
- # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
1183
- sig { returns(T.nilable(String)) }
1184
- attr_accessor :tax_code
1185
- # The type of calculation to use on the shipping rate.
1186
- sig { returns(T.nilable(String)) }
1187
- attr_accessor :type
1188
- sig {
1189
- params(delivery_estimate: T.nilable(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate), display_name: String, fixed_amount: T.nilable(::Stripe::Invoice::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
1190
- }
1191
- def initialize(
1192
- delivery_estimate: nil,
1193
- display_name: nil,
1194
- fixed_amount: nil,
1195
- metadata: nil,
1196
- tax_behavior: nil,
1197
- tax_code: nil,
1198
- type: nil
1199
- ); end
1200
- end
1201
- # The ID of the shipping rate to use for this order.
1202
- sig { returns(T.nilable(String)) }
1203
- attr_accessor :shipping_rate
1204
- # Parameters to create a new ad-hoc shipping rate for this order.
1205
- sig { returns(T.nilable(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData)) }
1206
- attr_accessor :shipping_rate_data
1207
- sig {
1208
- params(shipping_rate: T.nilable(String), shipping_rate_data: T.nilable(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData)).void
1209
- }
1210
- def initialize(shipping_rate: nil, shipping_rate_data: nil); end
1211
- end
1212
- class ShippingDetails < Stripe::RequestParams
1213
- class Address < Stripe::RequestParams
1214
- # City, district, suburb, town, or village.
1215
- sig { returns(T.nilable(String)) }
1216
- attr_accessor :city
1217
- # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
1218
- sig { returns(T.nilable(String)) }
1219
- attr_accessor :country
1220
- # Address line 1 (e.g., street, PO Box, or company name).
1221
- sig { returns(T.nilable(String)) }
1222
- attr_accessor :line1
1223
- # Address line 2 (e.g., apartment, suite, unit, or building).
1224
- sig { returns(T.nilable(String)) }
1225
- attr_accessor :line2
1226
- # ZIP or postal code.
1227
- sig { returns(T.nilable(String)) }
1228
- attr_accessor :postal_code
1229
- # State, county, province, or region.
1230
- sig { returns(T.nilable(String)) }
1231
- attr_accessor :state
1232
- sig {
1233
- 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
1234
- }
1235
- def initialize(
1236
- city: nil,
1237
- country: nil,
1238
- line1: nil,
1239
- line2: nil,
1240
- postal_code: nil,
1241
- state: nil
1242
- ); end
1243
- end
1244
- # Shipping address
1245
- sig { returns(::Stripe::Invoice::UpdateParams::ShippingDetails::Address) }
1246
- attr_accessor :address
1247
- # Recipient name.
1248
- sig { returns(String) }
1249
- attr_accessor :name
1250
- # Recipient phone (including extension)
1251
- sig { returns(T.nilable(String)) }
1252
- attr_accessor :phone
1253
- sig {
1254
- params(address: ::Stripe::Invoice::UpdateParams::ShippingDetails::Address, name: String, phone: T.nilable(String)).void
1255
- }
1256
- def initialize(address: nil, name: nil, phone: nil); end
1257
- end
1258
- class TransferData < Stripe::RequestParams
1259
- # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred.
1260
- sig { returns(T.nilable(Integer)) }
1261
- attr_accessor :amount
1262
- # ID of an existing, connected Stripe account.
1263
- sig { returns(String) }
1264
- attr_accessor :destination
1265
- sig { params(amount: T.nilable(Integer), destination: String).void }
1266
- def initialize(amount: nil, destination: nil); end
1267
- end
1268
- # The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
1269
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
1270
- attr_accessor :account_tax_ids
1271
- # 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).
1272
- sig { returns(T.nilable(Integer)) }
1273
- attr_accessor :application_fee_amount
1274
- # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice.
1275
- sig { returns(T.nilable(T::Boolean)) }
1276
- attr_accessor :auto_advance
1277
- # Settings for automatic tax lookup for this invoice.
1278
- sig { returns(T.nilable(::Stripe::Invoice::UpdateParams::AutomaticTax)) }
1279
- attr_accessor :automatic_tax
1280
- # The time when this invoice should be scheduled to finalize (up to 5 years in the future). The invoice is finalized at this time if it's still in draft state. To turn off automatic finalization, set `auto_advance` to false.
1281
- sig { returns(T.nilable(Integer)) }
1282
- attr_accessor :automatically_finalizes_at
1283
- # Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices.
1284
- sig { returns(T.nilable(String)) }
1285
- attr_accessor :collection_method
1286
- # 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.
1287
- sig {
1288
- returns(T.nilable(T.any(String, T::Array[::Stripe::Invoice::UpdateParams::CustomField])))
1289
- }
1290
- attr_accessor :custom_fields
1291
- # 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.
1292
- sig { returns(T.nilable(Integer)) }
1293
- attr_accessor :days_until_due
1294
- # 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.
1295
- sig { returns(T.nilable(String)) }
1296
- attr_accessor :default_payment_method
1297
- # 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.
1298
- sig { returns(T.nilable(String)) }
1299
- attr_accessor :default_source
1300
- # 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.
1301
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
1302
- attr_accessor :default_tax_rates
1303
- # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
1304
- sig { returns(T.nilable(String)) }
1305
- attr_accessor :description
1306
- # The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts.
1307
- sig { returns(T.nilable(T.any(String, T::Array[::Stripe::Invoice::UpdateParams::Discount]))) }
1308
- attr_accessor :discounts
1309
- # 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.
1310
- sig { returns(T.nilable(Integer)) }
1311
- attr_accessor :due_date
1312
- # 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.
1313
- sig { returns(T.nilable(T.any(String, Integer))) }
1314
- attr_accessor :effective_at
1315
- # Specifies which fields in the response should be expanded.
1316
- sig { returns(T.nilable(T::Array[String])) }
1317
- attr_accessor :expand
1318
- # Footer to be displayed on the invoice.
1319
- sig { returns(T.nilable(String)) }
1320
- attr_accessor :footer
1321
- # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
1322
- sig { returns(T.nilable(::Stripe::Invoice::UpdateParams::Issuer)) }
1323
- attr_accessor :issuer
1324
- # 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`.
1325
- sig { returns(T.nilable(T.any(String, T::Hash[String, String]))) }
1326
- attr_accessor :metadata
1327
- # 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.
1328
- sig { returns(T.nilable(String)) }
1329
- attr_accessor :number
1330
- # 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.
1331
- sig { returns(T.nilable(String)) }
1332
- attr_accessor :on_behalf_of
1333
- # Configuration settings for the PaymentIntent that is generated when the invoice is finalized.
1334
- sig { returns(T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings)) }
1335
- attr_accessor :payment_settings
1336
- # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
1337
- sig { returns(T.nilable(::Stripe::Invoice::UpdateParams::Rendering)) }
1338
- attr_accessor :rendering
1339
- # Settings for the cost of shipping for this invoice.
1340
- sig { returns(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::ShippingCost))) }
1341
- attr_accessor :shipping_cost
1342
- # 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.
1343
- sig { returns(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::ShippingDetails))) }
1344
- attr_accessor :shipping_details
1345
- # 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`.
1346
- sig { returns(T.nilable(String)) }
1347
- attr_accessor :statement_descriptor
1348
- # 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.
1349
- sig { returns(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::TransferData))) }
1350
- attr_accessor :transfer_data
1351
- sig {
1352
- params(account_tax_ids: 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::Invoice::UpdateParams::AutomaticTax), automatically_finalizes_at: T.nilable(Integer), collection_method: T.nilable(String), custom_fields: T.nilable(T.any(String, T::Array[::Stripe::Invoice::UpdateParams::CustomField])), days_until_due: T.nilable(Integer), default_payment_method: T.nilable(String), default_source: T.nilable(String), default_tax_rates: T.nilable(T.any(String, T::Array[String])), description: T.nilable(String), discounts: T.nilable(T.any(String, T::Array[::Stripe::Invoice::UpdateParams::Discount])), due_date: T.nilable(Integer), effective_at: T.nilable(T.any(String, Integer)), expand: T.nilable(T::Array[String]), footer: T.nilable(String), issuer: T.nilable(::Stripe::Invoice::UpdateParams::Issuer), metadata: T.nilable(T.any(String, T::Hash[String, String])), number: T.nilable(String), on_behalf_of: T.nilable(String), payment_settings: T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings), rendering: T.nilable(::Stripe::Invoice::UpdateParams::Rendering), shipping_cost: T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::ShippingCost)), shipping_details: T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::ShippingDetails)), statement_descriptor: T.nilable(String), transfer_data: T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::TransferData))).void
1353
- }
1354
- def initialize(
1355
- account_tax_ids: nil,
1356
- application_fee_amount: nil,
1357
- auto_advance: nil,
1358
- automatic_tax: nil,
1359
- automatically_finalizes_at: nil,
1360
- collection_method: nil,
1361
- custom_fields: nil,
1362
- days_until_due: nil,
1363
- default_payment_method: nil,
1364
- default_source: nil,
1365
- default_tax_rates: nil,
1366
- description: nil,
1367
- discounts: nil,
1368
- due_date: nil,
1369
- effective_at: nil,
1370
- expand: nil,
1371
- footer: nil,
1372
- issuer: nil,
1373
- metadata: nil,
1374
- number: nil,
1375
- on_behalf_of: nil,
1376
- payment_settings: nil,
1377
- rendering: nil,
1378
- shipping_cost: nil,
1379
- shipping_details: nil,
1380
- statement_descriptor: nil,
1381
- transfer_data: nil
1382
- ); end
1383
- end
1384
- class ListParams < Stripe::RequestParams
1385
- class Created < Stripe::RequestParams
1386
- # Minimum value to filter by (exclusive)
1387
- sig { returns(T.nilable(Integer)) }
1388
- attr_accessor :gt
1389
- # Minimum value to filter by (inclusive)
1390
- sig { returns(T.nilable(Integer)) }
1391
- attr_accessor :gte
1392
- # Maximum value to filter by (exclusive)
1393
- sig { returns(T.nilable(Integer)) }
1394
- attr_accessor :lt
1395
- # Maximum value to filter by (inclusive)
1396
- sig { returns(T.nilable(Integer)) }
1397
- attr_accessor :lte
1398
- sig {
1399
- params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
1400
- }
1401
- def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
1402
- end
1403
- class DueDate < Stripe::RequestParams
1404
- # Minimum value to filter by (exclusive)
1405
- sig { returns(T.nilable(Integer)) }
1406
- attr_accessor :gt
1407
- # Minimum value to filter by (inclusive)
1408
- sig { returns(T.nilable(Integer)) }
1409
- attr_accessor :gte
1410
- # Maximum value to filter by (exclusive)
1411
- sig { returns(T.nilable(Integer)) }
1412
- attr_accessor :lt
1413
- # Maximum value to filter by (inclusive)
1414
- sig { returns(T.nilable(Integer)) }
1415
- attr_accessor :lte
1416
- sig {
1417
- params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
1418
- }
1419
- def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
1420
- end
1421
- # The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`.
1422
- sig { returns(T.nilable(String)) }
1423
- attr_accessor :collection_method
1424
- # Only return invoices that were created during the given date interval.
1425
- sig { returns(T.nilable(T.any(::Stripe::Invoice::ListParams::Created, Integer))) }
1426
- attr_accessor :created
1427
- # Only return invoices for the customer specified by this customer ID.
1428
- sig { returns(T.nilable(String)) }
1429
- attr_accessor :customer
1430
- # Attribute for param field due_date
1431
- sig { returns(T.nilable(T.any(::Stripe::Invoice::ListParams::DueDate, Integer))) }
1432
- attr_accessor :due_date
1433
- # 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.
1434
- sig { returns(T.nilable(String)) }
1435
- attr_accessor :ending_before
1436
- # Specifies which fields in the response should be expanded.
1437
- sig { returns(T.nilable(T::Array[String])) }
1438
- attr_accessor :expand
1439
- # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
1440
- sig { returns(T.nilable(Integer)) }
1441
- attr_accessor :limit
1442
- # 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.
1443
- sig { returns(T.nilable(String)) }
1444
- attr_accessor :starting_after
1445
- # The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)
1446
- sig { returns(T.nilable(String)) }
1447
- attr_accessor :status
1448
- # Only return invoices for the subscription specified by this subscription ID.
1449
- sig { returns(T.nilable(String)) }
1450
- attr_accessor :subscription
1451
- sig {
1452
- params(collection_method: T.nilable(String), created: T.nilable(T.any(::Stripe::Invoice::ListParams::Created, Integer)), customer: T.nilable(String), due_date: T.nilable(T.any(::Stripe::Invoice::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
1453
- }
1454
- def initialize(
1455
- collection_method: nil,
1456
- created: nil,
1457
- customer: nil,
1458
- due_date: nil,
1459
- ending_before: nil,
1460
- expand: nil,
1461
- limit: nil,
1462
- starting_after: nil,
1463
- status: nil,
1464
- subscription: nil
1465
- ); end
1466
- end
1467
- class CreateParams < Stripe::RequestParams
1468
- class AutomaticTax < Stripe::RequestParams
1469
- class Liability < Stripe::RequestParams
1470
- # The connected account being referenced when `type` is `account`.
1471
- sig { returns(T.nilable(String)) }
1472
- attr_accessor :account
1473
- # Type of the account referenced in the request.
1474
- sig { returns(String) }
1475
- attr_accessor :type
1476
- sig { params(account: T.nilable(String), type: String).void }
1477
- def initialize(account: nil, type: nil); end
1478
- end
1479
- # 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.
1480
- sig { returns(T::Boolean) }
1481
- attr_accessor :enabled
1482
- # 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.
1483
- sig { returns(T.nilable(::Stripe::Invoice::CreateParams::AutomaticTax::Liability)) }
1484
- attr_accessor :liability
1485
- sig {
1486
- params(enabled: T::Boolean, liability: T.nilable(::Stripe::Invoice::CreateParams::AutomaticTax::Liability)).void
1487
- }
1488
- def initialize(enabled: nil, liability: nil); end
1489
- end
1490
- class CustomField < Stripe::RequestParams
1491
- # The name of the custom field. This may be up to 40 characters.
1492
- sig { returns(String) }
1493
- attr_accessor :name
1494
- # The value of the custom field. This may be up to 140 characters.
1495
- sig { returns(String) }
1496
- attr_accessor :value
1497
- sig { params(name: String, value: String).void }
1498
- def initialize(name: nil, value: nil); end
1499
- end
1500
- class Discount < Stripe::RequestParams
1501
- # ID of the coupon to create a new discount for.
1502
- sig { returns(T.nilable(String)) }
1503
- attr_accessor :coupon
1504
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1505
- sig { returns(T.nilable(String)) }
1506
- attr_accessor :discount
1507
- # ID of the promotion code to create a new discount for.
1508
- sig { returns(T.nilable(String)) }
1509
- attr_accessor :promotion_code
1510
- sig {
1511
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
1512
- }
1513
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
1514
- end
1515
- class FromInvoice < Stripe::RequestParams
1516
- # The relation between the new invoice and the original invoice. Currently, only 'revision' is permitted
1517
- sig { returns(String) }
1518
- attr_accessor :action
1519
- # The `id` of the invoice that will be cloned.
1520
- sig { returns(String) }
1521
- attr_accessor :invoice
1522
- sig { params(action: String, invoice: String).void }
1523
- def initialize(action: nil, invoice: nil); end
1524
- end
1525
- class Issuer < Stripe::RequestParams
1526
- # The connected account being referenced when `type` is `account`.
1527
- sig { returns(T.nilable(String)) }
1528
- attr_accessor :account
1529
- # Type of the account referenced in the request.
1530
- sig { returns(String) }
1531
- attr_accessor :type
1532
- sig { params(account: T.nilable(String), type: String).void }
1533
- def initialize(account: nil, type: nil); end
1534
- end
1535
- class PaymentSettings < Stripe::RequestParams
1536
- class PaymentMethodOptions < Stripe::RequestParams
1537
- class AcssDebit < Stripe::RequestParams
1538
- class MandateOptions < Stripe::RequestParams
1539
- # Transaction type of the mandate.
1540
- sig { returns(T.nilable(String)) }
1541
- attr_accessor :transaction_type
1542
- sig { params(transaction_type: T.nilable(String)).void }
1543
- def initialize(transaction_type: nil); end
1544
- end
1545
- # Additional fields for Mandate creation
1546
- sig {
1547
- returns(T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions))
1548
- }
1549
- attr_accessor :mandate_options
1550
- # Verification method for the intent
1551
- sig { returns(T.nilable(String)) }
1552
- attr_accessor :verification_method
1553
- sig {
1554
- params(mandate_options: T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions), verification_method: T.nilable(String)).void
1555
- }
1556
- def initialize(mandate_options: nil, verification_method: nil); end
1557
- end
1558
- class Bancontact < Stripe::RequestParams
1559
- # Preferred language of the Bancontact authorization page that the customer is redirected to.
1560
- sig { returns(T.nilable(String)) }
1561
- attr_accessor :preferred_language
1562
- sig { params(preferred_language: T.nilable(String)).void }
1563
- def initialize(preferred_language: nil); end
1564
- end
1565
- class Card < Stripe::RequestParams
1566
- class Installments < Stripe::RequestParams
1567
- class Plan < Stripe::RequestParams
1568
- # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
1569
- sig { returns(T.nilable(Integer)) }
1570
- attr_accessor :count
1571
- # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
1572
- # One of `month`.
1573
- sig { returns(T.nilable(String)) }
1574
- attr_accessor :interval
1575
- # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
1576
- sig { returns(String) }
1577
- attr_accessor :type
1578
- sig {
1579
- params(count: T.nilable(Integer), interval: T.nilable(String), type: String).void
1580
- }
1581
- def initialize(count: nil, interval: nil, type: nil); end
1582
- end
1583
- # Setting to true enables installments for this invoice.
1584
- # Setting to false will prevent any selected plan from applying to a payment.
1585
- sig { returns(T.nilable(T::Boolean)) }
1586
- attr_accessor :enabled
1587
- # The selected installment plan to use for this invoice.
1588
- sig {
1589
- returns(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Card::Installments::Plan)))
1590
- }
1591
- attr_accessor :plan
1592
- sig {
1593
- params(enabled: T.nilable(T::Boolean), plan: T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Card::Installments::Plan))).void
1594
- }
1595
- def initialize(enabled: nil, plan: nil); end
1596
- end
1597
- # Installment configuration for payments attempted on this invoice.
1598
- #
1599
- # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
1600
- sig {
1601
- returns(T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Card::Installments))
1602
- }
1603
- attr_accessor :installments
1604
- # 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.
1605
- sig { returns(T.nilable(String)) }
1606
- attr_accessor :request_three_d_secure
1607
- sig {
1608
- params(installments: T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Card::Installments), request_three_d_secure: T.nilable(String)).void
1609
- }
1610
- def initialize(installments: nil, request_three_d_secure: nil); end
1611
- end
1612
- class CustomerBalance < Stripe::RequestParams
1613
- class BankTransfer < Stripe::RequestParams
1614
- class EuBankTransfer < Stripe::RequestParams
1615
- # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
1616
- sig { returns(String) }
1617
- attr_accessor :country
1618
- sig { params(country: String).void }
1619
- def initialize(country: nil); end
1620
- end
1621
- # Configuration for eu_bank_transfer funding type.
1622
- sig {
1623
- returns(T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer))
1624
- }
1625
- attr_accessor :eu_bank_transfer
1626
- # 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`.
1627
- sig { returns(T.nilable(String)) }
1628
- attr_accessor :type
1629
- sig {
1630
- params(eu_bank_transfer: T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer), type: T.nilable(String)).void
1631
- }
1632
- def initialize(eu_bank_transfer: nil, type: nil); end
1633
- end
1634
- # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
1635
- sig {
1636
- returns(T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer))
1637
- }
1638
- attr_accessor :bank_transfer
1639
- # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
1640
- sig { returns(T.nilable(String)) }
1641
- attr_accessor :funding_type
1642
- sig {
1643
- params(bank_transfer: T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer), funding_type: T.nilable(String)).void
1644
- }
1645
- def initialize(bank_transfer: nil, funding_type: nil); end
1646
- end
1647
- class Konbini < Stripe::RequestParams; end
1648
- class SepaDebit < Stripe::RequestParams; end
1649
- class UsBankAccount < Stripe::RequestParams
1650
- class FinancialConnections < Stripe::RequestParams
1651
- class Filters < Stripe::RequestParams
1652
- # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
1653
- sig { returns(T.nilable(T::Array[String])) }
1654
- attr_accessor :account_subcategories
1655
- sig { params(account_subcategories: T.nilable(T::Array[String])).void }
1656
- def initialize(account_subcategories: nil); end
1657
- end
1658
- # Provide filters for the linked accounts that the customer can select for the payment method.
1659
- sig {
1660
- returns(T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
1661
- }
1662
- attr_accessor :filters
1663
- # 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`.
1664
- sig { returns(T.nilable(T::Array[String])) }
1665
- attr_accessor :permissions
1666
- # List of data features that you would like to retrieve upon account creation.
1667
- sig { returns(T.nilable(T::Array[String])) }
1668
- attr_accessor :prefetch
1669
- sig {
1670
- params(filters: T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String])).void
1671
- }
1672
- def initialize(filters: nil, permissions: nil, prefetch: nil); end
1673
- end
1674
- # Additional fields for Financial Connections Session creation
1675
- sig {
1676
- returns(T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections))
1677
- }
1678
- attr_accessor :financial_connections
1679
- # Verification method for the intent
1680
- sig { returns(T.nilable(String)) }
1681
- attr_accessor :verification_method
1682
- sig {
1683
- params(financial_connections: T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections), verification_method: T.nilable(String)).void
1684
- }
1685
- def initialize(financial_connections: nil, verification_method: nil); end
1686
- end
1687
- # 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.
1688
- sig {
1689
- returns(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit)))
1690
- }
1691
- attr_accessor :acss_debit
1692
- # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
1693
- sig {
1694
- returns(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact)))
1695
- }
1696
- attr_accessor :bancontact
1697
- # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
1698
- sig {
1699
- returns(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Card)))
1700
- }
1701
- attr_accessor :card
1702
- # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
1703
- sig {
1704
- returns(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance)))
1705
- }
1706
- attr_accessor :customer_balance
1707
- # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
1708
- sig {
1709
- returns(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini)))
1710
- }
1711
- attr_accessor :konbini
1712
- # 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.
1713
- sig {
1714
- returns(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit)))
1715
- }
1716
- attr_accessor :sepa_debit
1717
- # 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.
1718
- sig {
1719
- returns(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)))
1720
- }
1721
- attr_accessor :us_bank_account
1722
- sig {
1723
- params(acss_debit: T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit)), bancontact: T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact)), card: T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Card)), customer_balance: T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance)), konbini: T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini)), sepa_debit: T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit)), us_bank_account: T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount))).void
1724
- }
1725
- def initialize(
1726
- acss_debit: nil,
1727
- bancontact: nil,
1728
- card: nil,
1729
- customer_balance: nil,
1730
- konbini: nil,
1731
- sepa_debit: nil,
1732
- us_bank_account: nil
1733
- ); end
1734
- end
1735
- # 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.
1736
- sig { returns(T.nilable(String)) }
1737
- attr_accessor :default_mandate
1738
- # Payment-method-specific configuration to provide to the invoice’s PaymentIntent.
1739
- sig {
1740
- returns(T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions))
1741
- }
1742
- attr_accessor :payment_method_options
1743
- # 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
1744
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
1745
- attr_accessor :payment_method_types
1746
- sig {
1747
- params(default_mandate: T.nilable(String), payment_method_options: T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions), payment_method_types: T.nilable(T.any(String, T::Array[String]))).void
1748
- }
1749
- def initialize(
1750
- default_mandate: nil,
1751
- payment_method_options: nil,
1752
- payment_method_types: nil
1753
- ); end
1754
- end
1755
- class Rendering < Stripe::RequestParams
1756
- class Pdf < Stripe::RequestParams
1757
- # Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`.
1758
- # If set to `auto`, invoice PDF page size defaults to `a4` for customers with
1759
- # Japanese locale and `letter` for customers with other locales.
1760
- sig { returns(T.nilable(String)) }
1761
- attr_accessor :page_size
1762
- sig { params(page_size: T.nilable(String)).void }
1763
- def initialize(page_size: nil); end
1764
- end
1765
- # 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.
1766
- sig { returns(T.nilable(T.any(String, String))) }
1767
- attr_accessor :amount_tax_display
1768
- # Invoice pdf rendering options
1769
- sig { returns(T.nilable(::Stripe::Invoice::CreateParams::Rendering::Pdf)) }
1770
- attr_accessor :pdf
1771
- # ID of the invoice rendering template to use for this invoice.
1772
- sig { returns(T.nilable(String)) }
1773
- attr_accessor :template
1774
- # The specific version of invoice rendering template to use for this invoice.
1775
- sig { returns(T.nilable(T.any(String, Integer))) }
1776
- attr_accessor :template_version
1777
- sig {
1778
- params(amount_tax_display: T.nilable(T.any(String, String)), pdf: T.nilable(::Stripe::Invoice::CreateParams::Rendering::Pdf), template: T.nilable(String), template_version: T.nilable(T.any(String, Integer))).void
1779
- }
1780
- def initialize(amount_tax_display: nil, pdf: nil, template: nil, template_version: nil); end
1781
- end
1782
- class ShippingCost < Stripe::RequestParams
1783
- class ShippingRateData < Stripe::RequestParams
1784
- class DeliveryEstimate < Stripe::RequestParams
1785
- class Maximum < Stripe::RequestParams
1786
- # A unit of time.
1787
- sig { returns(String) }
1788
- attr_accessor :unit
1789
- # Must be greater than 0.
1790
- sig { returns(Integer) }
1791
- attr_accessor :value
1792
- sig { params(unit: String, value: Integer).void }
1793
- def initialize(unit: nil, value: nil); end
1794
- end
1795
- class Minimum < Stripe::RequestParams
1796
- # A unit of time.
1797
- sig { returns(String) }
1798
- attr_accessor :unit
1799
- # Must be greater than 0.
1800
- sig { returns(Integer) }
1801
- attr_accessor :value
1802
- sig { params(unit: String, value: Integer).void }
1803
- def initialize(unit: nil, value: nil); end
1804
- end
1805
- # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
1806
- sig {
1807
- returns(T.nilable(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum))
1808
- }
1809
- attr_accessor :maximum
1810
- # The lower bound of the estimated range. If empty, represents no lower bound.
1811
- sig {
1812
- returns(T.nilable(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum))
1813
- }
1814
- attr_accessor :minimum
1815
- sig {
1816
- params(maximum: T.nilable(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum), minimum: T.nilable(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum)).void
1817
- }
1818
- def initialize(maximum: nil, minimum: nil); end
1819
- end
1820
- class FixedAmount < Stripe::RequestParams
1821
- class CurrencyOptions < Stripe::RequestParams
1822
- # A non-negative integer in cents representing how much to charge.
1823
- sig { returns(Integer) }
1824
- attr_accessor :amount
1825
- # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
1826
- sig { returns(T.nilable(String)) }
1827
- attr_accessor :tax_behavior
1828
- sig { params(amount: Integer, tax_behavior: T.nilable(String)).void }
1829
- def initialize(amount: nil, tax_behavior: nil); end
1830
- end
1831
- # A non-negative integer in cents representing how much to charge.
1832
- sig { returns(Integer) }
1833
- attr_accessor :amount
1834
- # 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).
1835
- sig { returns(String) }
1836
- attr_accessor :currency
1837
- # 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).
1838
- sig {
1839
- returns(T.nilable(T::Hash[String, ::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions]))
1840
- }
1841
- attr_accessor :currency_options
1842
- sig {
1843
- params(amount: Integer, currency: String, currency_options: T.nilable(T::Hash[String, ::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions])).void
1844
- }
1845
- def initialize(amount: nil, currency: nil, currency_options: nil); end
1846
- end
1847
- # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
1848
- sig {
1849
- returns(T.nilable(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate))
1850
- }
1851
- attr_accessor :delivery_estimate
1852
- # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
1853
- sig { returns(String) }
1854
- attr_accessor :display_name
1855
- # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
1856
- sig {
1857
- returns(T.nilable(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::FixedAmount))
1858
- }
1859
- attr_accessor :fixed_amount
1860
- # 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`.
1861
- sig { returns(T.nilable(T::Hash[String, String])) }
1862
- attr_accessor :metadata
1863
- # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
1864
- sig { returns(T.nilable(String)) }
1865
- attr_accessor :tax_behavior
1866
- # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
1867
- sig { returns(T.nilable(String)) }
1868
- attr_accessor :tax_code
1869
- # The type of calculation to use on the shipping rate.
1870
- sig { returns(T.nilable(String)) }
1871
- attr_accessor :type
1872
- sig {
1873
- params(delivery_estimate: T.nilable(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate), display_name: String, fixed_amount: T.nilable(::Stripe::Invoice::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
1874
- }
1875
- def initialize(
1876
- delivery_estimate: nil,
1877
- display_name: nil,
1878
- fixed_amount: nil,
1879
- metadata: nil,
1880
- tax_behavior: nil,
1881
- tax_code: nil,
1882
- type: nil
1883
- ); end
1884
- end
1885
- # The ID of the shipping rate to use for this order.
1886
- sig { returns(T.nilable(String)) }
1887
- attr_accessor :shipping_rate
1888
- # Parameters to create a new ad-hoc shipping rate for this order.
1889
- sig { returns(T.nilable(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData)) }
1890
- attr_accessor :shipping_rate_data
1891
- sig {
1892
- params(shipping_rate: T.nilable(String), shipping_rate_data: T.nilable(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData)).void
1893
- }
1894
- def initialize(shipping_rate: nil, shipping_rate_data: nil); end
1895
- end
1896
- class ShippingDetails < Stripe::RequestParams
1897
- class Address < Stripe::RequestParams
1898
- # City, district, suburb, town, or village.
1899
- sig { returns(T.nilable(String)) }
1900
- attr_accessor :city
1901
- # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
1902
- sig { returns(T.nilable(String)) }
1903
- attr_accessor :country
1904
- # Address line 1 (e.g., street, PO Box, or company name).
1905
- sig { returns(T.nilable(String)) }
1906
- attr_accessor :line1
1907
- # Address line 2 (e.g., apartment, suite, unit, or building).
1908
- sig { returns(T.nilable(String)) }
1909
- attr_accessor :line2
1910
- # ZIP or postal code.
1911
- sig { returns(T.nilable(String)) }
1912
- attr_accessor :postal_code
1913
- # State, county, province, or region.
1914
- sig { returns(T.nilable(String)) }
1915
- attr_accessor :state
1916
- sig {
1917
- 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
1918
- }
1919
- def initialize(
1920
- city: nil,
1921
- country: nil,
1922
- line1: nil,
1923
- line2: nil,
1924
- postal_code: nil,
1925
- state: nil
1926
- ); end
1927
- end
1928
- # Shipping address
1929
- sig { returns(::Stripe::Invoice::CreateParams::ShippingDetails::Address) }
1930
- attr_accessor :address
1931
- # Recipient name.
1932
- sig { returns(String) }
1933
- attr_accessor :name
1934
- # Recipient phone (including extension)
1935
- sig { returns(T.nilable(String)) }
1936
- attr_accessor :phone
1937
- sig {
1938
- params(address: ::Stripe::Invoice::CreateParams::ShippingDetails::Address, name: String, phone: T.nilable(String)).void
1939
- }
1940
- def initialize(address: nil, name: nil, phone: nil); end
1941
- end
1942
- class TransferData < Stripe::RequestParams
1943
- # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred.
1944
- sig { returns(T.nilable(Integer)) }
1945
- attr_accessor :amount
1946
- # ID of an existing, connected Stripe account.
1947
- sig { returns(String) }
1948
- attr_accessor :destination
1949
- sig { params(amount: T.nilable(Integer), destination: String).void }
1950
- def initialize(amount: nil, destination: nil); end
1951
- end
1952
- # The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
1953
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
1954
- attr_accessor :account_tax_ids
1955
- # 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).
1956
- sig { returns(T.nilable(Integer)) }
1957
- attr_accessor :application_fee_amount
1958
- # 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. Defaults to false.
1959
- sig { returns(T.nilable(T::Boolean)) }
1960
- attr_accessor :auto_advance
1961
- # Settings for automatic tax lookup for this invoice.
1962
- sig { returns(T.nilable(::Stripe::Invoice::CreateParams::AutomaticTax)) }
1963
- attr_accessor :automatic_tax
1964
- # The time when this invoice should be scheduled to finalize (up to 5 years in the future). The invoice is finalized at this time if it's still in draft state.
1965
- sig { returns(T.nilable(Integer)) }
1966
- attr_accessor :automatically_finalizes_at
1967
- # 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`.
1968
- sig { returns(T.nilable(String)) }
1969
- attr_accessor :collection_method
1970
- # The currency to create this invoice in. Defaults to that of `customer` if not specified.
1971
- sig { returns(T.nilable(String)) }
1972
- attr_accessor :currency
1973
- # A list of up to 4 custom fields to be displayed on the invoice.
1974
- sig {
1975
- returns(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreateParams::CustomField])))
1976
- }
1977
- attr_accessor :custom_fields
1978
- # The ID of the customer who will be billed.
1979
- sig { returns(T.nilable(String)) }
1980
- attr_accessor :customer
1981
- # The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.
1982
- sig { returns(T.nilable(Integer)) }
1983
- attr_accessor :days_until_due
1984
- # 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.
1985
- sig { returns(T.nilable(String)) }
1986
- attr_accessor :default_payment_method
1987
- # 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.
1988
- sig { returns(T.nilable(String)) }
1989
- attr_accessor :default_source
1990
- # The tax rates that will apply to any line item that does not have `tax_rates` set.
1991
- sig { returns(T.nilable(T::Array[String])) }
1992
- attr_accessor :default_tax_rates
1993
- # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
1994
- sig { returns(T.nilable(String)) }
1995
- attr_accessor :description
1996
- # 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.
1997
- sig { returns(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreateParams::Discount]))) }
1998
- attr_accessor :discounts
1999
- # The date on which payment for this invoice is due. Valid only for invoices where `collection_method=send_invoice`.
2000
- sig { returns(T.nilable(Integer)) }
2001
- attr_accessor :due_date
2002
- # 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.
2003
- sig { returns(T.nilable(Integer)) }
2004
- attr_accessor :effective_at
2005
- # Specifies which fields in the response should be expanded.
2006
- sig { returns(T.nilable(T::Array[String])) }
2007
- attr_accessor :expand
2008
- # Footer to be displayed on the invoice.
2009
- sig { returns(T.nilable(String)) }
2010
- attr_accessor :footer
2011
- # 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.
2012
- sig { returns(T.nilable(::Stripe::Invoice::CreateParams::FromInvoice)) }
2013
- attr_accessor :from_invoice
2014
- # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
2015
- sig { returns(T.nilable(::Stripe::Invoice::CreateParams::Issuer)) }
2016
- attr_accessor :issuer
2017
- # 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`.
2018
- sig { returns(T.nilable(T.any(String, T::Hash[String, String]))) }
2019
- attr_accessor :metadata
2020
- # 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.
2021
- sig { returns(T.nilable(String)) }
2022
- attr_accessor :number
2023
- # 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.
2024
- sig { returns(T.nilable(String)) }
2025
- attr_accessor :on_behalf_of
2026
- # Configuration settings for the PaymentIntent that is generated when the invoice is finalized.
2027
- sig { returns(T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings)) }
2028
- attr_accessor :payment_settings
2029
- # How to handle pending invoice items on invoice creation. Defaults to `exclude` if the parameter is omitted.
2030
- sig { returns(T.nilable(String)) }
2031
- attr_accessor :pending_invoice_items_behavior
2032
- # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
2033
- sig { returns(T.nilable(::Stripe::Invoice::CreateParams::Rendering)) }
2034
- attr_accessor :rendering
2035
- # Settings for the cost of shipping for this invoice.
2036
- sig { returns(T.nilable(::Stripe::Invoice::CreateParams::ShippingCost)) }
2037
- attr_accessor :shipping_cost
2038
- # 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.
2039
- sig { returns(T.nilable(::Stripe::Invoice::CreateParams::ShippingDetails)) }
2040
- attr_accessor :shipping_details
2041
- # 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`.
2042
- sig { returns(T.nilable(String)) }
2043
- attr_accessor :statement_descriptor
2044
- # 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.
2045
- sig { returns(T.nilable(String)) }
2046
- attr_accessor :subscription
2047
- # 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.
2048
- sig { returns(T.nilable(::Stripe::Invoice::CreateParams::TransferData)) }
2049
- attr_accessor :transfer_data
2050
- sig {
2051
- params(account_tax_ids: 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::Invoice::CreateParams::AutomaticTax), automatically_finalizes_at: T.nilable(Integer), collection_method: T.nilable(String), currency: T.nilable(String), custom_fields: T.nilable(T.any(String, T::Array[::Stripe::Invoice::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.any(String, T::Array[::Stripe::Invoice::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::Invoice::CreateParams::FromInvoice), issuer: T.nilable(::Stripe::Invoice::CreateParams::Issuer), metadata: T.nilable(T.any(String, T::Hash[String, String])), number: T.nilable(String), on_behalf_of: T.nilable(String), payment_settings: T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings), pending_invoice_items_behavior: T.nilable(String), rendering: T.nilable(::Stripe::Invoice::CreateParams::Rendering), shipping_cost: T.nilable(::Stripe::Invoice::CreateParams::ShippingCost), shipping_details: T.nilable(::Stripe::Invoice::CreateParams::ShippingDetails), statement_descriptor: T.nilable(String), subscription: T.nilable(String), transfer_data: T.nilable(::Stripe::Invoice::CreateParams::TransferData)).void
2052
- }
2053
- def initialize(
2054
- account_tax_ids: nil,
2055
- application_fee_amount: nil,
2056
- auto_advance: nil,
2057
- automatic_tax: nil,
2058
- automatically_finalizes_at: nil,
2059
- collection_method: nil,
2060
- currency: nil,
2061
- custom_fields: nil,
2062
- customer: nil,
2063
- days_until_due: nil,
2064
- default_payment_method: nil,
2065
- default_source: nil,
2066
- default_tax_rates: nil,
2067
- description: nil,
2068
- discounts: nil,
2069
- due_date: nil,
2070
- effective_at: nil,
2071
- expand: nil,
2072
- footer: nil,
2073
- from_invoice: nil,
2074
- issuer: nil,
2075
- metadata: nil,
2076
- number: nil,
2077
- on_behalf_of: nil,
2078
- payment_settings: nil,
2079
- pending_invoice_items_behavior: nil,
2080
- rendering: nil,
2081
- shipping_cost: nil,
2082
- shipping_details: nil,
2083
- statement_descriptor: nil,
2084
- subscription: nil,
2085
- transfer_data: nil
2086
- ); end
2087
- end
2088
- class SearchParams < Stripe::RequestParams
2089
- # Specifies which fields in the response should be expanded.
2090
- sig { returns(T.nilable(T::Array[String])) }
2091
- attr_accessor :expand
2092
- # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
2093
- sig { returns(T.nilable(Integer)) }
2094
- attr_accessor :limit
2095
- # 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.
2096
- sig { returns(T.nilable(String)) }
2097
- attr_accessor :page
2098
- # 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).
2099
- sig { returns(String) }
2100
- attr_accessor :query
2101
- sig {
2102
- params(expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), page: T.nilable(String), query: String).void
2103
- }
2104
- def initialize(expand: nil, limit: nil, page: nil, query: nil); end
2105
- end
2106
- class AddLinesParams < Stripe::RequestParams
2107
- class Line < Stripe::RequestParams
2108
- class Discount < Stripe::RequestParams
2109
- # ID of the coupon to create a new discount for.
2110
- sig { returns(T.nilable(String)) }
2111
- attr_accessor :coupon
2112
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
2113
- sig { returns(T.nilable(String)) }
2114
- attr_accessor :discount
2115
- # ID of the promotion code to create a new discount for.
2116
- sig { returns(T.nilable(String)) }
2117
- attr_accessor :promotion_code
2118
- sig {
2119
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
2120
- }
2121
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
2122
- end
2123
- class Period < Stripe::RequestParams
2124
- # The end of the period, which must be greater than or equal to the start. This value is inclusive.
2125
- sig { returns(Integer) }
2126
- attr_accessor :end
2127
- # The start of the period. This value is inclusive.
2128
- sig { returns(Integer) }
2129
- attr_accessor :start
2130
- sig { params(end_: Integer, start: Integer).void }
2131
- def initialize(end_: nil, start: nil); end
2132
- end
2133
- class PriceData < Stripe::RequestParams
2134
- class ProductData < Stripe::RequestParams
2135
- # 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.
2136
- sig { returns(T.nilable(String)) }
2137
- attr_accessor :description
2138
- # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
2139
- sig { returns(T.nilable(T::Array[String])) }
2140
- attr_accessor :images
2141
- # 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`.
2142
- sig { returns(T.nilable(T::Hash[String, String])) }
2143
- attr_accessor :metadata
2144
- # The product's name, meant to be displayable to the customer.
2145
- sig { returns(String) }
2146
- attr_accessor :name
2147
- # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
2148
- sig { returns(T.nilable(String)) }
2149
- attr_accessor :tax_code
2150
- sig {
2151
- 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
2152
- }
2153
- def initialize(
2154
- description: nil,
2155
- images: nil,
2156
- metadata: nil,
2157
- name: nil,
2158
- tax_code: nil
2159
- ); end
2160
- end
2161
- # 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).
2162
- sig { returns(String) }
2163
- attr_accessor :currency
2164
- # 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.
2165
- sig { returns(T.nilable(String)) }
2166
- attr_accessor :product
2167
- # Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
2168
- sig {
2169
- returns(T.nilable(::Stripe::Invoice::AddLinesParams::Line::PriceData::ProductData))
2170
- }
2171
- attr_accessor :product_data
2172
- # 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.
2173
- sig { returns(T.nilable(String)) }
2174
- attr_accessor :tax_behavior
2175
- # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
2176
- sig { returns(T.nilable(Integer)) }
2177
- attr_accessor :unit_amount
2178
- # 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.
2179
- sig { returns(T.nilable(String)) }
2180
- attr_accessor :unit_amount_decimal
2181
- sig {
2182
- params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::Invoice::AddLinesParams::Line::PriceData::ProductData), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
2183
- }
2184
- def initialize(
2185
- currency: nil,
2186
- product: nil,
2187
- product_data: nil,
2188
- tax_behavior: nil,
2189
- unit_amount: nil,
2190
- unit_amount_decimal: nil
2191
- ); end
2192
- end
2193
- class Pricing < Stripe::RequestParams
2194
- # The ID of the price object.
2195
- sig { returns(T.nilable(String)) }
2196
- attr_accessor :price
2197
- sig { params(price: T.nilable(String)).void }
2198
- def initialize(price: nil); end
2199
- end
2200
- class TaxAmount < Stripe::RequestParams
2201
- class TaxRateData < Stripe::RequestParams
2202
- # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
2203
- sig { returns(T.nilable(String)) }
2204
- attr_accessor :country
2205
- # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
2206
- sig { returns(T.nilable(String)) }
2207
- attr_accessor :description
2208
- # The display name of the tax rate, which will be shown to users.
2209
- sig { returns(String) }
2210
- attr_accessor :display_name
2211
- # This specifies if the tax rate is inclusive or exclusive.
2212
- sig { returns(T::Boolean) }
2213
- attr_accessor :inclusive
2214
- # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
2215
- sig { returns(T.nilable(String)) }
2216
- attr_accessor :jurisdiction
2217
- # The level of the jurisdiction that imposes this tax rate.
2218
- sig { returns(T.nilable(String)) }
2219
- attr_accessor :jurisdiction_level
2220
- # 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.
2221
- sig { returns(Float) }
2222
- attr_accessor :percentage
2223
- # [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.
2224
- sig { returns(T.nilable(String)) }
2225
- attr_accessor :state
2226
- # The high-level tax type, such as `vat` or `sales_tax`.
2227
- sig { returns(T.nilable(String)) }
2228
- attr_accessor :tax_type
2229
- sig {
2230
- 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
2231
- }
2232
- def initialize(
2233
- country: nil,
2234
- description: nil,
2235
- display_name: nil,
2236
- inclusive: nil,
2237
- jurisdiction: nil,
2238
- jurisdiction_level: nil,
2239
- percentage: nil,
2240
- state: nil,
2241
- tax_type: nil
2242
- ); end
2243
- end
2244
- # The amount, in cents (or local equivalent), of the tax.
2245
- sig { returns(Integer) }
2246
- attr_accessor :amount
2247
- # Data to find or create a TaxRate object.
2248
- #
2249
- # 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.
2250
- sig { returns(::Stripe::Invoice::AddLinesParams::Line::TaxAmount::TaxRateData) }
2251
- attr_accessor :tax_rate_data
2252
- # The reasoning behind this tax, for example, if the product is tax exempt.
2253
- sig { returns(T.nilable(String)) }
2254
- attr_accessor :taxability_reason
2255
- # The amount on which tax is calculated, in cents (or local equivalent).
2256
- sig { returns(Integer) }
2257
- attr_accessor :taxable_amount
2258
- sig {
2259
- params(amount: Integer, tax_rate_data: ::Stripe::Invoice::AddLinesParams::Line::TaxAmount::TaxRateData, taxability_reason: T.nilable(String), taxable_amount: Integer).void
2260
- }
2261
- def initialize(
2262
- amount: nil,
2263
- tax_rate_data: nil,
2264
- taxability_reason: nil,
2265
- taxable_amount: nil
2266
- ); end
2267
- end
2268
- # 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.
2269
- sig { returns(T.nilable(Integer)) }
2270
- attr_accessor :amount
2271
- # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
2272
- sig { returns(T.nilable(String)) }
2273
- attr_accessor :description
2274
- # 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.
2275
- sig { returns(T.nilable(T::Boolean)) }
2276
- attr_accessor :discountable
2277
- # 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.
2278
- sig {
2279
- returns(T.nilable(T.any(String, T::Array[::Stripe::Invoice::AddLinesParams::Line::Discount])))
2280
- }
2281
- attr_accessor :discounts
2282
- # ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created.
2283
- sig { returns(T.nilable(String)) }
2284
- attr_accessor :invoice_item
2285
- # 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`.
2286
- sig { returns(T.nilable(T.any(String, T::Hash[String, String]))) }
2287
- attr_accessor :metadata
2288
- # 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.
2289
- sig { returns(T.nilable(::Stripe::Invoice::AddLinesParams::Line::Period)) }
2290
- attr_accessor :period
2291
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
2292
- sig { returns(T.nilable(::Stripe::Invoice::AddLinesParams::Line::PriceData)) }
2293
- attr_accessor :price_data
2294
- # The pricing information for the invoice item.
2295
- sig { returns(T.nilable(::Stripe::Invoice::AddLinesParams::Line::Pricing)) }
2296
- attr_accessor :pricing
2297
- # Non-negative integer. The quantity of units for the line item.
2298
- sig { returns(T.nilable(Integer)) }
2299
- attr_accessor :quantity
2300
- # 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.
2301
- sig {
2302
- returns(T.nilable(T.any(String, T::Array[::Stripe::Invoice::AddLinesParams::Line::TaxAmount])))
2303
- }
2304
- attr_accessor :tax_amounts
2305
- # 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.
2306
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
2307
- attr_accessor :tax_rates
2308
- sig {
2309
- params(amount: T.nilable(Integer), description: T.nilable(String), discountable: T.nilable(T::Boolean), discounts: T.nilable(T.any(String, T::Array[::Stripe::Invoice::AddLinesParams::Line::Discount])), invoice_item: T.nilable(String), metadata: T.nilable(T.any(String, T::Hash[String, String])), period: T.nilable(::Stripe::Invoice::AddLinesParams::Line::Period), price_data: T.nilable(::Stripe::Invoice::AddLinesParams::Line::PriceData), pricing: T.nilable(::Stripe::Invoice::AddLinesParams::Line::Pricing), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.any(String, T::Array[::Stripe::Invoice::AddLinesParams::Line::TaxAmount])), tax_rates: T.nilable(T.any(String, T::Array[String]))).void
2310
- }
2311
- def initialize(
2312
- amount: nil,
2313
- description: nil,
2314
- discountable: nil,
2315
- discounts: nil,
2316
- invoice_item: nil,
2317
- metadata: nil,
2318
- period: nil,
2319
- price_data: nil,
2320
- pricing: nil,
2321
- quantity: nil,
2322
- tax_amounts: nil,
2323
- tax_rates: nil
2324
- ); end
2325
- end
2326
- # Specifies which fields in the response should be expanded.
2327
- sig { returns(T.nilable(T::Array[String])) }
2328
- attr_accessor :expand
2329
- # 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`.
2330
- sig { returns(T.nilable(T.any(String, T::Hash[String, String]))) }
2331
- attr_accessor :invoice_metadata
2332
- # The line items to add.
2333
- sig { returns(T::Array[::Stripe::Invoice::AddLinesParams::Line]) }
2334
- attr_accessor :lines
2335
- sig {
2336
- params(expand: T.nilable(T::Array[String]), invoice_metadata: T.nilable(T.any(String, T::Hash[String, String])), lines: T::Array[::Stripe::Invoice::AddLinesParams::Line]).void
2337
- }
2338
- def initialize(expand: nil, invoice_metadata: nil, lines: nil); end
2339
- end
2340
- class AttachPaymentParams < Stripe::RequestParams
2341
- # Specifies which fields in the response should be expanded.
2342
- sig { returns(T.nilable(T::Array[String])) }
2343
- attr_accessor :expand
2344
- # The ID of the PaymentIntent to attach to the invoice.
2345
- sig { returns(T.nilable(String)) }
2346
- attr_accessor :payment_intent
2347
- sig { params(expand: T.nilable(T::Array[String]), payment_intent: T.nilable(String)).void }
2348
- def initialize(expand: nil, payment_intent: nil); end
2349
- end
2350
- class FinalizeInvoiceParams < Stripe::RequestParams
2351
- # 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.
2352
- sig { returns(T.nilable(T::Boolean)) }
2353
- attr_accessor :auto_advance
2354
- # Specifies which fields in the response should be expanded.
2355
- sig { returns(T.nilable(T::Array[String])) }
2356
- attr_accessor :expand
2357
- sig { params(auto_advance: T.nilable(T::Boolean), expand: T.nilable(T::Array[String])).void }
2358
- def initialize(auto_advance: nil, expand: nil); end
2359
- end
2360
- class MarkUncollectibleParams < Stripe::RequestParams
2361
- # Specifies which fields in the response should be expanded.
2362
- sig { returns(T.nilable(T::Array[String])) }
2363
- attr_accessor :expand
2364
- sig { params(expand: T.nilable(T::Array[String])).void }
2365
- def initialize(expand: nil); end
2366
- end
2367
- class PayParams < Stripe::RequestParams
2368
- # Specifies which fields in the response should be expanded.
2369
- sig { returns(T.nilable(T::Array[String])) }
2370
- attr_accessor :expand
2371
- # 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.
2372
- #
2373
- # 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`.
2374
- sig { returns(T.nilable(T::Boolean)) }
2375
- attr_accessor :forgive
2376
- # 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.
2377
- sig { returns(T.nilable(String)) }
2378
- attr_accessor :mandate
2379
- # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session).
2380
- sig { returns(T.nilable(T::Boolean)) }
2381
- attr_accessor :off_session
2382
- # Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`.
2383
- sig { returns(T.nilable(T::Boolean)) }
2384
- attr_accessor :paid_out_of_band
2385
- # A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid.
2386
- sig { returns(T.nilable(String)) }
2387
- attr_accessor :payment_method
2388
- # 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.
2389
- sig { returns(T.nilable(String)) }
2390
- attr_accessor :source
2391
- sig {
2392
- params(expand: T.nilable(T::Array[String]), forgive: T.nilable(T::Boolean), mandate: 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
2393
- }
2394
- def initialize(
2395
- expand: nil,
2396
- forgive: nil,
2397
- mandate: nil,
2398
- off_session: nil,
2399
- paid_out_of_band: nil,
2400
- payment_method: nil,
2401
- source: nil
2402
- ); end
2403
- end
2404
- class RemoveLinesParams < Stripe::RequestParams
2405
- class Line < Stripe::RequestParams
2406
- # Either `delete` or `unassign`. Deleted line items are permanently deleted. Unassigned line items can be reassigned to an invoice.
2407
- sig { returns(String) }
2408
- attr_accessor :behavior
2409
- # ID of an existing line item to remove from this invoice.
2410
- sig { returns(String) }
2411
- attr_accessor :id
2412
- sig { params(behavior: String, id: String).void }
2413
- def initialize(behavior: nil, id: nil); end
2414
- end
2415
- # Specifies which fields in the response should be expanded.
2416
- sig { returns(T.nilable(T::Array[String])) }
2417
- attr_accessor :expand
2418
- # 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`.
2419
- sig { returns(T.nilable(T.any(String, T::Hash[String, String]))) }
2420
- attr_accessor :invoice_metadata
2421
- # The line items to remove.
2422
- sig { returns(T::Array[::Stripe::Invoice::RemoveLinesParams::Line]) }
2423
- attr_accessor :lines
2424
- sig {
2425
- params(expand: T.nilable(T::Array[String]), invoice_metadata: T.nilable(T.any(String, T::Hash[String, String])), lines: T::Array[::Stripe::Invoice::RemoveLinesParams::Line]).void
2426
- }
2427
- def initialize(expand: nil, invoice_metadata: nil, lines: nil); end
2428
- end
2429
- class SendInvoiceParams < Stripe::RequestParams
2430
- # Specifies which fields in the response should be expanded.
2431
- sig { returns(T.nilable(T::Array[String])) }
2432
- attr_accessor :expand
2433
- sig { params(expand: T.nilable(T::Array[String])).void }
2434
- def initialize(expand: nil); end
2435
- end
2436
- class UpdateLinesParams < Stripe::RequestParams
2437
- class Line < Stripe::RequestParams
2438
- class Discount < Stripe::RequestParams
2439
- # ID of the coupon to create a new discount for.
2440
- sig { returns(T.nilable(String)) }
2441
- attr_accessor :coupon
2442
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
2443
- sig { returns(T.nilable(String)) }
2444
- attr_accessor :discount
2445
- # ID of the promotion code to create a new discount for.
2446
- sig { returns(T.nilable(String)) }
2447
- attr_accessor :promotion_code
2448
- sig {
2449
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
2450
- }
2451
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
2452
- end
2453
- class Period < Stripe::RequestParams
2454
- # The end of the period, which must be greater than or equal to the start. This value is inclusive.
2455
- sig { returns(Integer) }
2456
- attr_accessor :end
2457
- # The start of the period. This value is inclusive.
2458
- sig { returns(Integer) }
2459
- attr_accessor :start
2460
- sig { params(end_: Integer, start: Integer).void }
2461
- def initialize(end_: nil, start: nil); end
2462
- end
2463
- class PriceData < Stripe::RequestParams
2464
- class ProductData < Stripe::RequestParams
2465
- # 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.
2466
- sig { returns(T.nilable(String)) }
2467
- attr_accessor :description
2468
- # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
2469
- sig { returns(T.nilable(T::Array[String])) }
2470
- attr_accessor :images
2471
- # 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`.
2472
- sig { returns(T.nilable(T::Hash[String, String])) }
2473
- attr_accessor :metadata
2474
- # The product's name, meant to be displayable to the customer.
2475
- sig { returns(String) }
2476
- attr_accessor :name
2477
- # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
2478
- sig { returns(T.nilable(String)) }
2479
- attr_accessor :tax_code
2480
- sig {
2481
- 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
2482
- }
2483
- def initialize(
2484
- description: nil,
2485
- images: nil,
2486
- metadata: nil,
2487
- name: nil,
2488
- tax_code: nil
2489
- ); end
2490
- end
2491
- # 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).
2492
- sig { returns(String) }
2493
- attr_accessor :currency
2494
- # 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.
2495
- sig { returns(T.nilable(String)) }
2496
- attr_accessor :product
2497
- # Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
2498
- sig {
2499
- returns(T.nilable(::Stripe::Invoice::UpdateLinesParams::Line::PriceData::ProductData))
2500
- }
2501
- attr_accessor :product_data
2502
- # 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.
2503
- sig { returns(T.nilable(String)) }
2504
- attr_accessor :tax_behavior
2505
- # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
2506
- sig { returns(T.nilable(Integer)) }
2507
- attr_accessor :unit_amount
2508
- # 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.
2509
- sig { returns(T.nilable(String)) }
2510
- attr_accessor :unit_amount_decimal
2511
- sig {
2512
- params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::Invoice::UpdateLinesParams::Line::PriceData::ProductData), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
2513
- }
2514
- def initialize(
2515
- currency: nil,
2516
- product: nil,
2517
- product_data: nil,
2518
- tax_behavior: nil,
2519
- unit_amount: nil,
2520
- unit_amount_decimal: nil
2521
- ); end
2522
- end
2523
- class Pricing < Stripe::RequestParams
2524
- # The ID of the price object.
2525
- sig { returns(T.nilable(String)) }
2526
- attr_accessor :price
2527
- sig { params(price: T.nilable(String)).void }
2528
- def initialize(price: nil); end
2529
- end
2530
- class TaxAmount < Stripe::RequestParams
2531
- class TaxRateData < Stripe::RequestParams
2532
- # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
2533
- sig { returns(T.nilable(String)) }
2534
- attr_accessor :country
2535
- # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
2536
- sig { returns(T.nilable(String)) }
2537
- attr_accessor :description
2538
- # The display name of the tax rate, which will be shown to users.
2539
- sig { returns(String) }
2540
- attr_accessor :display_name
2541
- # This specifies if the tax rate is inclusive or exclusive.
2542
- sig { returns(T::Boolean) }
2543
- attr_accessor :inclusive
2544
- # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
2545
- sig { returns(T.nilable(String)) }
2546
- attr_accessor :jurisdiction
2547
- # The level of the jurisdiction that imposes this tax rate.
2548
- sig { returns(T.nilable(String)) }
2549
- attr_accessor :jurisdiction_level
2550
- # 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.
2551
- sig { returns(Float) }
2552
- attr_accessor :percentage
2553
- # [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.
2554
- sig { returns(T.nilable(String)) }
2555
- attr_accessor :state
2556
- # The high-level tax type, such as `vat` or `sales_tax`.
2557
- sig { returns(T.nilable(String)) }
2558
- attr_accessor :tax_type
2559
- sig {
2560
- 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
2561
- }
2562
- def initialize(
2563
- country: nil,
2564
- description: nil,
2565
- display_name: nil,
2566
- inclusive: nil,
2567
- jurisdiction: nil,
2568
- jurisdiction_level: nil,
2569
- percentage: nil,
2570
- state: nil,
2571
- tax_type: nil
2572
- ); end
2573
- end
2574
- # The amount, in cents (or local equivalent), of the tax.
2575
- sig { returns(Integer) }
2576
- attr_accessor :amount
2577
- # Data to find or create a TaxRate object.
2578
- #
2579
- # 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.
2580
- sig { returns(::Stripe::Invoice::UpdateLinesParams::Line::TaxAmount::TaxRateData) }
2581
- attr_accessor :tax_rate_data
2582
- # The reasoning behind this tax, for example, if the product is tax exempt.
2583
- sig { returns(T.nilable(String)) }
2584
- attr_accessor :taxability_reason
2585
- # The amount on which tax is calculated, in cents (or local equivalent).
2586
- sig { returns(Integer) }
2587
- attr_accessor :taxable_amount
2588
- sig {
2589
- params(amount: Integer, tax_rate_data: ::Stripe::Invoice::UpdateLinesParams::Line::TaxAmount::TaxRateData, taxability_reason: T.nilable(String), taxable_amount: Integer).void
2590
- }
2591
- def initialize(
2592
- amount: nil,
2593
- tax_rate_data: nil,
2594
- taxability_reason: nil,
2595
- taxable_amount: nil
2596
- ); end
2597
- end
2598
- # 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.
2599
- sig { returns(T.nilable(Integer)) }
2600
- attr_accessor :amount
2601
- # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
2602
- sig { returns(T.nilable(String)) }
2603
- attr_accessor :description
2604
- # 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.
2605
- sig { returns(T.nilable(T::Boolean)) }
2606
- attr_accessor :discountable
2607
- # 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.
2608
- sig {
2609
- returns(T.nilable(T.any(String, T::Array[::Stripe::Invoice::UpdateLinesParams::Line::Discount])))
2610
- }
2611
- attr_accessor :discounts
2612
- # ID of an existing line item on the invoice.
2613
- sig { returns(String) }
2614
- attr_accessor :id
2615
- # 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.
2616
- sig { returns(T.nilable(T.any(String, T::Hash[String, String]))) }
2617
- attr_accessor :metadata
2618
- # 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.
2619
- sig { returns(T.nilable(::Stripe::Invoice::UpdateLinesParams::Line::Period)) }
2620
- attr_accessor :period
2621
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
2622
- sig { returns(T.nilable(::Stripe::Invoice::UpdateLinesParams::Line::PriceData)) }
2623
- attr_accessor :price_data
2624
- # The pricing information for the invoice item.
2625
- sig { returns(T.nilable(::Stripe::Invoice::UpdateLinesParams::Line::Pricing)) }
2626
- attr_accessor :pricing
2627
- # Non-negative integer. The quantity of units for the line item.
2628
- sig { returns(T.nilable(Integer)) }
2629
- attr_accessor :quantity
2630
- # 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.
2631
- sig {
2632
- returns(T.nilable(T.any(String, T::Array[::Stripe::Invoice::UpdateLinesParams::Line::TaxAmount])))
2633
- }
2634
- attr_accessor :tax_amounts
2635
- # 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.
2636
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
2637
- attr_accessor :tax_rates
2638
- sig {
2639
- params(amount: T.nilable(Integer), description: T.nilable(String), discountable: T.nilable(T::Boolean), discounts: T.nilable(T.any(String, T::Array[::Stripe::Invoice::UpdateLinesParams::Line::Discount])), id: String, metadata: T.nilable(T.any(String, T::Hash[String, String])), period: T.nilable(::Stripe::Invoice::UpdateLinesParams::Line::Period), price_data: T.nilable(::Stripe::Invoice::UpdateLinesParams::Line::PriceData), pricing: T.nilable(::Stripe::Invoice::UpdateLinesParams::Line::Pricing), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.any(String, T::Array[::Stripe::Invoice::UpdateLinesParams::Line::TaxAmount])), tax_rates: T.nilable(T.any(String, T::Array[String]))).void
2640
- }
2641
- def initialize(
2642
- amount: nil,
2643
- description: nil,
2644
- discountable: nil,
2645
- discounts: nil,
2646
- id: nil,
2647
- metadata: nil,
2648
- period: nil,
2649
- price_data: nil,
2650
- pricing: nil,
2651
- quantity: nil,
2652
- tax_amounts: nil,
2653
- tax_rates: nil
2654
- ); end
2655
- end
2656
- # Specifies which fields in the response should be expanded.
2657
- sig { returns(T.nilable(T::Array[String])) }
2658
- attr_accessor :expand
2659
- # 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.
2660
- sig { returns(T.nilable(T.any(String, T::Hash[String, String]))) }
2661
- attr_accessor :invoice_metadata
2662
- # The line items to update.
2663
- sig { returns(T::Array[::Stripe::Invoice::UpdateLinesParams::Line]) }
2664
- attr_accessor :lines
2665
- sig {
2666
- params(expand: T.nilable(T::Array[String]), invoice_metadata: T.nilable(T.any(String, T::Hash[String, String])), lines: T::Array[::Stripe::Invoice::UpdateLinesParams::Line]).void
2667
- }
2668
- def initialize(expand: nil, invoice_metadata: nil, lines: nil); end
2669
- end
2670
- class VoidInvoiceParams < Stripe::RequestParams
2671
- # Specifies which fields in the response should be expanded.
2672
- sig { returns(T.nilable(T::Array[String])) }
2673
- attr_accessor :expand
2674
- sig { params(expand: T.nilable(T::Array[String])).void }
2675
- def initialize(expand: nil); end
2676
- end
2677
- class CreatePreviewParams < Stripe::RequestParams
2678
- class AutomaticTax < Stripe::RequestParams
2679
- class Liability < Stripe::RequestParams
2680
- # The connected account being referenced when `type` is `account`.
2681
- sig { returns(T.nilable(String)) }
2682
- attr_accessor :account
2683
- # Type of the account referenced in the request.
2684
- sig { returns(String) }
2685
- attr_accessor :type
2686
- sig { params(account: T.nilable(String), type: String).void }
2687
- def initialize(account: nil, type: nil); end
2688
- end
2689
- # 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.
2690
- sig { returns(T::Boolean) }
2691
- attr_accessor :enabled
2692
- # 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.
2693
- sig { returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::AutomaticTax::Liability)) }
2694
- attr_accessor :liability
2695
- sig {
2696
- params(enabled: T::Boolean, liability: T.nilable(::Stripe::Invoice::CreatePreviewParams::AutomaticTax::Liability)).void
2697
- }
2698
- def initialize(enabled: nil, liability: nil); end
2699
- end
2700
- class CustomerDetails < Stripe::RequestParams
2701
- class Address < Stripe::RequestParams
2702
- # City, district, suburb, town, or village.
2703
- sig { returns(T.nilable(String)) }
2704
- attr_accessor :city
2705
- # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
2706
- sig { returns(T.nilable(String)) }
2707
- attr_accessor :country
2708
- # Address line 1 (e.g., street, PO Box, or company name).
2709
- sig { returns(T.nilable(String)) }
2710
- attr_accessor :line1
2711
- # Address line 2 (e.g., apartment, suite, unit, or building).
2712
- sig { returns(T.nilable(String)) }
2713
- attr_accessor :line2
2714
- # ZIP or postal code.
2715
- sig { returns(T.nilable(String)) }
2716
- attr_accessor :postal_code
2717
- # State, county, province, or region.
2718
- sig { returns(T.nilable(String)) }
2719
- attr_accessor :state
2720
- sig {
2721
- 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
2722
- }
2723
- def initialize(
2724
- city: nil,
2725
- country: nil,
2726
- line1: nil,
2727
- line2: nil,
2728
- postal_code: nil,
2729
- state: nil
2730
- ); end
2731
- end
2732
- class Shipping < Stripe::RequestParams
2733
- class Address < Stripe::RequestParams
2734
- # City, district, suburb, town, or village.
2735
- sig { returns(T.nilable(String)) }
2736
- attr_accessor :city
2737
- # 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)).
2738
- sig { returns(T.nilable(String)) }
2739
- attr_accessor :country
2740
- # Address line 1 (e.g., street, PO Box, or company name).
2741
- sig { returns(T.nilable(String)) }
2742
- attr_accessor :line1
2743
- # Address line 2 (e.g., apartment, suite, unit, or building).
2744
- sig { returns(T.nilable(String)) }
2745
- attr_accessor :line2
2746
- # ZIP or postal code.
2747
- sig { returns(T.nilable(String)) }
2748
- attr_accessor :postal_code
2749
- # State, county, province, or region.
2750
- sig { returns(T.nilable(String)) }
2751
- attr_accessor :state
2752
- sig {
2753
- 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
2754
- }
2755
- def initialize(
2756
- city: nil,
2757
- country: nil,
2758
- line1: nil,
2759
- line2: nil,
2760
- postal_code: nil,
2761
- state: nil
2762
- ); end
2763
- end
2764
- # Customer shipping address.
2765
- sig {
2766
- returns(::Stripe::Invoice::CreatePreviewParams::CustomerDetails::Shipping::Address)
2767
- }
2768
- attr_accessor :address
2769
- # Customer name.
2770
- sig { returns(String) }
2771
- attr_accessor :name
2772
- # Customer phone (including extension).
2773
- sig { returns(T.nilable(String)) }
2774
- attr_accessor :phone
2775
- sig {
2776
- params(address: ::Stripe::Invoice::CreatePreviewParams::CustomerDetails::Shipping::Address, name: String, phone: T.nilable(String)).void
2777
- }
2778
- def initialize(address: nil, name: nil, phone: nil); end
2779
- end
2780
- class Tax < Stripe::RequestParams
2781
- # 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.
2782
- sig { returns(T.nilable(String)) }
2783
- attr_accessor :ip_address
2784
- sig { params(ip_address: T.nilable(String)).void }
2785
- def initialize(ip_address: nil); end
2786
- end
2787
- class TaxId < Stripe::RequestParams
2788
- # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`
2789
- sig { returns(String) }
2790
- attr_accessor :type
2791
- # Value of the tax ID.
2792
- sig { returns(String) }
2793
- attr_accessor :value
2794
- sig { params(type: String, value: String).void }
2795
- def initialize(type: nil, value: nil); end
2796
- end
2797
- # The customer's address.
2798
- sig {
2799
- returns(T.nilable(T.any(String, ::Stripe::Invoice::CreatePreviewParams::CustomerDetails::Address)))
2800
- }
2801
- attr_accessor :address
2802
- # The customer's shipping information. Appears on invoices emailed to this customer.
2803
- sig {
2804
- returns(T.nilable(T.any(String, ::Stripe::Invoice::CreatePreviewParams::CustomerDetails::Shipping)))
2805
- }
2806
- attr_accessor :shipping
2807
- # Tax details about the customer.
2808
- sig { returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::CustomerDetails::Tax)) }
2809
- attr_accessor :tax
2810
- # The customer's tax exemption. One of `none`, `exempt`, or `reverse`.
2811
- sig { returns(T.nilable(T.any(String, String))) }
2812
- attr_accessor :tax_exempt
2813
- # The customer's tax IDs.
2814
- sig {
2815
- returns(T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::CustomerDetails::TaxId]))
2816
- }
2817
- attr_accessor :tax_ids
2818
- sig {
2819
- params(address: T.nilable(T.any(String, ::Stripe::Invoice::CreatePreviewParams::CustomerDetails::Address)), shipping: T.nilable(T.any(String, ::Stripe::Invoice::CreatePreviewParams::CustomerDetails::Shipping)), tax: T.nilable(::Stripe::Invoice::CreatePreviewParams::CustomerDetails::Tax), tax_exempt: T.nilable(T.any(String, String)), tax_ids: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::CustomerDetails::TaxId])).void
2820
- }
2821
- def initialize(address: nil, shipping: nil, tax: nil, tax_exempt: nil, tax_ids: nil); end
2822
- end
2823
- class Discount < Stripe::RequestParams
2824
- # ID of the coupon to create a new discount for.
2825
- sig { returns(T.nilable(String)) }
2826
- attr_accessor :coupon
2827
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
2828
- sig { returns(T.nilable(String)) }
2829
- attr_accessor :discount
2830
- # ID of the promotion code to create a new discount for.
2831
- sig { returns(T.nilable(String)) }
2832
- attr_accessor :promotion_code
2833
- sig {
2834
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
2835
- }
2836
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
2837
- end
2838
- class InvoiceItem < Stripe::RequestParams
2839
- class Discount < Stripe::RequestParams
2840
- # ID of the coupon to create a new discount for.
2841
- sig { returns(T.nilable(String)) }
2842
- attr_accessor :coupon
2843
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
2844
- sig { returns(T.nilable(String)) }
2845
- attr_accessor :discount
2846
- # ID of the promotion code to create a new discount for.
2847
- sig { returns(T.nilable(String)) }
2848
- attr_accessor :promotion_code
2849
- sig {
2850
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
2851
- }
2852
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
2853
- end
2854
- class Period < Stripe::RequestParams
2855
- # The end of the period, which must be greater than or equal to the start. This value is inclusive.
2856
- sig { returns(Integer) }
2857
- attr_accessor :end
2858
- # The start of the period. This value is inclusive.
2859
- sig { returns(Integer) }
2860
- attr_accessor :start
2861
- sig { params(end_: Integer, start: Integer).void }
2862
- def initialize(end_: nil, start: nil); end
2863
- end
2864
- class PriceData < Stripe::RequestParams
2865
- # 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).
2866
- sig { returns(String) }
2867
- attr_accessor :currency
2868
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
2869
- sig { returns(String) }
2870
- attr_accessor :product
2871
- # 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.
2872
- sig { returns(T.nilable(String)) }
2873
- attr_accessor :tax_behavior
2874
- # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
2875
- sig { returns(T.nilable(Integer)) }
2876
- attr_accessor :unit_amount
2877
- # 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.
2878
- sig { returns(T.nilable(String)) }
2879
- attr_accessor :unit_amount_decimal
2880
- sig {
2881
- params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
2882
- }
2883
- def initialize(
2884
- currency: nil,
2885
- product: nil,
2886
- tax_behavior: nil,
2887
- unit_amount: nil,
2888
- unit_amount_decimal: nil
2889
- ); end
2890
- end
2891
- # The integer amount in cents (or local equivalent) of previewed invoice item.
2892
- sig { returns(T.nilable(Integer)) }
2893
- attr_accessor :amount
2894
- # 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.
2895
- sig { returns(T.nilable(String)) }
2896
- attr_accessor :currency
2897
- # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
2898
- sig { returns(T.nilable(String)) }
2899
- attr_accessor :description
2900
- # Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items.
2901
- sig { returns(T.nilable(T::Boolean)) }
2902
- attr_accessor :discountable
2903
- # The coupons to redeem into discounts for the invoice item in the preview.
2904
- sig {
2905
- returns(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::InvoiceItem::Discount])))
2906
- }
2907
- attr_accessor :discounts
2908
- # 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.
2909
- sig { returns(T.nilable(String)) }
2910
- attr_accessor :invoiceitem
2911
- # 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`.
2912
- sig { returns(T.nilable(T.any(String, T::Hash[String, String]))) }
2913
- attr_accessor :metadata
2914
- # 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.
2915
- sig { returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::InvoiceItem::Period)) }
2916
- attr_accessor :period
2917
- # The ID of the price object. One of `price` or `price_data` is required.
2918
- sig { returns(T.nilable(String)) }
2919
- attr_accessor :price
2920
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
2921
- sig { returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::InvoiceItem::PriceData)) }
2922
- attr_accessor :price_data
2923
- # Non-negative integer. The quantity of units for the invoice item.
2924
- sig { returns(T.nilable(Integer)) }
2925
- attr_accessor :quantity
2926
- # 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.
2927
- sig { returns(T.nilable(String)) }
2928
- attr_accessor :tax_behavior
2929
- # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
2930
- sig { returns(T.nilable(String)) }
2931
- attr_accessor :tax_code
2932
- # The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item.
2933
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
2934
- attr_accessor :tax_rates
2935
- # 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.
2936
- sig { returns(T.nilable(Integer)) }
2937
- attr_accessor :unit_amount
2938
- # 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.
2939
- sig { returns(T.nilable(String)) }
2940
- attr_accessor :unit_amount_decimal
2941
- sig {
2942
- params(amount: T.nilable(Integer), currency: T.nilable(String), description: T.nilable(String), discountable: T.nilable(T::Boolean), discounts: T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::InvoiceItem::Discount])), invoiceitem: T.nilable(String), metadata: T.nilable(T.any(String, T::Hash[String, String])), period: T.nilable(::Stripe::Invoice::CreatePreviewParams::InvoiceItem::Period), price: T.nilable(String), price_data: T.nilable(::Stripe::Invoice::CreatePreviewParams::InvoiceItem::PriceData), quantity: T.nilable(Integer), tax_behavior: T.nilable(String), tax_code: T.nilable(String), tax_rates: T.nilable(T.any(String, T::Array[String])), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
2943
- }
2944
- def initialize(
2945
- amount: nil,
2946
- currency: nil,
2947
- description: nil,
2948
- discountable: nil,
2949
- discounts: nil,
2950
- invoiceitem: nil,
2951
- metadata: nil,
2952
- period: nil,
2953
- price: nil,
2954
- price_data: nil,
2955
- quantity: nil,
2956
- tax_behavior: nil,
2957
- tax_code: nil,
2958
- tax_rates: nil,
2959
- unit_amount: nil,
2960
- unit_amount_decimal: nil
2961
- ); end
2962
- end
2963
- class Issuer < Stripe::RequestParams
2964
- # The connected account being referenced when `type` is `account`.
2965
- sig { returns(T.nilable(String)) }
2966
- attr_accessor :account
2967
- # Type of the account referenced in the request.
2968
- sig { returns(String) }
2969
- attr_accessor :type
2970
- sig { params(account: T.nilable(String), type: String).void }
2971
- def initialize(account: nil, type: nil); end
2972
- end
2973
- class ScheduleDetails < Stripe::RequestParams
2974
- class BillingMode < Stripe::RequestParams
2975
- # Controls the calculation and orchestration of prorations and invoices for subscriptions.
2976
- sig { returns(String) }
2977
- attr_accessor :type
2978
- sig { params(type: String).void }
2979
- def initialize(type: nil); end
2980
- end
2981
- class Phase < Stripe::RequestParams
2982
- class AddInvoiceItem < Stripe::RequestParams
2983
- class Discount < Stripe::RequestParams
2984
- # ID of the coupon to create a new discount for.
2985
- sig { returns(T.nilable(String)) }
2986
- attr_accessor :coupon
2987
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
2988
- sig { returns(T.nilable(String)) }
2989
- attr_accessor :discount
2990
- # ID of the promotion code to create a new discount for.
2991
- sig { returns(T.nilable(String)) }
2992
- attr_accessor :promotion_code
2993
- sig {
2994
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
2995
- }
2996
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
2997
- end
2998
- class Period < Stripe::RequestParams
2999
- class End < Stripe::RequestParams
3000
- # A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
3001
- sig { returns(T.nilable(Integer)) }
3002
- attr_accessor :timestamp
3003
- # Select how to calculate the end of the invoice item period.
3004
- sig { returns(String) }
3005
- attr_accessor :type
3006
- sig { params(timestamp: T.nilable(Integer), type: String).void }
3007
- def initialize(timestamp: nil, type: nil); end
3008
- end
3009
- class Start < Stripe::RequestParams
3010
- # A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
3011
- sig { returns(T.nilable(Integer)) }
3012
- attr_accessor :timestamp
3013
- # Select how to calculate the start of the invoice item period.
3014
- sig { returns(String) }
3015
- attr_accessor :type
3016
- sig { params(timestamp: T.nilable(Integer), type: String).void }
3017
- def initialize(timestamp: nil, type: nil); end
3018
- end
3019
- # End of the invoice item period.
3020
- sig {
3021
- returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::Period::End)
3022
- }
3023
- attr_accessor :end
3024
- # Start of the invoice item period.
3025
- sig {
3026
- returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::Period::Start)
3027
- }
3028
- attr_accessor :start
3029
- sig {
3030
- params(end_: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::Period::End, start: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::Period::Start).void
3031
- }
3032
- def initialize(end_: nil, start: nil); end
3033
- end
3034
- class PriceData < Stripe::RequestParams
3035
- # 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).
3036
- sig { returns(String) }
3037
- attr_accessor :currency
3038
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
3039
- sig { returns(String) }
3040
- attr_accessor :product
3041
- # 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.
3042
- sig { returns(T.nilable(String)) }
3043
- attr_accessor :tax_behavior
3044
- # 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.
3045
- sig { returns(T.nilable(Integer)) }
3046
- attr_accessor :unit_amount
3047
- # 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.
3048
- sig { returns(T.nilable(String)) }
3049
- attr_accessor :unit_amount_decimal
3050
- sig {
3051
- params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
3052
- }
3053
- def initialize(
3054
- currency: nil,
3055
- product: nil,
3056
- tax_behavior: nil,
3057
- unit_amount: nil,
3058
- unit_amount_decimal: nil
3059
- ); end
3060
- end
3061
- # The coupons to redeem into discounts for the item.
3062
- sig {
3063
- returns(T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::Discount]))
3064
- }
3065
- attr_accessor :discounts
3066
- # 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`.
3067
- sig { returns(T.nilable(T::Hash[String, String])) }
3068
- attr_accessor :metadata
3069
- # The period associated with this invoice item. Defaults to the period of the underlying subscription that surrounds the start of the phase.
3070
- sig {
3071
- returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::Period))
3072
- }
3073
- attr_accessor :period
3074
- # The ID of the price object. One of `price` or `price_data` is required.
3075
- sig { returns(T.nilable(String)) }
3076
- attr_accessor :price
3077
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
3078
- sig {
3079
- returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::PriceData))
3080
- }
3081
- attr_accessor :price_data
3082
- # Quantity for this item. Defaults to 1.
3083
- sig { returns(T.nilable(Integer)) }
3084
- attr_accessor :quantity
3085
- # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
3086
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
3087
- attr_accessor :tax_rates
3088
- sig {
3089
- params(discounts: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::Discount]), metadata: T.nilable(T::Hash[String, String]), period: T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::Period), price: T.nilable(String), price_data: T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.any(String, T::Array[String]))).void
3090
- }
3091
- def initialize(
3092
- discounts: nil,
3093
- metadata: nil,
3094
- period: nil,
3095
- price: nil,
3096
- price_data: nil,
3097
- quantity: nil,
3098
- tax_rates: nil
3099
- ); end
3100
- end
3101
- class AutomaticTax < Stripe::RequestParams
3102
- class Liability < Stripe::RequestParams
3103
- # The connected account being referenced when `type` is `account`.
3104
- sig { returns(T.nilable(String)) }
3105
- attr_accessor :account
3106
- # Type of the account referenced in the request.
3107
- sig { returns(String) }
3108
- attr_accessor :type
3109
- sig { params(account: T.nilable(String), type: String).void }
3110
- def initialize(account: nil, type: nil); end
3111
- end
3112
- # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
3113
- sig { returns(T::Boolean) }
3114
- attr_accessor :enabled
3115
- # 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.
3116
- sig {
3117
- returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AutomaticTax::Liability))
3118
- }
3119
- attr_accessor :liability
3120
- sig {
3121
- params(enabled: T::Boolean, liability: T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AutomaticTax::Liability)).void
3122
- }
3123
- def initialize(enabled: nil, liability: nil); end
3124
- end
3125
- class BillingThresholds < Stripe::RequestParams
3126
- # Monetary threshold that triggers the subscription to advance to a new billing period
3127
- sig { returns(T.nilable(Integer)) }
3128
- attr_accessor :amount_gte
3129
- # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
3130
- sig { returns(T.nilable(T::Boolean)) }
3131
- attr_accessor :reset_billing_cycle_anchor
3132
- sig {
3133
- params(amount_gte: T.nilable(Integer), reset_billing_cycle_anchor: T.nilable(T::Boolean)).void
3134
- }
3135
- def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
3136
- end
3137
- class Discount < Stripe::RequestParams
3138
- # ID of the coupon to create a new discount for.
3139
- sig { returns(T.nilable(String)) }
3140
- attr_accessor :coupon
3141
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
3142
- sig { returns(T.nilable(String)) }
3143
- attr_accessor :discount
3144
- # ID of the promotion code to create a new discount for.
3145
- sig { returns(T.nilable(String)) }
3146
- attr_accessor :promotion_code
3147
- sig {
3148
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
3149
- }
3150
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
3151
- end
3152
- class Duration < Stripe::RequestParams
3153
- # Specifies phase duration. Either `day`, `week`, `month` or `year`.
3154
- sig { returns(String) }
3155
- attr_accessor :interval
3156
- # The multiplier applied to the interval.
3157
- sig { returns(T.nilable(Integer)) }
3158
- attr_accessor :interval_count
3159
- sig { params(interval: String, interval_count: T.nilable(Integer)).void }
3160
- def initialize(interval: nil, interval_count: nil); end
3161
- end
3162
- class InvoiceSettings < Stripe::RequestParams
3163
- class Issuer < Stripe::RequestParams
3164
- # The connected account being referenced when `type` is `account`.
3165
- sig { returns(T.nilable(String)) }
3166
- attr_accessor :account
3167
- # Type of the account referenced in the request.
3168
- sig { returns(String) }
3169
- attr_accessor :type
3170
- sig { params(account: T.nilable(String), type: String).void }
3171
- def initialize(account: nil, type: nil); end
3172
- end
3173
- # 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.
3174
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
3175
- attr_accessor :account_tax_ids
3176
- # 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`.
3177
- sig { returns(T.nilable(Integer)) }
3178
- attr_accessor :days_until_due
3179
- # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
3180
- sig {
3181
- returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::InvoiceSettings::Issuer))
3182
- }
3183
- attr_accessor :issuer
3184
- sig {
3185
- params(account_tax_ids: T.nilable(T.any(String, T::Array[String])), days_until_due: T.nilable(Integer), issuer: T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::InvoiceSettings::Issuer)).void
3186
- }
3187
- def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
3188
- end
3189
- class Item < Stripe::RequestParams
3190
- class BillingThresholds < Stripe::RequestParams
3191
- # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
3192
- sig { returns(Integer) }
3193
- attr_accessor :usage_gte
3194
- sig { params(usage_gte: Integer).void }
3195
- def initialize(usage_gte: nil); end
3196
- end
3197
- class Discount < Stripe::RequestParams
3198
- # ID of the coupon to create a new discount for.
3199
- sig { returns(T.nilable(String)) }
3200
- attr_accessor :coupon
3201
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
3202
- sig { returns(T.nilable(String)) }
3203
- attr_accessor :discount
3204
- # ID of the promotion code to create a new discount for.
3205
- sig { returns(T.nilable(String)) }
3206
- attr_accessor :promotion_code
3207
- sig {
3208
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
3209
- }
3210
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
3211
- end
3212
- class PriceData < Stripe::RequestParams
3213
- class Recurring < Stripe::RequestParams
3214
- # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
3215
- sig { returns(String) }
3216
- attr_accessor :interval
3217
- # 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).
3218
- sig { returns(T.nilable(Integer)) }
3219
- attr_accessor :interval_count
3220
- sig { params(interval: String, interval_count: T.nilable(Integer)).void }
3221
- def initialize(interval: nil, interval_count: nil); end
3222
- end
3223
- # 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).
3224
- sig { returns(String) }
3225
- attr_accessor :currency
3226
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
3227
- sig { returns(String) }
3228
- attr_accessor :product
3229
- # The recurring components of a price such as `interval` and `interval_count`.
3230
- sig {
3231
- returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::PriceData::Recurring)
3232
- }
3233
- attr_accessor :recurring
3234
- # 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.
3235
- sig { returns(T.nilable(String)) }
3236
- attr_accessor :tax_behavior
3237
- # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
3238
- sig { returns(T.nilable(Integer)) }
3239
- attr_accessor :unit_amount
3240
- # 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.
3241
- sig { returns(T.nilable(String)) }
3242
- attr_accessor :unit_amount_decimal
3243
- sig {
3244
- params(currency: String, product: String, recurring: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
3245
- }
3246
- def initialize(
3247
- currency: nil,
3248
- product: nil,
3249
- recurring: nil,
3250
- tax_behavior: nil,
3251
- unit_amount: nil,
3252
- unit_amount_decimal: nil
3253
- ); end
3254
- end
3255
- # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
3256
- sig {
3257
- returns(T.nilable(T.any(String, ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::BillingThresholds)))
3258
- }
3259
- attr_accessor :billing_thresholds
3260
- # The coupons to redeem into discounts for the subscription item.
3261
- sig {
3262
- returns(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::Discount])))
3263
- }
3264
- attr_accessor :discounts
3265
- # 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`.
3266
- sig { returns(T.nilable(T::Hash[String, String])) }
3267
- attr_accessor :metadata
3268
- # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
3269
- sig { returns(T.nilable(String)) }
3270
- attr_accessor :plan
3271
- # The ID of the price object.
3272
- sig { returns(T.nilable(String)) }
3273
- attr_accessor :price
3274
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
3275
- sig {
3276
- returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::PriceData))
3277
- }
3278
- attr_accessor :price_data
3279
- # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
3280
- sig { returns(T.nilable(Integer)) }
3281
- attr_accessor :quantity
3282
- # 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.
3283
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
3284
- attr_accessor :tax_rates
3285
- sig {
3286
- params(billing_thresholds: T.nilable(T.any(String, ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::BillingThresholds)), discounts: T.nilable(T.any(String, T::Array[::Stripe::Invoice::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::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.any(String, T::Array[String]))).void
3287
- }
3288
- def initialize(
3289
- billing_thresholds: nil,
3290
- discounts: nil,
3291
- metadata: nil,
3292
- plan: nil,
3293
- price: nil,
3294
- price_data: nil,
3295
- quantity: nil,
3296
- tax_rates: nil
3297
- ); end
3298
- end
3299
- class TransferData < Stripe::RequestParams
3300
- # 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.
3301
- sig { returns(T.nilable(Float)) }
3302
- attr_accessor :amount_percent
3303
- # ID of an existing, connected Stripe account.
3304
- sig { returns(String) }
3305
- attr_accessor :destination
3306
- sig { params(amount_percent: T.nilable(Float), destination: String).void }
3307
- def initialize(amount_percent: nil, destination: nil); end
3308
- end
3309
- # 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.
3310
- sig {
3311
- returns(T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem]))
3312
- }
3313
- attr_accessor :add_invoice_items
3314
- # 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).
3315
- sig { returns(T.nilable(Float)) }
3316
- attr_accessor :application_fee_percent
3317
- # Automatic tax settings for this phase.
3318
- sig {
3319
- returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AutomaticTax))
3320
- }
3321
- attr_accessor :automatic_tax
3322
- # 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).
3323
- sig { returns(T.nilable(String)) }
3324
- attr_accessor :billing_cycle_anchor
3325
- # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
3326
- sig {
3327
- returns(T.nilable(T.any(String, ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::BillingThresholds)))
3328
- }
3329
- attr_accessor :billing_thresholds
3330
- # 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.
3331
- sig { returns(T.nilable(String)) }
3332
- attr_accessor :collection_method
3333
- # 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).
3334
- sig { returns(T.nilable(String)) }
3335
- attr_accessor :currency
3336
- # 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.
3337
- sig { returns(T.nilable(String)) }
3338
- attr_accessor :default_payment_method
3339
- # 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.
3340
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
3341
- attr_accessor :default_tax_rates
3342
- # 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.
3343
- sig { returns(T.nilable(String)) }
3344
- attr_accessor :description
3345
- # 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.
3346
- sig {
3347
- returns(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Discount])))
3348
- }
3349
- attr_accessor :discounts
3350
- # The number of intervals the phase should last. If set, `end_date` must not be set.
3351
- sig {
3352
- returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Duration))
3353
- }
3354
- attr_accessor :duration
3355
- # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
3356
- sig { returns(T.nilable(T.any(Integer, String))) }
3357
- attr_accessor :end_date
3358
- # All invoices will be billed using the specified settings.
3359
- sig {
3360
- returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::InvoiceSettings))
3361
- }
3362
- attr_accessor :invoice_settings
3363
- # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
3364
- sig {
3365
- returns(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item])
3366
- }
3367
- attr_accessor :items
3368
- # 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. This parameter is deprecated and will be removed in a future version. Use `duration` instead.
3369
- sig { returns(T.nilable(Integer)) }
3370
- attr_accessor :iterations
3371
- # 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`.
3372
- sig { returns(T.nilable(T::Hash[String, String])) }
3373
- attr_accessor :metadata
3374
- # The account on behalf of which to charge, for each of the associated subscription's invoices.
3375
- sig { returns(T.nilable(String)) }
3376
- attr_accessor :on_behalf_of
3377
- # Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
3378
- sig { returns(T.nilable(String)) }
3379
- attr_accessor :proration_behavior
3380
- # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
3381
- sig { returns(T.nilable(T.any(Integer, String))) }
3382
- attr_accessor :start_date
3383
- # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
3384
- sig {
3385
- returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::TransferData))
3386
- }
3387
- attr_accessor :transfer_data
3388
- # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
3389
- sig { returns(T.nilable(T::Boolean)) }
3390
- attr_accessor :trial
3391
- # 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`
3392
- sig { returns(T.nilable(T.any(Integer, String))) }
3393
- attr_accessor :trial_end
3394
- sig {
3395
- params(add_invoice_items: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem]), application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AutomaticTax), billing_cycle_anchor: T.nilable(String), billing_thresholds: T.nilable(T.any(String, ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::BillingThresholds)), collection_method: T.nilable(String), currency: T.nilable(String), default_payment_method: T.nilable(String), default_tax_rates: T.nilable(T.any(String, T::Array[String])), description: T.nilable(String), discounts: T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Discount])), duration: T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Duration), end_date: T.nilable(T.any(Integer, String)), invoice_settings: T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::InvoiceSettings), items: T::Array[::Stripe::Invoice::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::Invoice::CreatePreviewParams::ScheduleDetails::Phase::TransferData), trial: T.nilable(T::Boolean), trial_end: T.nilable(T.any(Integer, String))).void
3396
- }
3397
- def initialize(
3398
- add_invoice_items: nil,
3399
- application_fee_percent: nil,
3400
- automatic_tax: nil,
3401
- billing_cycle_anchor: nil,
3402
- billing_thresholds: nil,
3403
- collection_method: nil,
3404
- currency: nil,
3405
- default_payment_method: nil,
3406
- default_tax_rates: nil,
3407
- description: nil,
3408
- discounts: nil,
3409
- duration: nil,
3410
- end_date: nil,
3411
- invoice_settings: nil,
3412
- items: nil,
3413
- iterations: nil,
3414
- metadata: nil,
3415
- on_behalf_of: nil,
3416
- proration_behavior: nil,
3417
- start_date: nil,
3418
- transfer_data: nil,
3419
- trial: nil,
3420
- trial_end: nil
3421
- ); end
3422
- end
3423
- # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
3424
- sig {
3425
- returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::BillingMode))
3426
- }
3427
- attr_accessor :billing_mode
3428
- # 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.
3429
- sig { returns(T.nilable(String)) }
3430
- attr_accessor :end_behavior
3431
- # 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.
3432
- sig {
3433
- returns(T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase]))
3434
- }
3435
- attr_accessor :phases
3436
- # In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
3437
- sig { returns(T.nilable(String)) }
3438
- attr_accessor :proration_behavior
3439
- sig {
3440
- params(billing_mode: T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::BillingMode), end_behavior: T.nilable(String), phases: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase]), proration_behavior: T.nilable(String)).void
3441
- }
3442
- def initialize(
3443
- billing_mode: nil,
3444
- end_behavior: nil,
3445
- phases: nil,
3446
- proration_behavior: nil
3447
- ); end
3448
- end
3449
- class SubscriptionDetails < Stripe::RequestParams
3450
- class BillingMode < Stripe::RequestParams
3451
- # Controls the calculation and orchestration of prorations and invoices for subscriptions.
3452
- sig { returns(String) }
3453
- attr_accessor :type
3454
- sig { params(type: String).void }
3455
- def initialize(type: nil); end
3456
- end
3457
- class Item < Stripe::RequestParams
3458
- class BillingThresholds < Stripe::RequestParams
3459
- # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
3460
- sig { returns(Integer) }
3461
- attr_accessor :usage_gte
3462
- sig { params(usage_gte: Integer).void }
3463
- def initialize(usage_gte: nil); end
3464
- end
3465
- class Discount < Stripe::RequestParams
3466
- # ID of the coupon to create a new discount for.
3467
- sig { returns(T.nilable(String)) }
3468
- attr_accessor :coupon
3469
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
3470
- sig { returns(T.nilable(String)) }
3471
- attr_accessor :discount
3472
- # ID of the promotion code to create a new discount for.
3473
- sig { returns(T.nilable(String)) }
3474
- attr_accessor :promotion_code
3475
- sig {
3476
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
3477
- }
3478
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
3479
- end
3480
- class PriceData < Stripe::RequestParams
3481
- class Recurring < Stripe::RequestParams
3482
- # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
3483
- sig { returns(String) }
3484
- attr_accessor :interval
3485
- # 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).
3486
- sig { returns(T.nilable(Integer)) }
3487
- attr_accessor :interval_count
3488
- sig { params(interval: String, interval_count: T.nilable(Integer)).void }
3489
- def initialize(interval: nil, interval_count: nil); end
3490
- end
3491
- # 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).
3492
- sig { returns(String) }
3493
- attr_accessor :currency
3494
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
3495
- sig { returns(String) }
3496
- attr_accessor :product
3497
- # The recurring components of a price such as `interval` and `interval_count`.
3498
- sig {
3499
- returns(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::PriceData::Recurring)
3500
- }
3501
- attr_accessor :recurring
3502
- # 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.
3503
- sig { returns(T.nilable(String)) }
3504
- attr_accessor :tax_behavior
3505
- # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
3506
- sig { returns(T.nilable(Integer)) }
3507
- attr_accessor :unit_amount
3508
- # 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.
3509
- sig { returns(T.nilable(String)) }
3510
- attr_accessor :unit_amount_decimal
3511
- sig {
3512
- params(currency: String, product: String, recurring: ::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
3513
- }
3514
- def initialize(
3515
- currency: nil,
3516
- product: nil,
3517
- recurring: nil,
3518
- tax_behavior: nil,
3519
- unit_amount: nil,
3520
- unit_amount_decimal: nil
3521
- ); end
3522
- end
3523
- # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
3524
- sig {
3525
- returns(T.nilable(T.any(String, ::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::BillingThresholds)))
3526
- }
3527
- attr_accessor :billing_thresholds
3528
- # 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.
3529
- sig { returns(T.nilable(T::Boolean)) }
3530
- attr_accessor :clear_usage
3531
- # A flag that, if set to `true`, will delete the specified item.
3532
- sig { returns(T.nilable(T::Boolean)) }
3533
- attr_accessor :deleted
3534
- # The coupons to redeem into discounts for the subscription item.
3535
- sig {
3536
- returns(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::Discount])))
3537
- }
3538
- attr_accessor :discounts
3539
- # Subscription item to update.
3540
- sig { returns(T.nilable(String)) }
3541
- attr_accessor :id
3542
- # 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`.
3543
- sig { returns(T.nilable(T.any(String, T::Hash[String, String]))) }
3544
- attr_accessor :metadata
3545
- # Plan ID for this item, as a string.
3546
- sig { returns(T.nilable(String)) }
3547
- attr_accessor :plan
3548
- # 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.
3549
- sig { returns(T.nilable(String)) }
3550
- attr_accessor :price
3551
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
3552
- sig {
3553
- returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::PriceData))
3554
- }
3555
- attr_accessor :price_data
3556
- # Quantity for this item.
3557
- sig { returns(T.nilable(Integer)) }
3558
- attr_accessor :quantity
3559
- # 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.
3560
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
3561
- attr_accessor :tax_rates
3562
- sig {
3563
- params(billing_thresholds: T.nilable(T.any(String, ::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::BillingThresholds)), clear_usage: T.nilable(T::Boolean), deleted: T.nilable(T::Boolean), discounts: T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::Discount])), id: T.nilable(String), metadata: T.nilable(T.any(String, T::Hash[String, String])), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.any(String, T::Array[String]))).void
3564
- }
3565
- def initialize(
3566
- billing_thresholds: nil,
3567
- clear_usage: nil,
3568
- deleted: nil,
3569
- discounts: nil,
3570
- id: nil,
3571
- metadata: nil,
3572
- plan: nil,
3573
- price: nil,
3574
- price_data: nil,
3575
- quantity: nil,
3576
- tax_rates: nil
3577
- ); end
3578
- end
3579
- # 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`.
3580
- sig { returns(T.nilable(T.any(String, Integer))) }
3581
- attr_accessor :billing_cycle_anchor
3582
- # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
3583
- sig {
3584
- returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::BillingMode))
3585
- }
3586
- attr_accessor :billing_mode
3587
- # 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.
3588
- sig { returns(T.nilable(T.any(String, T.any(Integer, String)))) }
3589
- attr_accessor :cancel_at
3590
- # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
3591
- sig { returns(T.nilable(T::Boolean)) }
3592
- attr_accessor :cancel_at_period_end
3593
- # This simulates the subscription being canceled or expired immediately.
3594
- sig { returns(T.nilable(T::Boolean)) }
3595
- attr_accessor :cancel_now
3596
- # 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.
3597
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
3598
- attr_accessor :default_tax_rates
3599
- # A list of up to 20 subscription items, each with an attached price.
3600
- sig {
3601
- returns(T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item]))
3602
- }
3603
- attr_accessor :items
3604
- # 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`.
3605
- sig { returns(T.nilable(String)) }
3606
- attr_accessor :proration_behavior
3607
- # 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'.
3608
- sig { returns(T.nilable(Integer)) }
3609
- attr_accessor :proration_date
3610
- # For paused subscriptions, setting `subscription_details.resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed.
3611
- sig { returns(T.nilable(String)) }
3612
- attr_accessor :resume_at
3613
- # Date a subscription is intended to start (can be future or past).
3614
- sig { returns(T.nilable(Integer)) }
3615
- attr_accessor :start_date
3616
- # 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.
3617
- sig { returns(T.nilable(T.any(String, Integer))) }
3618
- attr_accessor :trial_end
3619
- sig {
3620
- params(billing_cycle_anchor: T.nilable(T.any(String, Integer)), billing_mode: T.nilable(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::BillingMode), cancel_at: T.nilable(T.any(String, T.any(Integer, String))), cancel_at_period_end: T.nilable(T::Boolean), cancel_now: T.nilable(T::Boolean), default_tax_rates: T.nilable(T.any(String, T::Array[String])), items: T.nilable(T::Array[::Stripe::Invoice::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
3621
- }
3622
- def initialize(
3623
- billing_cycle_anchor: nil,
3624
- billing_mode: nil,
3625
- cancel_at: nil,
3626
- cancel_at_period_end: nil,
3627
- cancel_now: nil,
3628
- default_tax_rates: nil,
3629
- items: nil,
3630
- proration_behavior: nil,
3631
- proration_date: nil,
3632
- resume_at: nil,
3633
- start_date: nil,
3634
- trial_end: nil
3635
- ); end
3636
- end
3637
- # Settings for automatic tax lookup for this invoice preview.
3638
- sig { returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::AutomaticTax)) }
3639
- attr_accessor :automatic_tax
3640
- # The currency to preview this invoice in. Defaults to that of `customer` if not specified.
3641
- sig { returns(T.nilable(String)) }
3642
- attr_accessor :currency
3643
- # 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.
3644
- sig { returns(T.nilable(String)) }
3645
- attr_accessor :customer
3646
- # 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.
3647
- sig { returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::CustomerDetails)) }
3648
- attr_accessor :customer_details
3649
- # 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.
3650
- sig {
3651
- returns(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::Discount])))
3652
- }
3653
- attr_accessor :discounts
3654
- # Specifies which fields in the response should be expanded.
3655
- sig { returns(T.nilable(T::Array[String])) }
3656
- attr_accessor :expand
3657
- # List of invoice items to add or update in the upcoming invoice preview (up to 250).
3658
- sig { returns(T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::InvoiceItem])) }
3659
- attr_accessor :invoice_items
3660
- # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
3661
- sig { returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::Issuer)) }
3662
- attr_accessor :issuer
3663
- # 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.
3664
- sig { returns(T.nilable(String)) }
3665
- attr_accessor :on_behalf_of
3666
- # Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified.
3667
- sig { returns(T.nilable(String)) }
3668
- attr_accessor :preview_mode
3669
- # The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields.
3670
- sig { returns(T.nilable(String)) }
3671
- attr_accessor :schedule
3672
- # The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields.
3673
- sig { returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails)) }
3674
- attr_accessor :schedule_details
3675
- # 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.
3676
- sig { returns(T.nilable(String)) }
3677
- attr_accessor :subscription
3678
- # The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields.
3679
- sig { returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails)) }
3680
- attr_accessor :subscription_details
3681
- sig {
3682
- params(automatic_tax: T.nilable(::Stripe::Invoice::CreatePreviewParams::AutomaticTax), currency: T.nilable(String), customer: T.nilable(String), customer_details: T.nilable(::Stripe::Invoice::CreatePreviewParams::CustomerDetails), discounts: T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::Discount])), expand: T.nilable(T::Array[String]), invoice_items: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::InvoiceItem]), issuer: T.nilable(::Stripe::Invoice::CreatePreviewParams::Issuer), on_behalf_of: T.nilable(String), preview_mode: T.nilable(String), schedule: T.nilable(String), schedule_details: T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails), subscription: T.nilable(String), subscription_details: T.nilable(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails)).void
3683
- }
3684
- def initialize(
3685
- automatic_tax: nil,
3686
- currency: nil,
3687
- customer: nil,
3688
- customer_details: nil,
3689
- discounts: nil,
3690
- expand: nil,
3691
- invoice_items: nil,
3692
- issuer: nil,
3693
- on_behalf_of: nil,
3694
- preview_mode: nil,
3695
- schedule: nil,
3696
- schedule_details: nil,
3697
- subscription: nil,
3698
- subscription_details: nil
3699
- ); end
3700
- end
3701
- # Adds multiple line items to an invoice. This is only possible when an invoice is still a draft.
3702
- sig {
3703
- params(params: T.any(::Stripe::Invoice::AddLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
3704
- }
3705
- def add_lines(params = {}, opts = {}); end
3706
-
3707
- # Adds multiple line items to an invoice. This is only possible when an invoice is still a draft.
3708
- sig {
3709
- params(invoice: String, params: T.any(::Stripe::Invoice::AddLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
3710
- }
3711
- def self.add_lines(invoice, params = {}, opts = {}); end
3712
-
3713
- # Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments.
3714
- #
3715
- # For the PaymentIntent, when the PaymentIntent's status changes to succeeded, the payment is credited
3716
- # to the invoice, increasing its amount_paid. When the invoice is fully paid, the
3717
- # invoice's status becomes paid.
3718
- #
3719
- # If the PaymentIntent's status is already succeeded when it's attached, it's
3720
- # credited to the invoice immediately.
3721
- #
3722
- # See: [Partial payments](https://docs.stripe.com/docs/invoicing/partial-payments) to learn more.
3723
- sig {
3724
- params(params: T.any(::Stripe::Invoice::AttachPaymentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
3725
- }
3726
- def attach_payment(params = {}, opts = {}); end
3727
-
3728
- # Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments.
3729
- #
3730
- # For the PaymentIntent, when the PaymentIntent's status changes to succeeded, the payment is credited
3731
- # to the invoice, increasing its amount_paid. When the invoice is fully paid, the
3732
- # invoice's status becomes paid.
3733
- #
3734
- # If the PaymentIntent's status is already succeeded when it's attached, it's
3735
- # credited to the invoice immediately.
3736
- #
3737
- # See: [Partial payments](https://docs.stripe.com/docs/invoicing/partial-payments) to learn more.
3738
- sig {
3739
- params(invoice: String, params: T.any(::Stripe::Invoice::AttachPaymentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
3740
- }
3741
- def self.attach_payment(invoice, params = {}, opts = {}); end
3742
-
3743
- # 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://docs.stripe.com/api#finalize_invoice) the invoice to your customers.
3744
- sig {
3745
- params(params: T.any(::Stripe::Invoice::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
3746
- }
3747
- def self.create(params = {}, opts = {}); end
3748
-
3749
- # At any time, you can preview the upcoming invoice for a subscription or subscription schedule. 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.
3750
- #
3751
- # You can also preview the effects of creating or updating a subscription or subscription schedule, including a preview of any prorations that 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.
3752
- #
3753
- # The recommended way to get only the prorations being previewed on the invoice is to consider line items where parent.subscription_item_details.proration is true.
3754
- #
3755
- # 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.
3756
- #
3757
- # 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)
3758
- sig {
3759
- params(params: T.any(::Stripe::Invoice::CreatePreviewParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
3760
- }
3761
- def self.create_preview(params = {}, opts = {}); end
3762
-
3763
- # 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://docs.stripe.com/api#void_invoice).
3764
- sig {
3765
- params(invoice: String, params: T.any(::Stripe::Invoice::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
3766
- }
3767
- def self.delete(invoice, params = {}, opts = {}); end
3768
-
3769
- # 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://docs.stripe.com/api#void_invoice).
3770
- sig {
3771
- params(params: T.any(::Stripe::Invoice::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
3772
- }
3773
- def delete(params = {}, opts = {}); end
3774
-
3775
- # 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.
3776
- sig {
3777
- params(params: T.any(::Stripe::Invoice::FinalizeInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
3778
- }
3779
- def finalize_invoice(params = {}, opts = {}); end
3780
-
3781
- # 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.
3782
- sig {
3783
- params(invoice: String, params: T.any(::Stripe::Invoice::FinalizeInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
3784
- }
3785
- def self.finalize_invoice(invoice, params = {}, opts = {}); end
3786
-
3787
- # 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.
3788
- sig {
3789
- params(params: T.any(::Stripe::Invoice::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
3790
- }
3791
- def self.list(params = {}, opts = {}); end
3792
-
3793
- # Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.
3794
- sig {
3795
- params(params: T.any(::Stripe::Invoice::MarkUncollectibleParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
3796
- }
3797
- def mark_uncollectible(params = {}, opts = {}); end
3798
-
3799
- # Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.
3800
- sig {
3801
- params(invoice: String, params: T.any(::Stripe::Invoice::MarkUncollectibleParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
3802
- }
3803
- def self.mark_uncollectible(invoice, params = {}, opts = {}); end
3804
-
3805
- # 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.
3806
- sig {
3807
- params(params: T.any(::Stripe::Invoice::PayParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
3808
- }
3809
- def pay(params = {}, opts = {}); end
3810
-
3811
- # 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.
3812
- sig {
3813
- params(invoice: String, params: T.any(::Stripe::Invoice::PayParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
3814
- }
3815
- def self.pay(invoice, params = {}, opts = {}); end
3816
-
3817
- # Removes multiple line items from an invoice. This is only possible when an invoice is still a draft.
3818
- sig {
3819
- params(params: T.any(::Stripe::Invoice::RemoveLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
3820
- }
3821
- def remove_lines(params = {}, opts = {}); end
3822
-
3823
- # Removes multiple line items from an invoice. This is only possible when an invoice is still a draft.
3824
- sig {
3825
- params(invoice: String, params: T.any(::Stripe::Invoice::RemoveLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
3826
- }
3827
- def self.remove_lines(invoice, params = {}, opts = {}); end
3828
-
3829
- sig {
3830
- params(params: T.any(::Stripe::Invoice::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SearchResultObject)
3831
- }
3832
- def self.search(params = {}, opts = {}); end
3833
-
3834
- sig {
3835
- params(params: T.any(::Stripe::Invoice::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped, blk: T.untyped).returns(Stripe::SearchResultObject)
3836
- }
3837
- def self.search_auto_paging_each(params = {}, opts = {}, &blk); end
3838
-
3839
- # 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.
3840
- #
3841
- # Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event.
3842
- sig {
3843
- params(params: T.any(::Stripe::Invoice::SendInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
3844
- }
3845
- def send_invoice(params = {}, opts = {}); end
3846
-
3847
- # 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.
3848
- #
3849
- # Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event.
3850
- sig {
3851
- params(invoice: String, params: T.any(::Stripe::Invoice::SendInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
3852
- }
3853
- def self.send_invoice(invoice, params = {}, opts = {}); end
3854
-
3855
- # Draft invoices are fully editable. Once an invoice is [finalized](https://docs.stripe.com/docs/billing/invoices/workflow#finalized),
3856
- # monetary values, as well as collection_method, become uneditable.
3857
- #
3858
- # If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on,
3859
- # sending reminders for, or [automatically reconciling](https://docs.stripe.com/docs/billing/invoices/reconciliation) invoices, pass
3860
- # auto_advance=false.
3861
- sig {
3862
- params(invoice: String, params: T.any(::Stripe::Invoice::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
3863
- }
3864
- def self.update(invoice, params = {}, opts = {}); end
3865
-
3866
- # Updates multiple line items on an invoice. This is only possible when an invoice is still a draft.
3867
- sig {
3868
- params(params: T.any(::Stripe::Invoice::UpdateLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
3869
- }
3870
- def update_lines(params = {}, opts = {}); end
3871
-
3872
- # Updates multiple line items on an invoice. This is only possible when an invoice is still a draft.
3873
- sig {
3874
- params(invoice: String, params: T.any(::Stripe::Invoice::UpdateLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
3875
- }
3876
- def self.update_lines(invoice, params = {}, opts = {}); end
3877
-
3878
- # Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://docs.stripe.com/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.
3879
- #
3880
- # 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://docs.stripe.com/api#create_invoice) instead. Stripe recommends that you consult with your legal counsel for advice specific to your business.
3881
- sig {
3882
- params(params: T.any(::Stripe::Invoice::VoidInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
3883
- }
3884
- def void_invoice(params = {}, opts = {}); end
3885
-
3886
- # Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://docs.stripe.com/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.
3887
- #
3888
- # 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://docs.stripe.com/api#create_invoice) instead. Stripe recommends that you consult with your legal counsel for advice specific to your business.
3889
- sig {
3890
- params(invoice: String, params: T.any(::Stripe::Invoice::VoidInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
3891
- }
3892
- def self.void_invoice(invoice, params = {}, opts = {}); end
3893
- end
3894
- end