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