stripe 15.4.0.pre.beta.1 → 15.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (603) hide show
  1. checksums.yaml +4 -4
  2. data/API_VERSION +1 -1
  3. data/CHANGELOG.md +686 -1593
  4. data/OPENAPI_VERSION +1 -1
  5. data/README.md +1 -1
  6. data/VERSION +1 -1
  7. data/lib/stripe/api_requestor.rb +0 -28
  8. data/lib/stripe/api_version.rb +2 -1
  9. data/lib/stripe/errors.rb +0 -54
  10. data/lib/stripe/event_types.rb +0 -98
  11. data/lib/stripe/object_types.rb +0 -50
  12. data/lib/stripe/resources/account.rb +6 -658
  13. data/lib/stripe/resources/account_link.rb +3 -1
  14. data/lib/stripe/resources/account_session.rb +52 -256
  15. data/lib/stripe/resources/billing/credit_balance_summary.rb +0 -2
  16. data/lib/stripe/resources/billing/credit_balance_transaction.rb +0 -4
  17. data/lib/stripe/resources/billing/credit_grant.rb +1 -11
  18. data/lib/stripe/resources/billing_portal/configuration.rb +46 -2
  19. data/lib/stripe/resources/billing_portal/session.rb +0 -6
  20. data/lib/stripe/resources/card.rb +0 -2
  21. data/lib/stripe/resources/cash_balance.rb +0 -2
  22. data/lib/stripe/resources/charge.rb +7 -1543
  23. data/lib/stripe/resources/checkout/session.rb +24 -320
  24. data/lib/stripe/resources/confirmation_token.rb +3 -173
  25. data/lib/stripe/resources/coupon.rb +1 -30
  26. data/lib/stripe/resources/credit_note.rb +0 -6
  27. data/lib/stripe/resources/credit_note_line_item.rb +0 -9
  28. data/lib/stripe/resources/customer.rb +1 -3
  29. data/lib/stripe/resources/customer_balance_transaction.rb +0 -2
  30. data/lib/stripe/resources/customer_cash_balance_transaction.rb +0 -2
  31. data/lib/stripe/resources/customer_session.rb +1 -6
  32. data/lib/stripe/resources/discount.rb +0 -2
  33. data/lib/stripe/resources/dispute.rb +1 -3
  34. data/lib/stripe/resources/event.rb +14 -57
  35. data/lib/stripe/resources/financial_connections/account.rb +1 -22
  36. data/lib/stripe/resources/financial_connections/session.rb +2 -62
  37. data/lib/stripe/resources/identity/verification_session.rb +0 -10
  38. data/lib/stripe/resources/invoice.rb +40 -1071
  39. data/lib/stripe/resources/invoice_item.rb +3 -79
  40. data/lib/stripe/resources/invoice_line_item.rb +1 -55
  41. data/lib/stripe/resources/invoice_payment.rb +53 -2
  42. data/lib/stripe/resources/issuing/cardholder.rb +1 -2
  43. data/lib/stripe/resources/issuing/transaction.rb +0 -6
  44. data/lib/stripe/resources/line_item.rb +0 -37
  45. data/lib/stripe/resources/mandate.rb +0 -24
  46. data/lib/stripe/resources/payment_intent.rb +297 -5243
  47. data/lib/stripe/resources/payment_link.rb +83 -5
  48. data/lib/stripe/resources/payment_method.rb +5 -196
  49. data/lib/stripe/resources/payment_method_configuration.rb +0 -295
  50. data/lib/stripe/resources/payout.rb +0 -6
  51. data/lib/stripe/resources/price.rb +0 -30
  52. data/lib/stripe/resources/promotion_code.rb +0 -10
  53. data/lib/stripe/resources/quote.rb +8 -2039
  54. data/lib/stripe/resources/radar/value_list.rb +2 -2
  55. data/lib/stripe/resources/refund.rb +1 -10
  56. data/lib/stripe/resources/review.rb +2 -2
  57. data/lib/stripe/resources/setup_attempt.rb +1 -22
  58. data/lib/stripe/resources/setup_intent.rb +9 -578
  59. data/lib/stripe/resources/source.rb +0 -29
  60. data/lib/stripe/resources/subscription.rb +11 -290
  61. data/lib/stripe/resources/subscription_item.rb +5 -86
  62. data/lib/stripe/resources/subscription_schedule.rb +45 -1010
  63. data/lib/stripe/resources/tax/registration.rb +408 -30
  64. data/lib/stripe/resources/tax_id.rb +2 -12
  65. data/lib/stripe/resources/terminal/configuration.rb +196 -0
  66. data/lib/stripe/resources/terminal/reader.rb +0 -8
  67. data/lib/stripe/resources/transfer.rb +0 -6
  68. data/lib/stripe/resources/treasury/financial_account.rb +3 -22
  69. data/lib/stripe/resources/treasury/financial_account_features.rb +0 -2
  70. data/lib/stripe/resources/treasury/outbound_transfer.rb +0 -37
  71. data/lib/stripe/resources/treasury/received_credit.rb +1 -38
  72. data/lib/stripe/resources/treasury/received_debit.rb +1 -40
  73. data/lib/stripe/resources.rb +0 -104
  74. data/lib/stripe/services/account_link_service.rb +3 -1
  75. data/lib/stripe/services/account_service.rb +4 -565
  76. data/lib/stripe/services/account_session_service.rb +35 -226
  77. data/lib/stripe/services/billing/credit_balance_summary_service.rb +1 -4
  78. data/lib/stripe/services/billing/credit_balance_transaction_service.rb +0 -4
  79. data/lib/stripe/services/billing/credit_grant_service.rb +1 -9
  80. data/lib/stripe/services/billing_portal/configuration_service.rb +36 -2
  81. data/lib/stripe/services/billing_portal/session_service.rb +0 -4
  82. data/lib/stripe/services/charge_service.rb +0 -1418
  83. data/lib/stripe/services/checkout/session_service.rb +16 -241
  84. data/lib/stripe/services/coupon_service.rb +1 -17
  85. data/lib/stripe/services/credit_note_service.rb +0 -4
  86. data/lib/stripe/services/customer_session_service.rb +1 -4
  87. data/lib/stripe/services/financial_connections/account_service.rb +2 -7
  88. data/lib/stripe/services/financial_connections/session_service.rb +2 -34
  89. data/lib/stripe/services/financial_connections_service.rb +1 -2
  90. data/lib/stripe/services/identity/verification_session_service.rb +0 -8
  91. data/lib/stripe/services/invoice_item_service.rb +3 -75
  92. data/lib/stripe/services/invoice_line_item_service.rb +1 -33
  93. data/lib/stripe/services/invoice_payment_service.rb +83 -0
  94. data/lib/stripe/services/invoice_service.rb +40 -1022
  95. data/lib/stripe/services/issuing/cardholder_service.rb +1 -2
  96. data/lib/stripe/services/issuing/transaction_service.rb +0 -4
  97. data/lib/stripe/services/issuing_service.rb +1 -5
  98. data/lib/stripe/services/payment_intent_service.rb +399 -4882
  99. data/lib/stripe/services/payment_link_service.rb +81 -5
  100. data/lib/stripe/services/payment_method_configuration_service.rb +0 -210
  101. data/lib/stripe/services/payment_method_service.rb +2 -121
  102. data/lib/stripe/services/payout_service.rb +0 -4
  103. data/lib/stripe/services/price_service.rb +0 -19
  104. data/lib/stripe/services/promotion_code_service.rb +0 -8
  105. data/lib/stripe/services/quote_service.rb +9 -1724
  106. data/lib/stripe/services/radar/value_list_service.rb +1 -1
  107. data/lib/stripe/services/setup_intent_service.rb +9 -538
  108. data/lib/stripe/services/subscription_item_service.rb +5 -77
  109. data/lib/stripe/services/subscription_schedule_service.rb +45 -914
  110. data/lib/stripe/services/subscription_service.rb +11 -251
  111. data/lib/stripe/services/tax/registration_service.rb +360 -30
  112. data/lib/stripe/services/tax_id_service.rb +2 -8
  113. data/lib/stripe/services/tax_service.rb +1 -3
  114. data/lib/stripe/services/terminal/configuration_service.rb +152 -0
  115. data/lib/stripe/services/terminal_service.rb +1 -2
  116. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +0 -97
  117. data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +1 -25
  118. data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +1 -25
  119. data/lib/stripe/services/transfer_service.rb +0 -4
  120. data/lib/stripe/services/treasury/financial_account_features_service.rb +1 -4
  121. data/lib/stripe/services/treasury/financial_account_service.rb +2 -16
  122. data/lib/stripe/services/treasury/outbound_transfer_service.rb +0 -24
  123. data/lib/stripe/services/v1_services.rb +2 -11
  124. data/lib/stripe/services/v2/core_service.rb +1 -4
  125. data/lib/stripe/services/v2_services.rb +1 -4
  126. data/lib/stripe/services.rb +1 -53
  127. data/lib/stripe/stripe_configuration.rb +1 -3
  128. data/lib/stripe/stripe_object.rb +1 -1
  129. data/lib/stripe/util.rb +1 -7
  130. data/lib/stripe/version.rb +1 -1
  131. data/lib/stripe.rb +0 -53
  132. data/rbi/stripe/resources/account.rbi +4995 -0
  133. data/rbi/stripe/resources/account_link.rbi +76 -0
  134. data/rbi/stripe/resources/account_session.rbi +1074 -0
  135. data/rbi/stripe/resources/apple_pay_domain.rbi +88 -0
  136. data/rbi/stripe/resources/application.rbi +20 -0
  137. data/rbi/stripe/resources/application_fee.rbi +118 -0
  138. data/rbi/stripe/resources/application_fee_refund.rbi +37 -0
  139. data/rbi/stripe/resources/apps/secret.rbi +195 -0
  140. data/rbi/stripe/resources/balance.rbi +235 -0
  141. data/rbi/stripe/resources/balance_transaction.rbi +147 -0
  142. data/rbi/stripe/resources/bank_account.rbi +127 -0
  143. data/rbi/stripe/resources/billing/alert.rbi +201 -0
  144. data/rbi/stripe/resources/billing/alert_triggered.rbi +28 -0
  145. data/rbi/stripe/resources/billing/credit_balance_summary.rbi +63 -0
  146. data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +147 -0
  147. data/rbi/stripe/resources/billing/credit_grant.rbi +291 -0
  148. data/rbi/stripe/resources/billing/meter.rbi +226 -0
  149. data/rbi/stripe/resources/billing/meter_event.rbi +64 -0
  150. data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +64 -0
  151. data/rbi/stripe/resources/billing/meter_event_summary.rbi +35 -0
  152. data/rbi/stripe/resources/billing_portal/configuration.rbi +703 -0
  153. data/rbi/stripe/resources/billing_portal/session.rbi +345 -0
  154. data/rbi/stripe/resources/capability.rbi +125 -0
  155. data/rbi/stripe/resources/card.rbi +125 -0
  156. data/rbi/stripe/resources/cash_balance.rbi +32 -0
  157. data/rbi/stripe/resources/charge.rbi +2089 -0
  158. data/rbi/stripe/resources/checkout/session.rbi +4095 -0
  159. data/rbi/stripe/resources/climate/order.rbi +245 -0
  160. data/rbi/stripe/resources/climate/product.rbi +75 -0
  161. data/rbi/stripe/resources/climate/supplier.rbi +72 -0
  162. data/rbi/stripe/resources/confirmation_token.rbi +1818 -0
  163. data/rbi/stripe/resources/connect_collection_transfer.rbi +26 -0
  164. data/rbi/stripe/resources/country_spec.rbi +85 -0
  165. data/rbi/stripe/resources/coupon.rbi +250 -0
  166. data/rbi/stripe/resources/credit_note.rbi +752 -0
  167. data/rbi/stripe/resources/credit_note_line_item.rbi +101 -0
  168. data/rbi/stripe/resources/customer.rbi +1005 -0
  169. data/rbi/stripe/resources/customer_balance_transaction.rbi +56 -0
  170. data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +151 -0
  171. data/rbi/stripe/resources/customer_session.rbi +200 -0
  172. data/rbi/stripe/resources/discount.rbi +53 -0
  173. data/rbi/stripe/resources/dispute.rbi +761 -0
  174. data/rbi/stripe/resources/entitlements/active_entitlement.rbi +58 -0
  175. data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +23 -0
  176. data/rbi/stripe/resources/entitlements/feature.rbi +117 -0
  177. data/rbi/stripe/resources/ephemeral_key.rbi +44 -0
  178. data/rbi/stripe/resources/event.rbi +137 -0
  179. data/rbi/stripe/resources/exchange_rate.rbi +66 -0
  180. data/rbi/stripe/resources/file.rbi +143 -0
  181. data/rbi/stripe/resources/file_link.rbi +141 -0
  182. data/rbi/stripe/resources/financial_connections/account.rbi +339 -0
  183. data/rbi/stripe/resources/financial_connections/account_owner.rbi +35 -0
  184. data/rbi/stripe/resources/financial_connections/account_ownership.rbi +23 -0
  185. data/rbi/stripe/resources/financial_connections/session.rbi +123 -0
  186. data/rbi/stripe/resources/financial_connections/transaction.rbi +124 -0
  187. data/rbi/stripe/resources/forwarding/request.rbi +216 -0
  188. data/rbi/stripe/resources/funding_instructions.rbi +437 -0
  189. data/rbi/stripe/resources/identity/verification_report.rbi +360 -0
  190. data/rbi/stripe/resources/identity/verification_session.rbi +564 -0
  191. data/rbi/stripe/resources/invoice.rbi +3858 -0
  192. data/rbi/stripe/resources/invoice_item.rbi +470 -0
  193. data/rbi/stripe/resources/invoice_line_item.rbi +432 -0
  194. data/rbi/stripe/resources/invoice_payment.rbi +121 -0
  195. data/rbi/stripe/resources/invoice_rendering_template.rbi +104 -0
  196. data/rbi/stripe/resources/issuing/authorization.rbi +1283 -0
  197. data/rbi/stripe/resources/issuing/card.rbi +741 -0
  198. data/rbi/stripe/resources/issuing/cardholder.rbi +744 -0
  199. data/rbi/stripe/resources/issuing/dispute.rbi +913 -0
  200. data/rbi/stripe/resources/issuing/personalization_design.rbi +338 -0
  201. data/rbi/stripe/resources/issuing/physical_bundle.rbi +79 -0
  202. data/rbi/stripe/resources/issuing/token.rbi +226 -0
  203. data/rbi/stripe/resources/issuing/transaction.rbi +1061 -0
  204. data/rbi/stripe/resources/line_item.rbi +72 -0
  205. data/rbi/stripe/resources/login_link.rbi +19 -0
  206. data/rbi/stripe/resources/mandate.rbi +191 -0
  207. data/rbi/stripe/resources/payment_intent.rbi +9997 -0
  208. data/rbi/stripe/resources/payment_link.rbi +1893 -0
  209. data/rbi/stripe/resources/payment_method.rbi +1770 -0
  210. data/rbi/stripe/resources/payment_method_configuration.rbi +3550 -0
  211. data/rbi/stripe/resources/payment_method_domain.rbi +228 -0
  212. data/rbi/stripe/resources/payout.rbi +300 -0
  213. data/rbi/stripe/resources/person.rbi +401 -0
  214. data/rbi/stripe/resources/plan.rbi +371 -0
  215. data/rbi/stripe/resources/price.rbi +694 -0
  216. data/rbi/stripe/resources/product.rbi +555 -0
  217. data/rbi/stripe/resources/product_feature.rbi +26 -0
  218. data/rbi/stripe/resources/promotion_code.rbi +261 -0
  219. data/rbi/stripe/resources/quote.rbi +1145 -0
  220. data/rbi/stripe/resources/radar/early_fraud_warning.rbi +98 -0
  221. data/rbi/stripe/resources/radar/value_list.rbi +168 -0
  222. data/rbi/stripe/resources/radar/value_list_item.rbi +129 -0
  223. data/rbi/stripe/resources/refund.rbi +523 -0
  224. data/rbi/stripe/resources/reporting/report_run.rbi +191 -0
  225. data/rbi/stripe/resources/reporting/report_type.rbi +57 -0
  226. data/rbi/stripe/resources/reserve_transaction.rbi +23 -0
  227. data/rbi/stripe/resources/reversal.rbi +51 -0
  228. data/rbi/stripe/resources/review.rbi +154 -0
  229. data/rbi/stripe/resources/setup_attempt.rbi +477 -0
  230. data/rbi/stripe/resources/setup_intent.rbi +3978 -0
  231. data/rbi/stripe/resources/shipping_rate.rbi +305 -0
  232. data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +75 -0
  233. data/rbi/stripe/resources/source.rbi +1496 -0
  234. data/rbi/stripe/resources/source_mandate_notification.rbi +77 -0
  235. data/rbi/stripe/resources/source_transaction.rbi +127 -0
  236. data/rbi/stripe/resources/subscription.rbi +2080 -0
  237. data/rbi/stripe/resources/subscription_item.rbi +404 -0
  238. data/rbi/stripe/resources/subscription_schedule.rbi +1673 -0
  239. data/rbi/stripe/resources/tax/calculation.rbi +478 -0
  240. data/rbi/stripe/resources/tax/calculation_line_item.rbi +91 -0
  241. data/rbi/stripe/resources/tax/registration.rbi +3216 -0
  242. data/rbi/stripe/resources/tax/settings.rbi +141 -0
  243. data/rbi/stripe/resources/tax/transaction.rbi +351 -0
  244. data/rbi/stripe/resources/tax/transaction_line_item.rbi +54 -0
  245. data/rbi/stripe/resources/tax_code.rbi +44 -0
  246. data/rbi/stripe/resources/tax_deducted_at_source.rbi +23 -0
  247. data/rbi/stripe/resources/tax_id.rbi +165 -0
  248. data/rbi/stripe/resources/tax_rate.rbi +239 -0
  249. data/rbi/stripe/resources/terminal/configuration.rbi +1595 -0
  250. data/rbi/stripe/resources/terminal/connection_token.rbi +37 -0
  251. data/rbi/stripe/resources/terminal/location.rbi +222 -0
  252. data/rbi/stripe/resources/terminal/reader.rbi +994 -0
  253. data/rbi/stripe/resources/test_helpers/test_clock.rbi +132 -0
  254. data/rbi/stripe/resources/token.rbi +1283 -0
  255. data/rbi/stripe/resources/topup.rbi +222 -0
  256. data/rbi/stripe/resources/transfer.rbi +199 -0
  257. data/rbi/stripe/resources/treasury/credit_reversal.rbi +119 -0
  258. data/rbi/stripe/resources/treasury/debit_reversal.rbi +131 -0
  259. data/rbi/stripe/resources/treasury/financial_account.rbi +869 -0
  260. data/rbi/stripe/resources/treasury/financial_account_features.rbi +260 -0
  261. data/rbi/stripe/resources/treasury/inbound_transfer.rbi +295 -0
  262. data/rbi/stripe/resources/treasury/outbound_payment.rbi +592 -0
  263. data/rbi/stripe/resources/treasury/outbound_transfer.rbi +431 -0
  264. data/rbi/stripe/resources/treasury/received_credit.rbi +302 -0
  265. data/rbi/stripe/resources/treasury/received_debit.rbi +256 -0
  266. data/rbi/stripe/resources/treasury/transaction.rbi +215 -0
  267. data/rbi/stripe/resources/treasury/transaction_entry.rbi +192 -0
  268. data/rbi/stripe/resources/v2/amount.rbi +14 -0
  269. data/rbi/stripe/resources/v2/billing/meter_event.rbi +37 -0
  270. data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +41 -0
  271. data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +31 -0
  272. data/rbi/stripe/resources/v2/event.rbi +48 -0
  273. data/rbi/stripe/resources/v2/event_destination.rbi +91 -0
  274. data/rbi/stripe/resources/webhook_endpoint.rbi +168 -0
  275. data/rbi/stripe/services/account_capability_service.rbi +51 -0
  276. data/{lib/stripe/services/external_account_service.rb → rbi/stripe/services/account_external_account_service.rbi} +122 -135
  277. data/rbi/stripe/services/account_link_service.rbi +60 -0
  278. data/rbi/stripe/services/account_login_link_service.rbi +22 -0
  279. data/rbi/stripe/services/account_person_service.rbi +1011 -0
  280. data/rbi/stripe/services/account_service.rbi +4281 -0
  281. data/rbi/stripe/services/account_session_service.rbi +685 -0
  282. data/rbi/stripe/services/apple_pay_domain_service.rbi +76 -0
  283. data/rbi/stripe/services/application_fee_refund_service.rbi +93 -0
  284. data/rbi/stripe/services/application_fee_service.rbi +78 -0
  285. data/rbi/stripe/services/apps/secret_service.rbi +151 -0
  286. data/rbi/stripe/services/apps_service.rbi +9 -0
  287. data/rbi/stripe/services/balance_service.rbi +21 -0
  288. data/rbi/stripe/services/balance_transaction_service.rbi +93 -0
  289. data/rbi/stripe/services/billing/alert_service.rbi +152 -0
  290. data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +68 -0
  291. data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +59 -0
  292. data/rbi/stripe/services/billing/credit_grant_service.rbi +211 -0
  293. data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +42 -0
  294. data/rbi/stripe/services/billing/meter_event_service.rbi +42 -0
  295. data/rbi/stripe/services/billing/meter_event_summary_service.rbi +54 -0
  296. data/rbi/stripe/services/billing/meter_service.rbi +163 -0
  297. data/rbi/stripe/services/billing_portal/configuration_service.rbi +555 -0
  298. data/rbi/stripe/services/billing_portal/session_service.rbi +204 -0
  299. data/rbi/stripe/services/billing_portal_service.rbi +10 -0
  300. data/rbi/stripe/services/billing_service.rbi +15 -0
  301. data/rbi/stripe/services/charge_service.rbi +448 -0
  302. data/rbi/stripe/services/checkout/session_line_item_service.rbi +33 -0
  303. data/rbi/stripe/services/checkout/session_service.rbi +2690 -0
  304. data/rbi/stripe/services/checkout_service.rbi +9 -0
  305. data/rbi/stripe/services/climate/order_service.rbi +142 -0
  306. data/rbi/stripe/services/climate/product_service.rbi +46 -0
  307. data/{lib/stripe/services/financial_connections/institution_service.rb → rbi/stripe/services/climate/supplier_service.rbi} +25 -36
  308. data/rbi/stripe/services/climate_service.rbi +11 -0
  309. data/rbi/stripe/services/confirmation_token_service.rbi +20 -0
  310. data/rbi/stripe/services/country_spec_service.rbi +44 -0
  311. data/rbi/stripe/services/coupon_service.rbi +194 -0
  312. data/{lib/stripe/services/quote_preview_invoice_service.rb → rbi/stripe/services/credit_note_line_item_service.rbi} +16 -20
  313. data/rbi/stripe/services/credit_note_preview_lines_service.rbi +167 -0
  314. data/rbi/stripe/services/credit_note_service.rbi +415 -0
  315. data/rbi/stripe/services/customer_balance_transaction_service.rbi +92 -0
  316. data/rbi/stripe/services/customer_cash_balance_service.rbi +45 -0
  317. data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +44 -0
  318. data/rbi/stripe/services/customer_funding_instructions_service.rbi +59 -0
  319. data/rbi/stripe/services/customer_payment_method_service.rbi +57 -0
  320. data/rbi/stripe/services/customer_payment_source_service.rbi +232 -0
  321. data/rbi/stripe/services/customer_service.rbi +647 -0
  322. data/rbi/stripe/services/customer_session_service.rbi +116 -0
  323. data/rbi/stripe/services/customer_tax_id_service.rbi +70 -0
  324. data/rbi/stripe/services/dispute_service.rbi +424 -0
  325. data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +55 -0
  326. data/rbi/stripe/services/entitlements/feature_service.rbi +107 -0
  327. data/rbi/stripe/services/entitlements_service.rbi +10 -0
  328. data/rbi/stripe/services/ephemeral_key_service.rbi +53 -0
  329. data/rbi/stripe/services/event_service.rbi +83 -0
  330. data/rbi/stripe/services/exchange_rate_service.rbi +44 -0
  331. data/rbi/stripe/services/file_link_service.rbi +124 -0
  332. data/rbi/stripe/services/file_service.rbi +116 -0
  333. data/rbi/stripe/services/financial_connections/account_owner_service.rbi +42 -0
  334. data/rbi/stripe/services/financial_connections/account_service.rbi +133 -0
  335. data/rbi/stripe/services/financial_connections/session_service.rbi +88 -0
  336. data/rbi/stripe/services/financial_connections/transaction_service.rbi +92 -0
  337. data/rbi/stripe/services/financial_connections_service.rbi +11 -0
  338. data/rbi/stripe/services/forwarding/request_service.rbi +134 -0
  339. data/rbi/stripe/services/forwarding_service.rbi +9 -0
  340. data/rbi/stripe/services/identity/verification_report_service.rbi +87 -0
  341. data/rbi/stripe/services/identity/verification_session_service.rbi +339 -0
  342. data/rbi/stripe/services/identity_service.rbi +10 -0
  343. data/rbi/stripe/services/invoice_item_service.rbi +366 -0
  344. data/rbi/stripe/services/invoice_line_item_service.rbi +259 -0
  345. data/rbi/stripe/services/invoice_payment_service.rbi +71 -0
  346. data/rbi/stripe/services/invoice_rendering_template_service.rbi +82 -0
  347. data/rbi/stripe/services/invoice_service.rbi +3027 -0
  348. data/rbi/stripe/services/issuing/authorization_service.rbi +146 -0
  349. data/rbi/stripe/services/issuing/card_service.rbi +495 -0
  350. data/rbi/stripe/services/issuing/cardholder_service.rbi +587 -0
  351. data/rbi/stripe/services/issuing/dispute_service.rbi +707 -0
  352. data/rbi/stripe/services/issuing/personalization_design_service.rbi +243 -0
  353. data/rbi/stripe/services/issuing/physical_bundle_service.rbi +59 -0
  354. data/rbi/stripe/services/issuing/token_service.rbi +99 -0
  355. data/rbi/stripe/services/issuing/transaction_service.rbi +105 -0
  356. data/rbi/stripe/services/issuing_service.rbi +16 -0
  357. data/rbi/stripe/services/mandate_service.rbi +20 -0
  358. data/rbi/stripe/services/payment_intent_service.rbi +7994 -0
  359. data/{lib/stripe/services/payment_intent_amount_details_line_item_service.rb → rbi/stripe/services/payment_link_line_item_service.rbi} +16 -20
  360. data/rbi/stripe/services/payment_link_service.rbi +1441 -0
  361. data/rbi/stripe/services/payment_method_configuration_service.rbi +2487 -0
  362. data/rbi/stripe/services/payment_method_domain_service.rbi +112 -0
  363. data/rbi/stripe/services/payment_method_service.rbi +781 -0
  364. data/rbi/stripe/services/payout_service.rbi +205 -0
  365. data/rbi/stripe/services/plan_service.rbi +282 -0
  366. data/rbi/stripe/services/price_service.rbi +546 -0
  367. data/rbi/stripe/services/product_feature_service.rbi +67 -0
  368. data/rbi/stripe/services/product_service.rbi +477 -0
  369. data/rbi/stripe/services/promotion_code_service.rbi +214 -0
  370. data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +31 -0
  371. data/{lib/stripe/services/order_line_item_service.rb → rbi/stripe/services/quote_line_item_service.rbi} +16 -20
  372. data/rbi/stripe/services/quote_service.rbi +699 -0
  373. data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +85 -0
  374. data/rbi/stripe/services/radar/value_list_item_service.rbi +109 -0
  375. data/rbi/stripe/services/radar/value_list_service.rbi +141 -0
  376. data/rbi/stripe/services/radar_service.rbi +11 -0
  377. data/rbi/stripe/services/refund_service.rbi +185 -0
  378. data/rbi/stripe/services/reporting/report_run_service.rbi +135 -0
  379. data/rbi/stripe/services/reporting/report_type_service.rbi +35 -0
  380. data/rbi/stripe/services/reporting_service.rbi +10 -0
  381. data/rbi/stripe/services/review_service.rbi +84 -0
  382. data/rbi/stripe/services/setup_attempt_service.rbi +65 -0
  383. data/rbi/stripe/services/setup_intent_service.rbi +3709 -0
  384. data/rbi/stripe/services/shipping_rate_service.rbi +241 -0
  385. data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +46 -0
  386. data/rbi/stripe/services/sigma_service.rbi +9 -0
  387. data/rbi/stripe/services/source_service.rbi +663 -0
  388. data/{lib/stripe/services/quote_line_service.rb → rbi/stripe/services/source_transaction_service.rbi} +16 -20
  389. data/rbi/stripe/services/subscription_item_service.rbi +350 -0
  390. data/rbi/stripe/services/subscription_schedule_service.rbi +1333 -0
  391. data/rbi/stripe/services/subscription_service.rbi +1684 -0
  392. data/{lib/stripe/services/financial_connections/account_inferred_balance_service.rb → rbi/stripe/services/tax/calculation_line_item_service.rbi} +17 -21
  393. data/rbi/stripe/services/tax/calculation_service.rbi +234 -0
  394. data/rbi/stripe/services/tax/registration_service.rbi +2278 -0
  395. data/rbi/stripe/services/tax/settings_service.rbi +93 -0
  396. data/{lib/stripe/services/privacy/redaction_job_validation_error_service.rb → rbi/stripe/services/tax/transaction_line_item_service.rbi} +17 -21
  397. data/rbi/stripe/services/tax/transaction_service.rbi +146 -0
  398. data/rbi/stripe/services/tax_code_service.rbi +44 -0
  399. data/rbi/stripe/services/tax_id_service.rbi +110 -0
  400. data/rbi/stripe/services/tax_rate_service.rbi +185 -0
  401. data/rbi/stripe/services/tax_service.rbi +12 -0
  402. data/rbi/stripe/services/terminal/configuration_service.rbi +1286 -0
  403. data/rbi/stripe/services/terminal/connection_token_service.rbi +25 -0
  404. data/rbi/stripe/services/terminal/location_service.rbi +182 -0
  405. data/rbi/stripe/services/terminal/reader_service.rbi +540 -0
  406. data/rbi/stripe/services/terminal_service.rbi +12 -0
  407. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +746 -0
  408. data/rbi/stripe/services/test_helpers/customer_service.rbi +33 -0
  409. data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +848 -0
  410. data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +76 -0
  411. data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +69 -0
  412. data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +711 -0
  413. data/rbi/stripe/services/test_helpers/issuing_service.rbi +14 -0
  414. data/rbi/stripe/services/test_helpers/refund_service.rbi +22 -0
  415. data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +93 -0
  416. data/rbi/stripe/services/test_helpers/terminal_service.rbi +11 -0
  417. data/rbi/stripe/services/test_helpers/test_clock_service.rbi +90 -0
  418. data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +64 -0
  419. data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +125 -0
  420. data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +125 -0
  421. data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +87 -0
  422. data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +87 -0
  423. data/rbi/stripe/services/test_helpers/treasury_service.rbi +15 -0
  424. data/rbi/stripe/services/test_helpers_service.rbi +15 -0
  425. data/rbi/stripe/services/token_service.rbi +1257 -0
  426. data/rbi/stripe/services/topup_service.rbi +176 -0
  427. data/rbi/stripe/services/transfer_reversal_service.rbi +101 -0
  428. data/rbi/stripe/services/transfer_service.rbi +152 -0
  429. data/rbi/stripe/services/treasury/credit_reversal_service.rbi +84 -0
  430. data/rbi/stripe/services/treasury/debit_reversal_service.rbi +88 -0
  431. data/rbi/stripe/services/treasury/financial_account_features_service.rbi +198 -0
  432. data/rbi/stripe/services/treasury/financial_account_service.rbi +566 -0
  433. data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +117 -0
  434. data/rbi/stripe/services/treasury/outbound_payment_service.rbi +304 -0
  435. data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +157 -0
  436. data/rbi/stripe/services/treasury/received_credit_service.rbi +72 -0
  437. data/rbi/stripe/services/treasury/received_debit_service.rbi +59 -0
  438. data/rbi/stripe/services/treasury/transaction_entry_service.rbi +111 -0
  439. data/rbi/stripe/services/treasury/transaction_service.rbi +122 -0
  440. data/rbi/stripe/services/treasury_service.rbi +18 -0
  441. data/rbi/stripe/services/v1_services.rbi +77 -0
  442. data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +39 -0
  443. data/rbi/stripe/services/v2/billing/meter_event_service.rbi +42 -0
  444. data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +18 -0
  445. data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +55 -0
  446. data/rbi/stripe/services/v2/billing_service.rbi +14 -0
  447. data/rbi/stripe/services/v2/core/event_destination_service.rbi +192 -0
  448. data/rbi/stripe/services/v2/core/event_service.rbi +36 -0
  449. data/rbi/stripe/services/v2/core_service.rbi +12 -0
  450. data/rbi/stripe/services/v2_services.rbi +10 -0
  451. data/rbi/stripe/services/webhook_endpoint_service.rbi +129 -0
  452. data/stripe.gemspec +1 -4
  453. metadata +325 -162
  454. data/lib/stripe/events/v2_core_account_closed_event.rb +0 -21
  455. data/lib/stripe/events/v2_core_account_created_event.rb +0 -21
  456. data/lib/stripe/events/v2_core_account_including_configuration_customer_capability_status_updated_event.rb +0 -23
  457. data/lib/stripe/events/v2_core_account_including_configuration_customer_updated_event.rb +0 -21
  458. data/lib/stripe/events/v2_core_account_including_configuration_merchant_capability_status_updated_event.rb +0 -23
  459. data/lib/stripe/events/v2_core_account_including_configuration_merchant_updated_event.rb +0 -21
  460. data/lib/stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event.rb +0 -23
  461. data/lib/stripe/events/v2_core_account_including_configuration_recipient_updated_event.rb +0 -21
  462. data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +0 -21
  463. data/lib/stripe/events/v2_core_account_including_identity_updated_event.rb +0 -21
  464. data/lib/stripe/events/v2_core_account_including_requirements_updated_event.rb +0 -21
  465. data/lib/stripe/events/v2_core_account_link_completed_event.rb +0 -13
  466. data/lib/stripe/events/v2_core_account_person_created_event.rb +0 -23
  467. data/lib/stripe/events/v2_core_account_person_deleted_event.rb +0 -23
  468. data/lib/stripe/events/v2_core_account_person_updated_event.rb +0 -23
  469. data/lib/stripe/events/v2_core_account_updated_event.rb +0 -21
  470. data/lib/stripe/events/v2_money_management_adjustment_created_event.rb +0 -21
  471. data/lib/stripe/events/v2_money_management_financial_account_created_event.rb +0 -21
  472. data/lib/stripe/events/v2_money_management_financial_account_updated_event.rb +0 -21
  473. data/lib/stripe/events/v2_money_management_financial_address_activated_event.rb +0 -21
  474. data/lib/stripe/events/v2_money_management_financial_address_failed_event.rb +0 -21
  475. data/lib/stripe/events/v2_money_management_inbound_transfer_available_event.rb +0 -23
  476. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +0 -21
  477. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +0 -21
  478. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +0 -21
  479. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +0 -21
  480. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +0 -21
  481. data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +0 -21
  482. data/lib/stripe/events/v2_money_management_outbound_payment_created_event.rb +0 -21
  483. data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +0 -21
  484. data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +0 -21
  485. data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +0 -21
  486. data/lib/stripe/events/v2_money_management_outbound_payment_updated_event.rb +0 -21
  487. data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +0 -21
  488. data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +0 -21
  489. data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +0 -21
  490. data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +0 -21
  491. data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +0 -21
  492. data/lib/stripe/events/v2_money_management_outbound_transfer_updated_event.rb +0 -21
  493. data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +0 -23
  494. data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +0 -21
  495. data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +0 -21
  496. data/lib/stripe/events/v2_money_management_received_credit_succeeded_event.rb +0 -21
  497. data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +0 -21
  498. data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +0 -21
  499. data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +0 -21
  500. data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +0 -21
  501. data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +0 -21
  502. data/lib/stripe/events/v2_money_management_transaction_created_event.rb +0 -21
  503. data/lib/stripe/events/v2_money_management_transaction_updated_event.rb +0 -21
  504. data/lib/stripe/events/v2_off_session_payment_requires_capture_event.rb +0 -21
  505. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_failed_event.rb +0 -21
  506. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb +0 -21
  507. data/lib/stripe/events/v2_payments_off_session_payment_canceled_event.rb +0 -21
  508. data/lib/stripe/events/v2_payments_off_session_payment_created_event.rb +0 -21
  509. data/lib/stripe/events/v2_payments_off_session_payment_failed_event.rb +0 -21
  510. data/lib/stripe/events/v2_payments_off_session_payment_succeeded_event.rb +0 -21
  511. data/lib/stripe/resources/account_notice.rb +0 -123
  512. data/lib/stripe/resources/balance_settings.rb +0 -105
  513. data/lib/stripe/resources/capital/financing_offer.rb +0 -179
  514. data/lib/stripe/resources/capital/financing_summary.rb +0 -55
  515. data/lib/stripe/resources/capital/financing_transaction.rb +0 -114
  516. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -27
  517. data/lib/stripe/resources/financial_connections/institution.rb +0 -92
  518. data/lib/stripe/resources/fx_quote.rb +0 -184
  519. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -602
  520. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +0 -82
  521. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +0 -86
  522. data/lib/stripe/resources/issuing/settlement.rb +0 -53
  523. data/lib/stripe/resources/margin.rb +0 -115
  524. data/lib/stripe/resources/order.rb +0 -2958
  525. data/lib/stripe/resources/payment_attempt_record.rb +0 -1099
  526. data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +0 -72
  527. data/lib/stripe/resources/payment_record.rb +0 -1628
  528. data/lib/stripe/resources/privacy/redaction_job.rb +0 -298
  529. data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +0 -33
  530. data/lib/stripe/resources/quote_line.rb +0 -274
  531. data/lib/stripe/resources/quote_preview_invoice.rb +0 -663
  532. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -371
  533. data/lib/stripe/resources/tax/association.rb +0 -66
  534. data/lib/stripe/resources/tax/form.rb +0 -211
  535. data/lib/stripe/resources/terminal/reader_collected_data.rb +0 -31
  536. data/lib/stripe/resources/v2/core/account.rb +0 -1755
  537. data/lib/stripe/resources/v2/core/account_link.rb +0 -56
  538. data/lib/stripe/resources/v2/core/person.rb +0 -276
  539. data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +0 -74
  540. data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +0 -39
  541. data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +0 -20
  542. data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +0 -22
  543. data/lib/stripe/resources/v2/money_management/adjustment.rb +0 -51
  544. data/lib/stripe/resources/v2/money_management/financial_account.rb +0 -58
  545. data/lib/stripe/resources/v2/money_management/financial_address.rb +0 -68
  546. data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +0 -94
  547. data/lib/stripe/resources/v2/money_management/outbound_payment.rb +0 -129
  548. data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +0 -82
  549. data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +0 -45
  550. data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +0 -117
  551. data/lib/stripe/resources/v2/money_management/payout_method.rb +0 -75
  552. data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +0 -49
  553. data/lib/stripe/resources/v2/money_management/received_credit.rb +0 -122
  554. data/lib/stripe/resources/v2/money_management/received_debit.rb +0 -84
  555. data/lib/stripe/resources/v2/money_management/transaction.rb +0 -78
  556. data/lib/stripe/resources/v2/money_management/transaction_entry.rb +0 -68
  557. data/lib/stripe/resources/v2/payments/off_session_payment.rb +0 -72
  558. data/lib/stripe/services/account_notice_service.rb +0 -101
  559. data/lib/stripe/services/balance_settings_service.rb +0 -96
  560. data/lib/stripe/services/capital/financing_offer_service.rb +0 -112
  561. data/lib/stripe/services/capital/financing_summary_service.rb +0 -28
  562. data/lib/stripe/services/capital/financing_transaction_service.rb +0 -79
  563. data/lib/stripe/services/capital_service.rb +0 -15
  564. data/lib/stripe/services/fx_quote_service.rb +0 -123
  565. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +0 -504
  566. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +0 -66
  567. data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +0 -83
  568. data/lib/stripe/services/margin_service.rb +0 -119
  569. data/lib/stripe/services/order_service.rb +0 -2388
  570. data/lib/stripe/services/payment_attempt_record_service.rb +0 -49
  571. data/lib/stripe/services/payment_record_service.rb +0 -542
  572. data/lib/stripe/services/privacy/redaction_job_service.rb +0 -240
  573. data/lib/stripe/services/privacy_service.rb +0 -13
  574. data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +0 -35
  575. data/lib/stripe/services/tax/association_service.rb +0 -31
  576. data/lib/stripe/services/tax/form_service.rb +0 -100
  577. data/lib/stripe/services/terminal/reader_collected_data_service.rb +0 -28
  578. data/lib/stripe/services/v2/core/account_link_service.rb +0 -76
  579. data/lib/stripe/services/v2/core/account_service.rb +0 -4170
  580. data/lib/stripe/services/v2/core/accounts/person_service.rb +0 -1045
  581. data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +0 -130
  582. data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +0 -107
  583. data/lib/stripe/services/v2/core/vault_service.rb +0 -18
  584. data/lib/stripe/services/v2/money_management/adjustment_service.rb +0 -74
  585. data/lib/stripe/services/v2/money_management/financial_account_service.rb +0 -43
  586. data/lib/stripe/services/v2/money_management/financial_address_service.rb +0 -82
  587. data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +0 -125
  588. data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +0 -95
  589. data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +0 -199
  590. data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +0 -235
  591. data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +0 -172
  592. data/lib/stripe/services/v2/money_management/payout_method_service.rb +0 -90
  593. data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +0 -32
  594. data/lib/stripe/services/v2/money_management/received_credit_service.rb +0 -70
  595. data/lib/stripe/services/v2/money_management/received_debit_service.rb +0 -43
  596. data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +0 -69
  597. data/lib/stripe/services/v2/money_management/transaction_service.rb +0 -73
  598. data/lib/stripe/services/v2/money_management_service.rb +0 -31
  599. data/lib/stripe/services/v2/payment_service.rb +0 -15
  600. data/lib/stripe/services/v2/payments/off_session_payment_service.rb +0 -137
  601. data/lib/stripe/services/v2/test_helper_service.rb +0 -15
  602. data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +0 -49
  603. data/rbi/stripe.rbi +0 -193855
@@ -0,0 +1,1893 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ # typed: true
5
+ module Stripe
6
+ # A payment link is a shareable URL that will take your customers to a hosted payment page. A payment link can be shared and used multiple times.
7
+ #
8
+ # When a customer opens a payment link it will open a new [checkout session](https://stripe.com/docs/api/checkout/sessions) to render the payment page. You can use [checkout session events](https://stripe.com/docs/api/events/types#event_types-checkout.session.completed) to track payments through payment links.
9
+ #
10
+ # Related guide: [Payment Links API](https://stripe.com/docs/payment-links)
11
+ class PaymentLink < APIResource
12
+ class AfterCompletion < Stripe::StripeObject
13
+ class HostedConfirmation < Stripe::StripeObject
14
+ # The custom message that is displayed to the customer after the purchase is complete.
15
+ sig { returns(T.nilable(String)) }
16
+ attr_reader :custom_message
17
+ end
18
+ class Redirect < Stripe::StripeObject
19
+ # The URL the customer will be redirected to after the purchase is complete.
20
+ sig { returns(String) }
21
+ attr_reader :url
22
+ end
23
+ # Attribute for field hosted_confirmation
24
+ sig { returns(HostedConfirmation) }
25
+ attr_reader :hosted_confirmation
26
+ # Attribute for field redirect
27
+ sig { returns(Redirect) }
28
+ attr_reader :redirect
29
+ # The specified behavior after the purchase is complete.
30
+ sig { returns(String) }
31
+ attr_reader :type
32
+ end
33
+ class AutomaticTax < Stripe::StripeObject
34
+ class Liability < Stripe::StripeObject
35
+ # The connected account being referenced when `type` is `account`.
36
+ sig { returns(T.any(String, Stripe::Account)) }
37
+ attr_reader :account
38
+ # Type of the account referenced.
39
+ sig { returns(String) }
40
+ attr_reader :type
41
+ end
42
+ # If `true`, tax will be calculated automatically using the customer's location.
43
+ sig { returns(T::Boolean) }
44
+ attr_reader :enabled
45
+ # 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.
46
+ sig { returns(T.nilable(Liability)) }
47
+ attr_reader :liability
48
+ end
49
+ class ConsentCollection < Stripe::StripeObject
50
+ class PaymentMethodReuseAgreement < Stripe::StripeObject
51
+ # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used.
52
+ #
53
+ # When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.
54
+ sig { returns(String) }
55
+ attr_reader :position
56
+ end
57
+ # Settings related to the payment method reuse text shown in the Checkout UI.
58
+ sig { returns(T.nilable(PaymentMethodReuseAgreement)) }
59
+ attr_reader :payment_method_reuse_agreement
60
+ # If set to `auto`, enables the collection of customer consent for promotional communications.
61
+ sig { returns(T.nilable(String)) }
62
+ attr_reader :promotions
63
+ # If set to `required`, it requires cutomers to accept the terms of service before being able to pay. If set to `none`, customers won't be shown a checkbox to accept the terms of service.
64
+ sig { returns(T.nilable(String)) }
65
+ attr_reader :terms_of_service
66
+ end
67
+ class CustomField < Stripe::StripeObject
68
+ class Dropdown < Stripe::StripeObject
69
+ class Option < Stripe::StripeObject
70
+ # The label for the option, displayed to the customer. Up to 100 characters.
71
+ sig { returns(String) }
72
+ attr_reader :label
73
+ # The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters.
74
+ sig { returns(String) }
75
+ attr_reader :value
76
+ end
77
+ # The value that will pre-fill on the payment page.
78
+ sig { returns(T.nilable(String)) }
79
+ attr_reader :default_value
80
+ # The options available for the customer to select. Up to 200 options allowed.
81
+ sig { returns(T::Array[Option]) }
82
+ attr_reader :options
83
+ end
84
+ class Label < Stripe::StripeObject
85
+ # Custom text for the label, displayed to the customer. Up to 50 characters.
86
+ sig { returns(T.nilable(String)) }
87
+ attr_reader :custom
88
+ # The type of the label.
89
+ sig { returns(String) }
90
+ attr_reader :type
91
+ end
92
+ class Numeric < Stripe::StripeObject
93
+ # The value that will pre-fill the field on the payment page.
94
+ sig { returns(T.nilable(String)) }
95
+ attr_reader :default_value
96
+ # The maximum character length constraint for the customer's input.
97
+ sig { returns(T.nilable(Integer)) }
98
+ attr_reader :maximum_length
99
+ # The minimum character length requirement for the customer's input.
100
+ sig { returns(T.nilable(Integer)) }
101
+ attr_reader :minimum_length
102
+ end
103
+ class Text < Stripe::StripeObject
104
+ # The value that will pre-fill the field on the payment page.
105
+ sig { returns(T.nilable(String)) }
106
+ attr_reader :default_value
107
+ # The maximum character length constraint for the customer's input.
108
+ sig { returns(T.nilable(Integer)) }
109
+ attr_reader :maximum_length
110
+ # The minimum character length requirement for the customer's input.
111
+ sig { returns(T.nilable(Integer)) }
112
+ attr_reader :minimum_length
113
+ end
114
+ # Attribute for field dropdown
115
+ sig { returns(Dropdown) }
116
+ attr_reader :dropdown
117
+ # String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters.
118
+ sig { returns(String) }
119
+ attr_reader :key
120
+ # Attribute for field label
121
+ sig { returns(Label) }
122
+ attr_reader :label
123
+ # Attribute for field numeric
124
+ sig { returns(Numeric) }
125
+ attr_reader :numeric
126
+ # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.
127
+ sig { returns(T::Boolean) }
128
+ attr_reader :optional
129
+ # Attribute for field text
130
+ sig { returns(Text) }
131
+ attr_reader :text
132
+ # The type of the field.
133
+ sig { returns(String) }
134
+ attr_reader :type
135
+ end
136
+ class CustomText < Stripe::StripeObject
137
+ class AfterSubmit < Stripe::StripeObject
138
+ # Text may be up to 1200 characters in length.
139
+ sig { returns(String) }
140
+ attr_reader :message
141
+ end
142
+ class ShippingAddress < Stripe::StripeObject
143
+ # Text may be up to 1200 characters in length.
144
+ sig { returns(String) }
145
+ attr_reader :message
146
+ end
147
+ class Submit < Stripe::StripeObject
148
+ # Text may be up to 1200 characters in length.
149
+ sig { returns(String) }
150
+ attr_reader :message
151
+ end
152
+ class TermsOfServiceAcceptance < Stripe::StripeObject
153
+ # Text may be up to 1200 characters in length.
154
+ sig { returns(String) }
155
+ attr_reader :message
156
+ end
157
+ # Custom text that should be displayed after the payment confirmation button.
158
+ sig { returns(T.nilable(AfterSubmit)) }
159
+ attr_reader :after_submit
160
+ # Custom text that should be displayed alongside shipping address collection.
161
+ sig { returns(T.nilable(ShippingAddress)) }
162
+ attr_reader :shipping_address
163
+ # Custom text that should be displayed alongside the payment confirmation button.
164
+ sig { returns(T.nilable(Submit)) }
165
+ attr_reader :submit
166
+ # Custom text that should be displayed in place of the default terms of service agreement text.
167
+ sig { returns(T.nilable(TermsOfServiceAcceptance)) }
168
+ attr_reader :terms_of_service_acceptance
169
+ end
170
+ class InvoiceCreation < Stripe::StripeObject
171
+ class InvoiceData < Stripe::StripeObject
172
+ class CustomField < Stripe::StripeObject
173
+ # The name of the custom field.
174
+ sig { returns(String) }
175
+ attr_reader :name
176
+ # The value of the custom field.
177
+ sig { returns(String) }
178
+ attr_reader :value
179
+ end
180
+ class Issuer < Stripe::StripeObject
181
+ # The connected account being referenced when `type` is `account`.
182
+ sig { returns(T.any(String, Stripe::Account)) }
183
+ attr_reader :account
184
+ # Type of the account referenced.
185
+ sig { returns(String) }
186
+ attr_reader :type
187
+ end
188
+ class RenderingOptions < Stripe::StripeObject
189
+ # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
190
+ sig { returns(T.nilable(String)) }
191
+ attr_reader :amount_tax_display
192
+ # ID of the invoice rendering template to be used for the generated invoice.
193
+ sig { returns(T.nilable(String)) }
194
+ attr_reader :template
195
+ end
196
+ # The account tax IDs associated with the invoice.
197
+ sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) }
198
+ attr_reader :account_tax_ids
199
+ # A list of up to 4 custom fields to be displayed on the invoice.
200
+ sig { returns(T.nilable(T::Array[CustomField])) }
201
+ attr_reader :custom_fields
202
+ # An arbitrary string attached to the object. Often useful for displaying to users.
203
+ sig { returns(T.nilable(String)) }
204
+ attr_reader :description
205
+ # Footer to be displayed on the invoice.
206
+ sig { returns(T.nilable(String)) }
207
+ attr_reader :footer
208
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
209
+ sig { returns(T.nilable(Issuer)) }
210
+ attr_reader :issuer
211
+ # 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.
212
+ sig { returns(T.nilable(T::Hash[String, String])) }
213
+ attr_reader :metadata
214
+ # Options for invoice PDF rendering.
215
+ sig { returns(T.nilable(RenderingOptions)) }
216
+ attr_reader :rendering_options
217
+ end
218
+ # Enable creating an invoice on successful payment.
219
+ sig { returns(T::Boolean) }
220
+ attr_reader :enabled
221
+ # Configuration for the invoice. Default invoice values will be used if unspecified.
222
+ sig { returns(T.nilable(InvoiceData)) }
223
+ attr_reader :invoice_data
224
+ end
225
+ class OptionalItem < Stripe::StripeObject
226
+ class AdjustableQuantity < Stripe::StripeObject
227
+ # Set to true if the quantity can be adjusted to any non-negative integer.
228
+ sig { returns(T::Boolean) }
229
+ attr_reader :enabled
230
+ # The maximum quantity of this item the customer can purchase. By default this value is 99.
231
+ sig { returns(T.nilable(Integer)) }
232
+ attr_reader :maximum
233
+ # The minimum quantity of this item the customer must purchase, if they choose to purchase it. Because this item is optional, the customer will always be able to remove it from their order, even if the `minimum` configured here is greater than 0. By default this value is 0.
234
+ sig { returns(T.nilable(Integer)) }
235
+ attr_reader :minimum
236
+ end
237
+ # Attribute for field adjustable_quantity
238
+ sig { returns(T.nilable(AdjustableQuantity)) }
239
+ attr_reader :adjustable_quantity
240
+ # Attribute for field price
241
+ sig { returns(String) }
242
+ attr_reader :price
243
+ # Attribute for field quantity
244
+ sig { returns(Integer) }
245
+ attr_reader :quantity
246
+ end
247
+ class PaymentIntentData < Stripe::StripeObject
248
+ # Indicates when the funds will be captured from the customer's account.
249
+ sig { returns(T.nilable(String)) }
250
+ attr_reader :capture_method
251
+ # An arbitrary string attached to the object. Often useful for displaying to users.
252
+ sig { returns(T.nilable(String)) }
253
+ attr_reader :description
254
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link.
255
+ sig { returns(T::Hash[String, String]) }
256
+ attr_reader :metadata
257
+ # Indicates that you intend to make future payments with the payment method collected during checkout.
258
+ sig { returns(T.nilable(String)) }
259
+ attr_reader :setup_future_usage
260
+ # For a non-card payment, information about the charge that appears on the customer's statement when this payment succeeds in creating a charge.
261
+ sig { returns(T.nilable(String)) }
262
+ attr_reader :statement_descriptor
263
+ # For a card payment, information about the charge that appears on the customer's statement when this payment succeeds in creating a charge. Concatenated with the account's statement descriptor prefix to form the complete statement descriptor.
264
+ sig { returns(T.nilable(String)) }
265
+ attr_reader :statement_descriptor_suffix
266
+ # A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details.
267
+ sig { returns(T.nilable(String)) }
268
+ attr_reader :transfer_group
269
+ end
270
+ class PhoneNumberCollection < Stripe::StripeObject
271
+ # If `true`, a phone number will be collected during checkout.
272
+ sig { returns(T::Boolean) }
273
+ attr_reader :enabled
274
+ end
275
+ class Restrictions < Stripe::StripeObject
276
+ class CompletedSessions < Stripe::StripeObject
277
+ # The current number of checkout sessions that have been completed on the payment link which count towards the `completed_sessions` restriction to be met.
278
+ sig { returns(Integer) }
279
+ attr_reader :count
280
+ # The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met.
281
+ sig { returns(Integer) }
282
+ attr_reader :limit
283
+ end
284
+ # Attribute for field completed_sessions
285
+ sig { returns(CompletedSessions) }
286
+ attr_reader :completed_sessions
287
+ end
288
+ class ShippingAddressCollection < Stripe::StripeObject
289
+ # An array of two-letter ISO country codes representing which countries Checkout should provide as options for shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`.
290
+ sig { returns(T::Array[String]) }
291
+ attr_reader :allowed_countries
292
+ end
293
+ class ShippingOption < Stripe::StripeObject
294
+ # A non-negative integer in cents representing how much to charge.
295
+ sig { returns(Integer) }
296
+ attr_reader :shipping_amount
297
+ # The ID of the Shipping Rate to use for this shipping option.
298
+ sig { returns(T.any(String, Stripe::ShippingRate)) }
299
+ attr_reader :shipping_rate
300
+ end
301
+ class SubscriptionData < Stripe::StripeObject
302
+ class InvoiceSettings < Stripe::StripeObject
303
+ class Issuer < Stripe::StripeObject
304
+ # The connected account being referenced when `type` is `account`.
305
+ sig { returns(T.any(String, Stripe::Account)) }
306
+ attr_reader :account
307
+ # Type of the account referenced.
308
+ sig { returns(String) }
309
+ attr_reader :type
310
+ end
311
+ # Attribute for field issuer
312
+ sig { returns(Issuer) }
313
+ attr_reader :issuer
314
+ end
315
+ class TrialSettings < Stripe::StripeObject
316
+ class EndBehavior < Stripe::StripeObject
317
+ # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
318
+ sig { returns(String) }
319
+ attr_reader :missing_payment_method
320
+ end
321
+ # Defines how a subscription behaves when a free trial ends.
322
+ sig { returns(EndBehavior) }
323
+ attr_reader :end_behavior
324
+ end
325
+ # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
326
+ sig { returns(T.nilable(String)) }
327
+ attr_reader :description
328
+ # Attribute for field invoice_settings
329
+ sig { returns(InvoiceSettings) }
330
+ attr_reader :invoice_settings
331
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link.
332
+ sig { returns(T::Hash[String, String]) }
333
+ attr_reader :metadata
334
+ # Integer representing the number of trial period days before the customer is charged for the first time.
335
+ sig { returns(T.nilable(Integer)) }
336
+ attr_reader :trial_period_days
337
+ # Settings related to subscription trials.
338
+ sig { returns(T.nilable(TrialSettings)) }
339
+ attr_reader :trial_settings
340
+ end
341
+ class TaxIdCollection < Stripe::StripeObject
342
+ # Indicates whether tax ID collection is enabled for the session.
343
+ sig { returns(T::Boolean) }
344
+ attr_reader :enabled
345
+ # Attribute for field required
346
+ sig { returns(String) }
347
+ attr_reader :required
348
+ end
349
+ class TransferData < Stripe::StripeObject
350
+ # The amount in cents (or local equivalent) that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
351
+ sig { returns(T.nilable(Integer)) }
352
+ attr_reader :amount
353
+ # The connected account receiving the transfer.
354
+ sig { returns(T.any(String, Stripe::Account)) }
355
+ attr_reader :destination
356
+ end
357
+ # Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated.
358
+ sig { returns(T::Boolean) }
359
+ attr_reader :active
360
+ # Attribute for field after_completion
361
+ sig { returns(AfterCompletion) }
362
+ attr_reader :after_completion
363
+ # Whether user redeemable promotion codes are enabled.
364
+ sig { returns(T::Boolean) }
365
+ attr_reader :allow_promotion_codes
366
+ # The ID of the Connect application that created the Payment Link.
367
+ sig { returns(T.nilable(T.any(String, Stripe::Application))) }
368
+ attr_reader :application
369
+ # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account.
370
+ sig { returns(T.nilable(Integer)) }
371
+ attr_reader :application_fee_amount
372
+ # This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account.
373
+ sig { returns(T.nilable(Float)) }
374
+ attr_reader :application_fee_percent
375
+ # Attribute for field automatic_tax
376
+ sig { returns(AutomaticTax) }
377
+ attr_reader :automatic_tax
378
+ # Configuration for collecting the customer's billing address. Defaults to `auto`.
379
+ sig { returns(String) }
380
+ attr_reader :billing_address_collection
381
+ # When set, provides configuration to gather active consent from customers.
382
+ sig { returns(T.nilable(ConsentCollection)) }
383
+ attr_reader :consent_collection
384
+ # 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).
385
+ sig { returns(String) }
386
+ attr_reader :currency
387
+ # Collect additional information from your customer using custom fields. Up to 3 fields are supported.
388
+ sig { returns(T::Array[CustomField]) }
389
+ attr_reader :custom_fields
390
+ # Attribute for field custom_text
391
+ sig { returns(CustomText) }
392
+ attr_reader :custom_text
393
+ # Configuration for Customer creation during checkout.
394
+ sig { returns(String) }
395
+ attr_reader :customer_creation
396
+ # Unique identifier for the object.
397
+ sig { returns(String) }
398
+ attr_reader :id
399
+ # The custom message to be displayed to a customer when a payment link is no longer active.
400
+ sig { returns(T.nilable(String)) }
401
+ attr_reader :inactive_message
402
+ # Configuration for creating invoice for payment mode payment links.
403
+ sig { returns(T.nilable(InvoiceCreation)) }
404
+ attr_reader :invoice_creation
405
+ # The line items representing what is being sold.
406
+ sig { returns(Stripe::ListObject) }
407
+ attr_reader :line_items
408
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
409
+ sig { returns(T::Boolean) }
410
+ attr_reader :livemode
411
+ # 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.
412
+ sig { returns(T::Hash[String, String]) }
413
+ attr_reader :metadata
414
+ # String representing the object's type. Objects of the same type share the same value.
415
+ sig { returns(String) }
416
+ attr_reader :object
417
+ # The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details.
418
+ sig { returns(T.nilable(T.any(String, Stripe::Account))) }
419
+ attr_reader :on_behalf_of
420
+ # The optional items presented to the customer at checkout.
421
+ sig { returns(T.nilable(T::Array[OptionalItem])) }
422
+ attr_reader :optional_items
423
+ # Indicates the parameters to be passed to PaymentIntent creation during checkout.
424
+ sig { returns(T.nilable(PaymentIntentData)) }
425
+ attr_reader :payment_intent_data
426
+ # Configuration for collecting a payment method during checkout. Defaults to `always`.
427
+ sig { returns(String) }
428
+ attr_reader :payment_method_collection
429
+ # The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
430
+ sig { returns(T.nilable(T::Array[String])) }
431
+ attr_reader :payment_method_types
432
+ # Attribute for field phone_number_collection
433
+ sig { returns(PhoneNumberCollection) }
434
+ attr_reader :phone_number_collection
435
+ # Settings that restrict the usage of a payment link.
436
+ sig { returns(T.nilable(Restrictions)) }
437
+ attr_reader :restrictions
438
+ # Configuration for collecting the customer's shipping address.
439
+ sig { returns(T.nilable(ShippingAddressCollection)) }
440
+ attr_reader :shipping_address_collection
441
+ # The shipping rate options applied to the session.
442
+ sig { returns(T::Array[ShippingOption]) }
443
+ attr_reader :shipping_options
444
+ # Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button.
445
+ sig { returns(String) }
446
+ attr_reader :submit_type
447
+ # When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`.
448
+ sig { returns(T.nilable(SubscriptionData)) }
449
+ attr_reader :subscription_data
450
+ # Attribute for field tax_id_collection
451
+ sig { returns(TaxIdCollection) }
452
+ attr_reader :tax_id_collection
453
+ # The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.
454
+ sig { returns(T.nilable(TransferData)) }
455
+ attr_reader :transfer_data
456
+ # The public URL that can be shared with customers.
457
+ sig { returns(String) }
458
+ attr_reader :url
459
+ class ListParams < Stripe::RequestParams
460
+ # Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links).
461
+ sig { returns(T.nilable(T::Boolean)) }
462
+ attr_accessor :active
463
+ # 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.
464
+ sig { returns(T.nilable(String)) }
465
+ attr_accessor :ending_before
466
+ # Specifies which fields in the response should be expanded.
467
+ sig { returns(T.nilable(T::Array[String])) }
468
+ attr_accessor :expand
469
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
470
+ sig { returns(T.nilable(Integer)) }
471
+ attr_accessor :limit
472
+ # 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.
473
+ sig { returns(T.nilable(String)) }
474
+ attr_accessor :starting_after
475
+ sig {
476
+ params(active: T.nilable(T::Boolean), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
477
+ }
478
+ def initialize(
479
+ active: nil,
480
+ ending_before: nil,
481
+ expand: nil,
482
+ limit: nil,
483
+ starting_after: nil
484
+ ); end
485
+ end
486
+ class CreateParams < Stripe::RequestParams
487
+ class AfterCompletion < Stripe::RequestParams
488
+ class HostedConfirmation < Stripe::RequestParams
489
+ # A custom message to display to the customer after the purchase is complete.
490
+ sig { returns(T.nilable(String)) }
491
+ attr_accessor :custom_message
492
+ sig { params(custom_message: T.nilable(String)).void }
493
+ def initialize(custom_message: nil); end
494
+ end
495
+ class Redirect < Stripe::RequestParams
496
+ # The URL the customer will be redirected to after the purchase is complete. You can embed `{CHECKOUT_SESSION_ID}` into the URL to have the `id` of the completed [checkout session](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id) included.
497
+ sig { returns(String) }
498
+ attr_accessor :url
499
+ sig { params(url: String).void }
500
+ def initialize(url: nil); end
501
+ end
502
+ # Configuration when `type=hosted_confirmation`.
503
+ sig {
504
+ returns(T.nilable(::Stripe::PaymentLink::CreateParams::AfterCompletion::HostedConfirmation))
505
+ }
506
+ attr_accessor :hosted_confirmation
507
+ # Configuration when `type=redirect`.
508
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::AfterCompletion::Redirect)) }
509
+ attr_accessor :redirect
510
+ # The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`.
511
+ sig { returns(String) }
512
+ attr_accessor :type
513
+ sig {
514
+ params(hosted_confirmation: T.nilable(::Stripe::PaymentLink::CreateParams::AfterCompletion::HostedConfirmation), redirect: T.nilable(::Stripe::PaymentLink::CreateParams::AfterCompletion::Redirect), type: String).void
515
+ }
516
+ def initialize(hosted_confirmation: nil, redirect: nil, type: nil); end
517
+ end
518
+ class AutomaticTax < Stripe::RequestParams
519
+ class Liability < Stripe::RequestParams
520
+ # The connected account being referenced when `type` is `account`.
521
+ sig { returns(T.nilable(String)) }
522
+ attr_accessor :account
523
+ # Type of the account referenced in the request.
524
+ sig { returns(String) }
525
+ attr_accessor :type
526
+ sig { params(account: T.nilable(String), type: String).void }
527
+ def initialize(account: nil, type: nil); end
528
+ end
529
+ # Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location.
530
+ #
531
+ # Enabling this parameter causes the payment link to collect any billing address information necessary for tax calculation.
532
+ sig { returns(T::Boolean) }
533
+ attr_accessor :enabled
534
+ # 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.
535
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::AutomaticTax::Liability)) }
536
+ attr_accessor :liability
537
+ sig {
538
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::PaymentLink::CreateParams::AutomaticTax::Liability)).void
539
+ }
540
+ def initialize(enabled: nil, liability: nil); end
541
+ end
542
+ class ConsentCollection < Stripe::RequestParams
543
+ class PaymentMethodReuseAgreement < Stripe::RequestParams
544
+ # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's
545
+ # defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.
546
+ sig { returns(String) }
547
+ attr_accessor :position
548
+ sig { params(position: String).void }
549
+ def initialize(position: nil); end
550
+ end
551
+ # Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method.
552
+ sig {
553
+ returns(T.nilable(::Stripe::PaymentLink::CreateParams::ConsentCollection::PaymentMethodReuseAgreement))
554
+ }
555
+ attr_accessor :payment_method_reuse_agreement
556
+ # If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout
557
+ # Session will determine whether to display an option to opt into promotional communication
558
+ # from the merchant depending on the customer's locale. Only available to US merchants.
559
+ sig { returns(T.nilable(String)) }
560
+ attr_accessor :promotions
561
+ # If set to `required`, it requires customers to check a terms of service checkbox before being able to pay.
562
+ # There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public).
563
+ sig { returns(T.nilable(String)) }
564
+ attr_accessor :terms_of_service
565
+ sig {
566
+ params(payment_method_reuse_agreement: T.nilable(::Stripe::PaymentLink::CreateParams::ConsentCollection::PaymentMethodReuseAgreement), promotions: T.nilable(String), terms_of_service: T.nilable(String)).void
567
+ }
568
+ def initialize(
569
+ payment_method_reuse_agreement: nil,
570
+ promotions: nil,
571
+ terms_of_service: nil
572
+ ); end
573
+ end
574
+ class CustomField < Stripe::RequestParams
575
+ class Dropdown < Stripe::RequestParams
576
+ class Option < Stripe::RequestParams
577
+ # The label for the option, displayed to the customer. Up to 100 characters.
578
+ sig { returns(String) }
579
+ attr_accessor :label
580
+ # The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters.
581
+ sig { returns(String) }
582
+ attr_accessor :value
583
+ sig { params(label: String, value: String).void }
584
+ def initialize(label: nil, value: nil); end
585
+ end
586
+ # The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array.
587
+ sig { returns(T.nilable(String)) }
588
+ attr_accessor :default_value
589
+ # The options available for the customer to select. Up to 200 options allowed.
590
+ sig {
591
+ returns(T::Array[::Stripe::PaymentLink::CreateParams::CustomField::Dropdown::Option])
592
+ }
593
+ attr_accessor :options
594
+ sig {
595
+ params(default_value: T.nilable(String), options: T::Array[::Stripe::PaymentLink::CreateParams::CustomField::Dropdown::Option]).void
596
+ }
597
+ def initialize(default_value: nil, options: nil); end
598
+ end
599
+ class Label < Stripe::RequestParams
600
+ # Custom text for the label, displayed to the customer. Up to 50 characters.
601
+ sig { returns(String) }
602
+ attr_accessor :custom
603
+ # The type of the label.
604
+ sig { returns(String) }
605
+ attr_accessor :type
606
+ sig { params(custom: String, type: String).void }
607
+ def initialize(custom: nil, type: nil); end
608
+ end
609
+ class Numeric < Stripe::RequestParams
610
+ # The value that will pre-fill the field on the payment page.
611
+ sig { returns(T.nilable(String)) }
612
+ attr_accessor :default_value
613
+ # The maximum character length constraint for the customer's input.
614
+ sig { returns(T.nilable(Integer)) }
615
+ attr_accessor :maximum_length
616
+ # The minimum character length requirement for the customer's input.
617
+ sig { returns(T.nilable(Integer)) }
618
+ attr_accessor :minimum_length
619
+ sig {
620
+ params(default_value: T.nilable(String), maximum_length: T.nilable(Integer), minimum_length: T.nilable(Integer)).void
621
+ }
622
+ def initialize(default_value: nil, maximum_length: nil, minimum_length: nil); end
623
+ end
624
+ class Text < Stripe::RequestParams
625
+ # The value that will pre-fill the field on the payment page.
626
+ sig { returns(T.nilable(String)) }
627
+ attr_accessor :default_value
628
+ # The maximum character length constraint for the customer's input.
629
+ sig { returns(T.nilable(Integer)) }
630
+ attr_accessor :maximum_length
631
+ # The minimum character length requirement for the customer's input.
632
+ sig { returns(T.nilable(Integer)) }
633
+ attr_accessor :minimum_length
634
+ sig {
635
+ params(default_value: T.nilable(String), maximum_length: T.nilable(Integer), minimum_length: T.nilable(Integer)).void
636
+ }
637
+ def initialize(default_value: nil, maximum_length: nil, minimum_length: nil); end
638
+ end
639
+ # Configuration for `type=dropdown` fields.
640
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::CustomField::Dropdown)) }
641
+ attr_accessor :dropdown
642
+ # String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters.
643
+ sig { returns(String) }
644
+ attr_accessor :key
645
+ # The label for the field, displayed to the customer.
646
+ sig { returns(::Stripe::PaymentLink::CreateParams::CustomField::Label) }
647
+ attr_accessor :label
648
+ # Configuration for `type=numeric` fields.
649
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::CustomField::Numeric)) }
650
+ attr_accessor :numeric
651
+ # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.
652
+ sig { returns(T.nilable(T::Boolean)) }
653
+ attr_accessor :optional
654
+ # Configuration for `type=text` fields.
655
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::CustomField::Text)) }
656
+ attr_accessor :text
657
+ # The type of the field.
658
+ sig { returns(String) }
659
+ attr_accessor :type
660
+ sig {
661
+ params(dropdown: T.nilable(::Stripe::PaymentLink::CreateParams::CustomField::Dropdown), key: String, label: ::Stripe::PaymentLink::CreateParams::CustomField::Label, numeric: T.nilable(::Stripe::PaymentLink::CreateParams::CustomField::Numeric), optional: T.nilable(T::Boolean), text: T.nilable(::Stripe::PaymentLink::CreateParams::CustomField::Text), type: String).void
662
+ }
663
+ def initialize(
664
+ dropdown: nil,
665
+ key: nil,
666
+ label: nil,
667
+ numeric: nil,
668
+ optional: nil,
669
+ text: nil,
670
+ type: nil
671
+ ); end
672
+ end
673
+ class CustomText < Stripe::RequestParams
674
+ class AfterSubmit < Stripe::RequestParams
675
+ # Text may be up to 1200 characters in length.
676
+ sig { returns(String) }
677
+ attr_accessor :message
678
+ sig { params(message: String).void }
679
+ def initialize(message: nil); end
680
+ end
681
+ class ShippingAddress < Stripe::RequestParams
682
+ # Text may be up to 1200 characters in length.
683
+ sig { returns(String) }
684
+ attr_accessor :message
685
+ sig { params(message: String).void }
686
+ def initialize(message: nil); end
687
+ end
688
+ class Submit < Stripe::RequestParams
689
+ # Text may be up to 1200 characters in length.
690
+ sig { returns(String) }
691
+ attr_accessor :message
692
+ sig { params(message: String).void }
693
+ def initialize(message: nil); end
694
+ end
695
+ class TermsOfServiceAcceptance < Stripe::RequestParams
696
+ # Text may be up to 1200 characters in length.
697
+ sig { returns(String) }
698
+ attr_accessor :message
699
+ sig { params(message: String).void }
700
+ def initialize(message: nil); end
701
+ end
702
+ # Custom text that should be displayed after the payment confirmation button.
703
+ sig {
704
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::CreateParams::CustomText::AfterSubmit))))
705
+ }
706
+ attr_accessor :after_submit
707
+ # Custom text that should be displayed alongside shipping address collection.
708
+ sig {
709
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::CreateParams::CustomText::ShippingAddress))))
710
+ }
711
+ attr_accessor :shipping_address
712
+ # Custom text that should be displayed alongside the payment confirmation button.
713
+ sig {
714
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::CreateParams::CustomText::Submit))))
715
+ }
716
+ attr_accessor :submit
717
+ # Custom text that should be displayed in place of the default terms of service agreement text.
718
+ sig {
719
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::CreateParams::CustomText::TermsOfServiceAcceptance))))
720
+ }
721
+ attr_accessor :terms_of_service_acceptance
722
+ sig {
723
+ params(after_submit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::CreateParams::CustomText::AfterSubmit))), shipping_address: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::CreateParams::CustomText::ShippingAddress))), submit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::CreateParams::CustomText::Submit))), terms_of_service_acceptance: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::CreateParams::CustomText::TermsOfServiceAcceptance)))).void
724
+ }
725
+ def initialize(
726
+ after_submit: nil,
727
+ shipping_address: nil,
728
+ submit: nil,
729
+ terms_of_service_acceptance: nil
730
+ ); end
731
+ end
732
+ class InvoiceCreation < Stripe::RequestParams
733
+ class InvoiceData < Stripe::RequestParams
734
+ class CustomField < Stripe::RequestParams
735
+ # The name of the custom field. This may be up to 40 characters.
736
+ sig { returns(String) }
737
+ attr_accessor :name
738
+ # The value of the custom field. This may be up to 140 characters.
739
+ sig { returns(String) }
740
+ attr_accessor :value
741
+ sig { params(name: String, value: String).void }
742
+ def initialize(name: nil, value: nil); end
743
+ end
744
+ class Issuer < Stripe::RequestParams
745
+ # The connected account being referenced when `type` is `account`.
746
+ sig { returns(T.nilable(String)) }
747
+ attr_accessor :account
748
+ # Type of the account referenced in the request.
749
+ sig { returns(String) }
750
+ attr_accessor :type
751
+ sig { params(account: T.nilable(String), type: String).void }
752
+ def initialize(account: nil, type: nil); end
753
+ end
754
+ class RenderingOptions < Stripe::RequestParams
755
+ # 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.
756
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
757
+ attr_accessor :amount_tax_display
758
+ # ID of the invoice rendering template to use for this invoice.
759
+ sig { returns(T.nilable(String)) }
760
+ attr_accessor :template
761
+ sig {
762
+ params(amount_tax_display: T.nilable(T.nilable(T.any(String, String))), template: T.nilable(String)).void
763
+ }
764
+ def initialize(amount_tax_display: nil, template: nil); end
765
+ end
766
+ # The account tax IDs associated with the invoice.
767
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
768
+ attr_accessor :account_tax_ids
769
+ # Default custom fields to be displayed on invoices for this customer.
770
+ sig {
771
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::PaymentLink::CreateParams::InvoiceCreation::InvoiceData::CustomField]))))
772
+ }
773
+ attr_accessor :custom_fields
774
+ # An arbitrary string attached to the object. Often useful for displaying to users.
775
+ sig { returns(T.nilable(String)) }
776
+ attr_accessor :description
777
+ # Default footer to be displayed on invoices for this customer.
778
+ sig { returns(T.nilable(String)) }
779
+ attr_accessor :footer
780
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
781
+ sig {
782
+ returns(T.nilable(::Stripe::PaymentLink::CreateParams::InvoiceCreation::InvoiceData::Issuer))
783
+ }
784
+ attr_accessor :issuer
785
+ # 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`.
786
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
787
+ attr_accessor :metadata
788
+ # Default options for invoice PDF rendering for this customer.
789
+ sig {
790
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::CreateParams::InvoiceCreation::InvoiceData::RenderingOptions))))
791
+ }
792
+ attr_accessor :rendering_options
793
+ sig {
794
+ params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), custom_fields: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::PaymentLink::CreateParams::InvoiceCreation::InvoiceData::CustomField]))), description: T.nilable(String), footer: T.nilable(String), issuer: T.nilable(::Stripe::PaymentLink::CreateParams::InvoiceCreation::InvoiceData::Issuer), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), rendering_options: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::CreateParams::InvoiceCreation::InvoiceData::RenderingOptions)))).void
795
+ }
796
+ def initialize(
797
+ account_tax_ids: nil,
798
+ custom_fields: nil,
799
+ description: nil,
800
+ footer: nil,
801
+ issuer: nil,
802
+ metadata: nil,
803
+ rendering_options: nil
804
+ ); end
805
+ end
806
+ # Whether the feature is enabled
807
+ sig { returns(T::Boolean) }
808
+ attr_accessor :enabled
809
+ # Invoice PDF configuration.
810
+ sig {
811
+ returns(T.nilable(::Stripe::PaymentLink::CreateParams::InvoiceCreation::InvoiceData))
812
+ }
813
+ attr_accessor :invoice_data
814
+ sig {
815
+ params(enabled: T::Boolean, invoice_data: T.nilable(::Stripe::PaymentLink::CreateParams::InvoiceCreation::InvoiceData)).void
816
+ }
817
+ def initialize(enabled: nil, invoice_data: nil); end
818
+ end
819
+ class LineItem < Stripe::RequestParams
820
+ class AdjustableQuantity < Stripe::RequestParams
821
+ # Set to true if the quantity can be adjusted to any non-negative Integer.
822
+ sig { returns(T::Boolean) }
823
+ attr_accessor :enabled
824
+ # The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999999.
825
+ sig { returns(T.nilable(Integer)) }
826
+ attr_accessor :maximum
827
+ # The minimum quantity the customer can purchase. By default this value is 0. If there is only one item in the cart then that item's quantity cannot go down to 0.
828
+ sig { returns(T.nilable(Integer)) }
829
+ attr_accessor :minimum
830
+ sig {
831
+ params(enabled: T::Boolean, maximum: T.nilable(Integer), minimum: T.nilable(Integer)).void
832
+ }
833
+ def initialize(enabled: nil, maximum: nil, minimum: nil); end
834
+ end
835
+ class PriceData < Stripe::RequestParams
836
+ class ProductData < Stripe::RequestParams
837
+ # 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.
838
+ sig { returns(T.nilable(String)) }
839
+ attr_accessor :description
840
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
841
+ sig { returns(T.nilable(T::Array[String])) }
842
+ attr_accessor :images
843
+ # 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`.
844
+ sig { returns(T.nilable(T::Hash[String, String])) }
845
+ attr_accessor :metadata
846
+ # The product's name, meant to be displayable to the customer.
847
+ sig { returns(String) }
848
+ attr_accessor :name
849
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
850
+ sig { returns(T.nilable(String)) }
851
+ attr_accessor :tax_code
852
+ sig {
853
+ 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
854
+ }
855
+ def initialize(
856
+ description: nil,
857
+ images: nil,
858
+ metadata: nil,
859
+ name: nil,
860
+ tax_code: nil
861
+ ); end
862
+ end
863
+ class Recurring < Stripe::RequestParams
864
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
865
+ sig { returns(String) }
866
+ attr_accessor :interval
867
+ # 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).
868
+ sig { returns(T.nilable(Integer)) }
869
+ attr_accessor :interval_count
870
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
871
+ def initialize(interval: nil, interval_count: nil); end
872
+ end
873
+ # 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).
874
+ sig { returns(String) }
875
+ attr_accessor :currency
876
+ # 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.
877
+ sig { returns(T.nilable(String)) }
878
+ attr_accessor :product
879
+ # Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
880
+ sig {
881
+ returns(T.nilable(::Stripe::PaymentLink::CreateParams::LineItem::PriceData::ProductData))
882
+ }
883
+ attr_accessor :product_data
884
+ # The recurring components of a price such as `interval` and `interval_count`.
885
+ sig {
886
+ returns(T.nilable(::Stripe::PaymentLink::CreateParams::LineItem::PriceData::Recurring))
887
+ }
888
+ attr_accessor :recurring
889
+ # 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.
890
+ sig { returns(T.nilable(String)) }
891
+ attr_accessor :tax_behavior
892
+ # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
893
+ sig { returns(T.nilable(Integer)) }
894
+ attr_accessor :unit_amount
895
+ # 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.
896
+ sig { returns(T.nilable(String)) }
897
+ attr_accessor :unit_amount_decimal
898
+ sig {
899
+ params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::PaymentLink::CreateParams::LineItem::PriceData::ProductData), recurring: T.nilable(::Stripe::PaymentLink::CreateParams::LineItem::PriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
900
+ }
901
+ def initialize(
902
+ currency: nil,
903
+ product: nil,
904
+ product_data: nil,
905
+ recurring: nil,
906
+ tax_behavior: nil,
907
+ unit_amount: nil,
908
+ unit_amount_decimal: nil
909
+ ); end
910
+ end
911
+ # When set, provides configuration for this item’s quantity to be adjusted by the customer during checkout.
912
+ sig {
913
+ returns(T.nilable(::Stripe::PaymentLink::CreateParams::LineItem::AdjustableQuantity))
914
+ }
915
+ attr_accessor :adjustable_quantity
916
+ # The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object.
917
+ sig { returns(T.nilable(String)) }
918
+ attr_accessor :price
919
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
920
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::LineItem::PriceData)) }
921
+ attr_accessor :price_data
922
+ # The quantity of the line item being purchased.
923
+ sig { returns(Integer) }
924
+ attr_accessor :quantity
925
+ sig {
926
+ params(adjustable_quantity: T.nilable(::Stripe::PaymentLink::CreateParams::LineItem::AdjustableQuantity), price: T.nilable(String), price_data: T.nilable(::Stripe::PaymentLink::CreateParams::LineItem::PriceData), quantity: Integer).void
927
+ }
928
+ def initialize(adjustable_quantity: nil, price: nil, price_data: nil, quantity: nil); end
929
+ end
930
+ class OptionalItem < Stripe::RequestParams
931
+ class AdjustableQuantity < Stripe::RequestParams
932
+ # Set to true if the quantity can be adjusted to any non-negative integer.
933
+ sig { returns(T::Boolean) }
934
+ attr_accessor :enabled
935
+ # The maximum quantity of this item the customer can purchase. By default this value is 99.
936
+ sig { returns(T.nilable(Integer)) }
937
+ attr_accessor :maximum
938
+ # The minimum quantity of this item the customer must purchase, if they choose to purchase it. Because this item is optional, the customer will always be able to remove it from their order, even if the `minimum` configured here is greater than 0. By default this value is 0.
939
+ sig { returns(T.nilable(Integer)) }
940
+ attr_accessor :minimum
941
+ sig {
942
+ params(enabled: T::Boolean, maximum: T.nilable(Integer), minimum: T.nilable(Integer)).void
943
+ }
944
+ def initialize(enabled: nil, maximum: nil, minimum: nil); end
945
+ end
946
+ # When set, provides configuration for the customer to adjust the quantity of the line item created when a customer chooses to add this optional item to their order.
947
+ sig {
948
+ returns(T.nilable(::Stripe::PaymentLink::CreateParams::OptionalItem::AdjustableQuantity))
949
+ }
950
+ attr_accessor :adjustable_quantity
951
+ # The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object.
952
+ sig { returns(String) }
953
+ attr_accessor :price
954
+ # The initial quantity of the line item created when a customer chooses to add this optional item to their order.
955
+ sig { returns(Integer) }
956
+ attr_accessor :quantity
957
+ sig {
958
+ params(adjustable_quantity: T.nilable(::Stripe::PaymentLink::CreateParams::OptionalItem::AdjustableQuantity), price: String, quantity: Integer).void
959
+ }
960
+ def initialize(adjustable_quantity: nil, price: nil, quantity: nil); end
961
+ end
962
+ class PaymentIntentData < Stripe::RequestParams
963
+ # Controls when the funds will be captured from the customer's account.
964
+ sig { returns(T.nilable(String)) }
965
+ attr_accessor :capture_method
966
+ # An arbitrary string attached to the object. Often useful for displaying to users.
967
+ sig { returns(T.nilable(String)) }
968
+ attr_accessor :description
969
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
970
+ sig { returns(T.nilable(T::Hash[String, String])) }
971
+ attr_accessor :metadata
972
+ # Indicates that you intend to [make future payments](https://stripe.com/docs/payments/payment-intents#future-usage) with the payment method collected by this Checkout Session.
973
+ #
974
+ # When setting this to `on_session`, Checkout will show a notice to the customer that their payment details will be saved.
975
+ #
976
+ # When setting this to `off_session`, Checkout will show a notice to the customer that their payment details will be saved and used for future payments.
977
+ #
978
+ # If a Customer has been provided or Checkout creates a new Customer,Checkout will attach the payment method to the Customer.
979
+ #
980
+ # If Checkout does not create a Customer, the payment method is not attached to a Customer. To reuse the payment method, you can retrieve it from the Checkout Session's PaymentIntent.
981
+ #
982
+ # When processing card payments, Checkout also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA.
983
+ sig { returns(T.nilable(String)) }
984
+ attr_accessor :setup_future_usage
985
+ # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors).
986
+ #
987
+ # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead.
988
+ sig { returns(T.nilable(String)) }
989
+ attr_accessor :statement_descriptor
990
+ # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement.
991
+ sig { returns(T.nilable(String)) }
992
+ attr_accessor :statement_descriptor_suffix
993
+ # A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details.
994
+ sig { returns(T.nilable(String)) }
995
+ attr_accessor :transfer_group
996
+ sig {
997
+ params(capture_method: T.nilable(String), description: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), setup_future_usage: T.nilable(String), statement_descriptor: T.nilable(String), statement_descriptor_suffix: T.nilable(String), transfer_group: T.nilable(String)).void
998
+ }
999
+ def initialize(
1000
+ capture_method: nil,
1001
+ description: nil,
1002
+ metadata: nil,
1003
+ setup_future_usage: nil,
1004
+ statement_descriptor: nil,
1005
+ statement_descriptor_suffix: nil,
1006
+ transfer_group: nil
1007
+ ); end
1008
+ end
1009
+ class PhoneNumberCollection < Stripe::RequestParams
1010
+ # Set to `true` to enable phone number collection.
1011
+ sig { returns(T::Boolean) }
1012
+ attr_accessor :enabled
1013
+ sig { params(enabled: T::Boolean).void }
1014
+ def initialize(enabled: nil); end
1015
+ end
1016
+ class Restrictions < Stripe::RequestParams
1017
+ class CompletedSessions < Stripe::RequestParams
1018
+ # The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met.
1019
+ sig { returns(Integer) }
1020
+ attr_accessor :limit
1021
+ sig { params(limit: Integer).void }
1022
+ def initialize(limit: nil); end
1023
+ end
1024
+ # Configuration for the `completed_sessions` restriction type.
1025
+ sig { returns(::Stripe::PaymentLink::CreateParams::Restrictions::CompletedSessions) }
1026
+ attr_accessor :completed_sessions
1027
+ sig {
1028
+ params(completed_sessions: ::Stripe::PaymentLink::CreateParams::Restrictions::CompletedSessions).void
1029
+ }
1030
+ def initialize(completed_sessions: nil); end
1031
+ end
1032
+ class ShippingAddressCollection < Stripe::RequestParams
1033
+ # An array of two-letter ISO country codes representing which countries Checkout should provide as options for
1034
+ # shipping locations.
1035
+ sig { returns(T::Array[String]) }
1036
+ attr_accessor :allowed_countries
1037
+ sig { params(allowed_countries: T::Array[String]).void }
1038
+ def initialize(allowed_countries: nil); end
1039
+ end
1040
+ class ShippingOption < Stripe::RequestParams
1041
+ # The ID of the Shipping Rate to use for this shipping option.
1042
+ sig { returns(T.nilable(String)) }
1043
+ attr_accessor :shipping_rate
1044
+ sig { params(shipping_rate: T.nilable(String)).void }
1045
+ def initialize(shipping_rate: nil); end
1046
+ end
1047
+ class SubscriptionData < Stripe::RequestParams
1048
+ class InvoiceSettings < Stripe::RequestParams
1049
+ class Issuer < Stripe::RequestParams
1050
+ # The connected account being referenced when `type` is `account`.
1051
+ sig { returns(T.nilable(String)) }
1052
+ attr_accessor :account
1053
+ # Type of the account referenced in the request.
1054
+ sig { returns(String) }
1055
+ attr_accessor :type
1056
+ sig { params(account: T.nilable(String), type: String).void }
1057
+ def initialize(account: nil, type: nil); end
1058
+ end
1059
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
1060
+ sig {
1061
+ returns(T.nilable(::Stripe::PaymentLink::CreateParams::SubscriptionData::InvoiceSettings::Issuer))
1062
+ }
1063
+ attr_accessor :issuer
1064
+ sig {
1065
+ params(issuer: T.nilable(::Stripe::PaymentLink::CreateParams::SubscriptionData::InvoiceSettings::Issuer)).void
1066
+ }
1067
+ def initialize(issuer: nil); end
1068
+ end
1069
+ class TrialSettings < Stripe::RequestParams
1070
+ class EndBehavior < Stripe::RequestParams
1071
+ # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
1072
+ sig { returns(String) }
1073
+ attr_accessor :missing_payment_method
1074
+ sig { params(missing_payment_method: String).void }
1075
+ def initialize(missing_payment_method: nil); end
1076
+ end
1077
+ # Defines how the subscription should behave when the user's free trial ends.
1078
+ sig {
1079
+ returns(::Stripe::PaymentLink::CreateParams::SubscriptionData::TrialSettings::EndBehavior)
1080
+ }
1081
+ attr_accessor :end_behavior
1082
+ sig {
1083
+ params(end_behavior: ::Stripe::PaymentLink::CreateParams::SubscriptionData::TrialSettings::EndBehavior).void
1084
+ }
1085
+ def initialize(end_behavior: nil); end
1086
+ end
1087
+ # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
1088
+ sig { returns(T.nilable(String)) }
1089
+ attr_accessor :description
1090
+ # All invoices will be billed using the specified settings.
1091
+ sig {
1092
+ returns(T.nilable(::Stripe::PaymentLink::CreateParams::SubscriptionData::InvoiceSettings))
1093
+ }
1094
+ attr_accessor :invoice_settings
1095
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
1096
+ sig { returns(T.nilable(T::Hash[String, String])) }
1097
+ attr_accessor :metadata
1098
+ # Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1.
1099
+ sig { returns(T.nilable(Integer)) }
1100
+ attr_accessor :trial_period_days
1101
+ # Settings related to subscription trials.
1102
+ sig {
1103
+ returns(T.nilable(::Stripe::PaymentLink::CreateParams::SubscriptionData::TrialSettings))
1104
+ }
1105
+ attr_accessor :trial_settings
1106
+ sig {
1107
+ params(description: T.nilable(String), invoice_settings: T.nilable(::Stripe::PaymentLink::CreateParams::SubscriptionData::InvoiceSettings), metadata: T.nilable(T::Hash[String, String]), trial_period_days: T.nilable(Integer), trial_settings: T.nilable(::Stripe::PaymentLink::CreateParams::SubscriptionData::TrialSettings)).void
1108
+ }
1109
+ def initialize(
1110
+ description: nil,
1111
+ invoice_settings: nil,
1112
+ metadata: nil,
1113
+ trial_period_days: nil,
1114
+ trial_settings: nil
1115
+ ); end
1116
+ end
1117
+ class TaxIdCollection < Stripe::RequestParams
1118
+ # Enable tax ID collection during checkout. Defaults to `false`.
1119
+ sig { returns(T::Boolean) }
1120
+ attr_accessor :enabled
1121
+ # Describes whether a tax ID is required during checkout. Defaults to `never`.
1122
+ sig { returns(T.nilable(String)) }
1123
+ attr_accessor :required
1124
+ sig { params(enabled: T::Boolean, required: T.nilable(String)).void }
1125
+ def initialize(enabled: nil, required: nil); end
1126
+ end
1127
+ class TransferData < Stripe::RequestParams
1128
+ # The amount that will be transferred automatically when a charge succeeds.
1129
+ sig { returns(T.nilable(Integer)) }
1130
+ attr_accessor :amount
1131
+ # If specified, successful charges will be attributed to the destination
1132
+ # account for tax reporting, and the funds from charges will be transferred
1133
+ # to the destination account. The ID of the resulting transfer will be
1134
+ # returned on the successful charge's `transfer` field.
1135
+ sig { returns(String) }
1136
+ attr_accessor :destination
1137
+ sig { params(amount: T.nilable(Integer), destination: String).void }
1138
+ def initialize(amount: nil, destination: nil); end
1139
+ end
1140
+ # Behavior after the purchase is complete.
1141
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::AfterCompletion)) }
1142
+ attr_accessor :after_completion
1143
+ # Enables user redeemable promotion codes.
1144
+ sig { returns(T.nilable(T::Boolean)) }
1145
+ attr_accessor :allow_promotion_codes
1146
+ # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Can only be applied when there are no line items with recurring prices.
1147
+ sig { returns(T.nilable(Integer)) }
1148
+ attr_accessor :application_fee_amount
1149
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field.
1150
+ sig { returns(T.nilable(Float)) }
1151
+ attr_accessor :application_fee_percent
1152
+ # Configuration for automatic tax collection.
1153
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::AutomaticTax)) }
1154
+ attr_accessor :automatic_tax
1155
+ # Configuration for collecting the customer's billing address. Defaults to `auto`.
1156
+ sig { returns(T.nilable(String)) }
1157
+ attr_accessor :billing_address_collection
1158
+ # Configure fields to gather active consent from customers.
1159
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::ConsentCollection)) }
1160
+ attr_accessor :consent_collection
1161
+ # 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) and supported by each line item's price.
1162
+ sig { returns(T.nilable(String)) }
1163
+ attr_accessor :currency
1164
+ # Collect additional information from your customer using custom fields. Up to 3 fields are supported.
1165
+ sig { returns(T.nilable(T::Array[::Stripe::PaymentLink::CreateParams::CustomField])) }
1166
+ attr_accessor :custom_fields
1167
+ # Display additional text for your customers using custom text.
1168
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::CustomText)) }
1169
+ attr_accessor :custom_text
1170
+ # Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers).
1171
+ sig { returns(T.nilable(String)) }
1172
+ attr_accessor :customer_creation
1173
+ # Specifies which fields in the response should be expanded.
1174
+ sig { returns(T.nilable(T::Array[String])) }
1175
+ attr_accessor :expand
1176
+ # The custom message to be displayed to a customer when a payment link is no longer active.
1177
+ sig { returns(T.nilable(String)) }
1178
+ attr_accessor :inactive_message
1179
+ # Generate a post-purchase Invoice for one-time payments.
1180
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::InvoiceCreation)) }
1181
+ attr_accessor :invoice_creation
1182
+ # The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.
1183
+ sig { returns(T::Array[::Stripe::PaymentLink::CreateParams::LineItem]) }
1184
+ attr_accessor :line_items
1185
+ # 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`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link.
1186
+ sig { returns(T.nilable(T::Hash[String, String])) }
1187
+ attr_accessor :metadata
1188
+ # The account on behalf of which to charge.
1189
+ sig { returns(T.nilable(String)) }
1190
+ attr_accessor :on_behalf_of
1191
+ # A list of optional items the customer can add to their order at checkout. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices).
1192
+ # There is a maximum of 10 optional items allowed on a payment link, and the existing limits on the number of line items allowed on a payment link apply to the combined number of line items and optional items.
1193
+ # There is a maximum of 20 combined line items and optional items.
1194
+ sig { returns(T.nilable(T::Array[::Stripe::PaymentLink::CreateParams::OptionalItem])) }
1195
+ attr_accessor :optional_items
1196
+ # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
1197
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::PaymentIntentData)) }
1198
+ attr_accessor :payment_intent_data
1199
+ # Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount.
1200
+ #
1201
+ # Can only be set in `subscription` mode. Defaults to `always`.
1202
+ #
1203
+ # If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials).
1204
+ sig { returns(T.nilable(String)) }
1205
+ attr_accessor :payment_method_collection
1206
+ # The list of payment method types that customers can use. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)).
1207
+ sig { returns(T.nilable(T::Array[String])) }
1208
+ attr_accessor :payment_method_types
1209
+ # Controls phone number collection settings during checkout.
1210
+ #
1211
+ # We recommend that you review your privacy policy and check with your legal contacts.
1212
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::PhoneNumberCollection)) }
1213
+ attr_accessor :phone_number_collection
1214
+ # Settings that restrict the usage of a payment link.
1215
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::Restrictions)) }
1216
+ attr_accessor :restrictions
1217
+ # Configuration for collecting the customer's shipping address.
1218
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::ShippingAddressCollection)) }
1219
+ attr_accessor :shipping_address_collection
1220
+ # The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link.
1221
+ sig { returns(T.nilable(T::Array[::Stripe::PaymentLink::CreateParams::ShippingOption])) }
1222
+ attr_accessor :shipping_options
1223
+ # Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`).
1224
+ sig { returns(T.nilable(String)) }
1225
+ attr_accessor :submit_type
1226
+ # When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`.
1227
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::SubscriptionData)) }
1228
+ attr_accessor :subscription_data
1229
+ # Controls tax ID collection during checkout.
1230
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::TaxIdCollection)) }
1231
+ attr_accessor :tax_id_collection
1232
+ # The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.
1233
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::TransferData)) }
1234
+ attr_accessor :transfer_data
1235
+ sig {
1236
+ params(after_completion: T.nilable(::Stripe::PaymentLink::CreateParams::AfterCompletion), allow_promotion_codes: T.nilable(T::Boolean), application_fee_amount: T.nilable(Integer), application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::PaymentLink::CreateParams::AutomaticTax), billing_address_collection: T.nilable(String), consent_collection: T.nilable(::Stripe::PaymentLink::CreateParams::ConsentCollection), currency: T.nilable(String), custom_fields: T.nilable(T::Array[::Stripe::PaymentLink::CreateParams::CustomField]), custom_text: T.nilable(::Stripe::PaymentLink::CreateParams::CustomText), customer_creation: T.nilable(String), expand: T.nilable(T::Array[String]), inactive_message: T.nilable(String), invoice_creation: T.nilable(::Stripe::PaymentLink::CreateParams::InvoiceCreation), line_items: T::Array[::Stripe::PaymentLink::CreateParams::LineItem], metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), optional_items: T.nilable(T::Array[::Stripe::PaymentLink::CreateParams::OptionalItem]), payment_intent_data: T.nilable(::Stripe::PaymentLink::CreateParams::PaymentIntentData), payment_method_collection: T.nilable(String), payment_method_types: T.nilable(T::Array[String]), phone_number_collection: T.nilable(::Stripe::PaymentLink::CreateParams::PhoneNumberCollection), restrictions: T.nilable(::Stripe::PaymentLink::CreateParams::Restrictions), shipping_address_collection: T.nilable(::Stripe::PaymentLink::CreateParams::ShippingAddressCollection), shipping_options: T.nilable(T::Array[::Stripe::PaymentLink::CreateParams::ShippingOption]), submit_type: T.nilable(String), subscription_data: T.nilable(::Stripe::PaymentLink::CreateParams::SubscriptionData), tax_id_collection: T.nilable(::Stripe::PaymentLink::CreateParams::TaxIdCollection), transfer_data: T.nilable(::Stripe::PaymentLink::CreateParams::TransferData)).void
1237
+ }
1238
+ def initialize(
1239
+ after_completion: nil,
1240
+ allow_promotion_codes: nil,
1241
+ application_fee_amount: nil,
1242
+ application_fee_percent: nil,
1243
+ automatic_tax: nil,
1244
+ billing_address_collection: nil,
1245
+ consent_collection: nil,
1246
+ currency: nil,
1247
+ custom_fields: nil,
1248
+ custom_text: nil,
1249
+ customer_creation: nil,
1250
+ expand: nil,
1251
+ inactive_message: nil,
1252
+ invoice_creation: nil,
1253
+ line_items: nil,
1254
+ metadata: nil,
1255
+ on_behalf_of: nil,
1256
+ optional_items: nil,
1257
+ payment_intent_data: nil,
1258
+ payment_method_collection: nil,
1259
+ payment_method_types: nil,
1260
+ phone_number_collection: nil,
1261
+ restrictions: nil,
1262
+ shipping_address_collection: nil,
1263
+ shipping_options: nil,
1264
+ submit_type: nil,
1265
+ subscription_data: nil,
1266
+ tax_id_collection: nil,
1267
+ transfer_data: nil
1268
+ ); end
1269
+ end
1270
+ class UpdateParams < Stripe::RequestParams
1271
+ class AfterCompletion < Stripe::RequestParams
1272
+ class HostedConfirmation < Stripe::RequestParams
1273
+ # A custom message to display to the customer after the purchase is complete.
1274
+ sig { returns(T.nilable(String)) }
1275
+ attr_accessor :custom_message
1276
+ sig { params(custom_message: T.nilable(String)).void }
1277
+ def initialize(custom_message: nil); end
1278
+ end
1279
+ class Redirect < Stripe::RequestParams
1280
+ # The URL the customer will be redirected to after the purchase is complete. You can embed `{CHECKOUT_SESSION_ID}` into the URL to have the `id` of the completed [checkout session](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id) included.
1281
+ sig { returns(String) }
1282
+ attr_accessor :url
1283
+ sig { params(url: String).void }
1284
+ def initialize(url: nil); end
1285
+ end
1286
+ # Configuration when `type=hosted_confirmation`.
1287
+ sig {
1288
+ returns(T.nilable(::Stripe::PaymentLink::UpdateParams::AfterCompletion::HostedConfirmation))
1289
+ }
1290
+ attr_accessor :hosted_confirmation
1291
+ # Configuration when `type=redirect`.
1292
+ sig { returns(T.nilable(::Stripe::PaymentLink::UpdateParams::AfterCompletion::Redirect)) }
1293
+ attr_accessor :redirect
1294
+ # The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`.
1295
+ sig { returns(String) }
1296
+ attr_accessor :type
1297
+ sig {
1298
+ params(hosted_confirmation: T.nilable(::Stripe::PaymentLink::UpdateParams::AfterCompletion::HostedConfirmation), redirect: T.nilable(::Stripe::PaymentLink::UpdateParams::AfterCompletion::Redirect), type: String).void
1299
+ }
1300
+ def initialize(hosted_confirmation: nil, redirect: nil, type: nil); end
1301
+ end
1302
+ class AutomaticTax < Stripe::RequestParams
1303
+ class Liability < Stripe::RequestParams
1304
+ # The connected account being referenced when `type` is `account`.
1305
+ sig { returns(T.nilable(String)) }
1306
+ attr_accessor :account
1307
+ # Type of the account referenced in the request.
1308
+ sig { returns(String) }
1309
+ attr_accessor :type
1310
+ sig { params(account: T.nilable(String), type: String).void }
1311
+ def initialize(account: nil, type: nil); end
1312
+ end
1313
+ # Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location.
1314
+ #
1315
+ # Enabling this parameter causes the payment link to collect any billing address information necessary for tax calculation.
1316
+ sig { returns(T::Boolean) }
1317
+ attr_accessor :enabled
1318
+ # 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.
1319
+ sig { returns(T.nilable(::Stripe::PaymentLink::UpdateParams::AutomaticTax::Liability)) }
1320
+ attr_accessor :liability
1321
+ sig {
1322
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::PaymentLink::UpdateParams::AutomaticTax::Liability)).void
1323
+ }
1324
+ def initialize(enabled: nil, liability: nil); end
1325
+ end
1326
+ class CustomField < Stripe::RequestParams
1327
+ class Dropdown < Stripe::RequestParams
1328
+ class Option < Stripe::RequestParams
1329
+ # The label for the option, displayed to the customer. Up to 100 characters.
1330
+ sig { returns(String) }
1331
+ attr_accessor :label
1332
+ # The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters.
1333
+ sig { returns(String) }
1334
+ attr_accessor :value
1335
+ sig { params(label: String, value: String).void }
1336
+ def initialize(label: nil, value: nil); end
1337
+ end
1338
+ # The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array.
1339
+ sig { returns(T.nilable(String)) }
1340
+ attr_accessor :default_value
1341
+ # The options available for the customer to select. Up to 200 options allowed.
1342
+ sig {
1343
+ returns(T::Array[::Stripe::PaymentLink::UpdateParams::CustomField::Dropdown::Option])
1344
+ }
1345
+ attr_accessor :options
1346
+ sig {
1347
+ params(default_value: T.nilable(String), options: T::Array[::Stripe::PaymentLink::UpdateParams::CustomField::Dropdown::Option]).void
1348
+ }
1349
+ def initialize(default_value: nil, options: nil); end
1350
+ end
1351
+ class Label < Stripe::RequestParams
1352
+ # Custom text for the label, displayed to the customer. Up to 50 characters.
1353
+ sig { returns(String) }
1354
+ attr_accessor :custom
1355
+ # The type of the label.
1356
+ sig { returns(String) }
1357
+ attr_accessor :type
1358
+ sig { params(custom: String, type: String).void }
1359
+ def initialize(custom: nil, type: nil); end
1360
+ end
1361
+ class Numeric < Stripe::RequestParams
1362
+ # The value that will pre-fill the field on the payment page.
1363
+ sig { returns(T.nilable(String)) }
1364
+ attr_accessor :default_value
1365
+ # The maximum character length constraint for the customer's input.
1366
+ sig { returns(T.nilable(Integer)) }
1367
+ attr_accessor :maximum_length
1368
+ # The minimum character length requirement for the customer's input.
1369
+ sig { returns(T.nilable(Integer)) }
1370
+ attr_accessor :minimum_length
1371
+ sig {
1372
+ params(default_value: T.nilable(String), maximum_length: T.nilable(Integer), minimum_length: T.nilable(Integer)).void
1373
+ }
1374
+ def initialize(default_value: nil, maximum_length: nil, minimum_length: nil); end
1375
+ end
1376
+ class Text < Stripe::RequestParams
1377
+ # The value that will pre-fill the field on the payment page.
1378
+ sig { returns(T.nilable(String)) }
1379
+ attr_accessor :default_value
1380
+ # The maximum character length constraint for the customer's input.
1381
+ sig { returns(T.nilable(Integer)) }
1382
+ attr_accessor :maximum_length
1383
+ # The minimum character length requirement for the customer's input.
1384
+ sig { returns(T.nilable(Integer)) }
1385
+ attr_accessor :minimum_length
1386
+ sig {
1387
+ params(default_value: T.nilable(String), maximum_length: T.nilable(Integer), minimum_length: T.nilable(Integer)).void
1388
+ }
1389
+ def initialize(default_value: nil, maximum_length: nil, minimum_length: nil); end
1390
+ end
1391
+ # Configuration for `type=dropdown` fields.
1392
+ sig { returns(T.nilable(::Stripe::PaymentLink::UpdateParams::CustomField::Dropdown)) }
1393
+ attr_accessor :dropdown
1394
+ # String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters.
1395
+ sig { returns(String) }
1396
+ attr_accessor :key
1397
+ # The label for the field, displayed to the customer.
1398
+ sig { returns(::Stripe::PaymentLink::UpdateParams::CustomField::Label) }
1399
+ attr_accessor :label
1400
+ # Configuration for `type=numeric` fields.
1401
+ sig { returns(T.nilable(::Stripe::PaymentLink::UpdateParams::CustomField::Numeric)) }
1402
+ attr_accessor :numeric
1403
+ # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.
1404
+ sig { returns(T.nilable(T::Boolean)) }
1405
+ attr_accessor :optional
1406
+ # Configuration for `type=text` fields.
1407
+ sig { returns(T.nilable(::Stripe::PaymentLink::UpdateParams::CustomField::Text)) }
1408
+ attr_accessor :text
1409
+ # The type of the field.
1410
+ sig { returns(String) }
1411
+ attr_accessor :type
1412
+ sig {
1413
+ params(dropdown: T.nilable(::Stripe::PaymentLink::UpdateParams::CustomField::Dropdown), key: String, label: ::Stripe::PaymentLink::UpdateParams::CustomField::Label, numeric: T.nilable(::Stripe::PaymentLink::UpdateParams::CustomField::Numeric), optional: T.nilable(T::Boolean), text: T.nilable(::Stripe::PaymentLink::UpdateParams::CustomField::Text), type: String).void
1414
+ }
1415
+ def initialize(
1416
+ dropdown: nil,
1417
+ key: nil,
1418
+ label: nil,
1419
+ numeric: nil,
1420
+ optional: nil,
1421
+ text: nil,
1422
+ type: nil
1423
+ ); end
1424
+ end
1425
+ class CustomText < Stripe::RequestParams
1426
+ class AfterSubmit < Stripe::RequestParams
1427
+ # Text may be up to 1200 characters in length.
1428
+ sig { returns(String) }
1429
+ attr_accessor :message
1430
+ sig { params(message: String).void }
1431
+ def initialize(message: nil); end
1432
+ end
1433
+ class ShippingAddress < Stripe::RequestParams
1434
+ # Text may be up to 1200 characters in length.
1435
+ sig { returns(String) }
1436
+ attr_accessor :message
1437
+ sig { params(message: String).void }
1438
+ def initialize(message: nil); end
1439
+ end
1440
+ class Submit < Stripe::RequestParams
1441
+ # Text may be up to 1200 characters in length.
1442
+ sig { returns(String) }
1443
+ attr_accessor :message
1444
+ sig { params(message: String).void }
1445
+ def initialize(message: nil); end
1446
+ end
1447
+ class TermsOfServiceAcceptance < Stripe::RequestParams
1448
+ # Text may be up to 1200 characters in length.
1449
+ sig { returns(String) }
1450
+ attr_accessor :message
1451
+ sig { params(message: String).void }
1452
+ def initialize(message: nil); end
1453
+ end
1454
+ # Custom text that should be displayed after the payment confirmation button.
1455
+ sig {
1456
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::UpdateParams::CustomText::AfterSubmit))))
1457
+ }
1458
+ attr_accessor :after_submit
1459
+ # Custom text that should be displayed alongside shipping address collection.
1460
+ sig {
1461
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::UpdateParams::CustomText::ShippingAddress))))
1462
+ }
1463
+ attr_accessor :shipping_address
1464
+ # Custom text that should be displayed alongside the payment confirmation button.
1465
+ sig {
1466
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::UpdateParams::CustomText::Submit))))
1467
+ }
1468
+ attr_accessor :submit
1469
+ # Custom text that should be displayed in place of the default terms of service agreement text.
1470
+ sig {
1471
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::UpdateParams::CustomText::TermsOfServiceAcceptance))))
1472
+ }
1473
+ attr_accessor :terms_of_service_acceptance
1474
+ sig {
1475
+ params(after_submit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::UpdateParams::CustomText::AfterSubmit))), shipping_address: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::UpdateParams::CustomText::ShippingAddress))), submit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::UpdateParams::CustomText::Submit))), terms_of_service_acceptance: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::UpdateParams::CustomText::TermsOfServiceAcceptance)))).void
1476
+ }
1477
+ def initialize(
1478
+ after_submit: nil,
1479
+ shipping_address: nil,
1480
+ submit: nil,
1481
+ terms_of_service_acceptance: nil
1482
+ ); end
1483
+ end
1484
+ class InvoiceCreation < Stripe::RequestParams
1485
+ class InvoiceData < Stripe::RequestParams
1486
+ class CustomField < Stripe::RequestParams
1487
+ # The name of the custom field. This may be up to 40 characters.
1488
+ sig { returns(String) }
1489
+ attr_accessor :name
1490
+ # The value of the custom field. This may be up to 140 characters.
1491
+ sig { returns(String) }
1492
+ attr_accessor :value
1493
+ sig { params(name: String, value: String).void }
1494
+ def initialize(name: nil, value: nil); end
1495
+ end
1496
+ class Issuer < Stripe::RequestParams
1497
+ # The connected account being referenced when `type` is `account`.
1498
+ sig { returns(T.nilable(String)) }
1499
+ attr_accessor :account
1500
+ # Type of the account referenced in the request.
1501
+ sig { returns(String) }
1502
+ attr_accessor :type
1503
+ sig { params(account: T.nilable(String), type: String).void }
1504
+ def initialize(account: nil, type: nil); end
1505
+ end
1506
+ class RenderingOptions < Stripe::RequestParams
1507
+ # 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.
1508
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
1509
+ attr_accessor :amount_tax_display
1510
+ # ID of the invoice rendering template to use for this invoice.
1511
+ sig { returns(T.nilable(String)) }
1512
+ attr_accessor :template
1513
+ sig {
1514
+ params(amount_tax_display: T.nilable(T.nilable(T.any(String, String))), template: T.nilable(String)).void
1515
+ }
1516
+ def initialize(amount_tax_display: nil, template: nil); end
1517
+ end
1518
+ # The account tax IDs associated with the invoice.
1519
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
1520
+ attr_accessor :account_tax_ids
1521
+ # Default custom fields to be displayed on invoices for this customer.
1522
+ sig {
1523
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::PaymentLink::UpdateParams::InvoiceCreation::InvoiceData::CustomField]))))
1524
+ }
1525
+ attr_accessor :custom_fields
1526
+ # An arbitrary string attached to the object. Often useful for displaying to users.
1527
+ sig { returns(T.nilable(String)) }
1528
+ attr_accessor :description
1529
+ # Default footer to be displayed on invoices for this customer.
1530
+ sig { returns(T.nilable(String)) }
1531
+ attr_accessor :footer
1532
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
1533
+ sig {
1534
+ returns(T.nilable(::Stripe::PaymentLink::UpdateParams::InvoiceCreation::InvoiceData::Issuer))
1535
+ }
1536
+ attr_accessor :issuer
1537
+ # 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`.
1538
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
1539
+ attr_accessor :metadata
1540
+ # Default options for invoice PDF rendering for this customer.
1541
+ sig {
1542
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::UpdateParams::InvoiceCreation::InvoiceData::RenderingOptions))))
1543
+ }
1544
+ attr_accessor :rendering_options
1545
+ sig {
1546
+ params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), custom_fields: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::PaymentLink::UpdateParams::InvoiceCreation::InvoiceData::CustomField]))), description: T.nilable(String), footer: T.nilable(String), issuer: T.nilable(::Stripe::PaymentLink::UpdateParams::InvoiceCreation::InvoiceData::Issuer), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), rendering_options: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::UpdateParams::InvoiceCreation::InvoiceData::RenderingOptions)))).void
1547
+ }
1548
+ def initialize(
1549
+ account_tax_ids: nil,
1550
+ custom_fields: nil,
1551
+ description: nil,
1552
+ footer: nil,
1553
+ issuer: nil,
1554
+ metadata: nil,
1555
+ rendering_options: nil
1556
+ ); end
1557
+ end
1558
+ # Whether the feature is enabled
1559
+ sig { returns(T::Boolean) }
1560
+ attr_accessor :enabled
1561
+ # Invoice PDF configuration.
1562
+ sig {
1563
+ returns(T.nilable(::Stripe::PaymentLink::UpdateParams::InvoiceCreation::InvoiceData))
1564
+ }
1565
+ attr_accessor :invoice_data
1566
+ sig {
1567
+ params(enabled: T::Boolean, invoice_data: T.nilable(::Stripe::PaymentLink::UpdateParams::InvoiceCreation::InvoiceData)).void
1568
+ }
1569
+ def initialize(enabled: nil, invoice_data: nil); end
1570
+ end
1571
+ class LineItem < Stripe::RequestParams
1572
+ class AdjustableQuantity < Stripe::RequestParams
1573
+ # Set to true if the quantity can be adjusted to any non-negative Integer.
1574
+ sig { returns(T::Boolean) }
1575
+ attr_accessor :enabled
1576
+ # The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999999.
1577
+ sig { returns(T.nilable(Integer)) }
1578
+ attr_accessor :maximum
1579
+ # The minimum quantity the customer can purchase. By default this value is 0. If there is only one item in the cart then that item's quantity cannot go down to 0.
1580
+ sig { returns(T.nilable(Integer)) }
1581
+ attr_accessor :minimum
1582
+ sig {
1583
+ params(enabled: T::Boolean, maximum: T.nilable(Integer), minimum: T.nilable(Integer)).void
1584
+ }
1585
+ def initialize(enabled: nil, maximum: nil, minimum: nil); end
1586
+ end
1587
+ # When set, provides configuration for this item’s quantity to be adjusted by the customer during checkout.
1588
+ sig {
1589
+ returns(T.nilable(::Stripe::PaymentLink::UpdateParams::LineItem::AdjustableQuantity))
1590
+ }
1591
+ attr_accessor :adjustable_quantity
1592
+ # The ID of an existing line item on the payment link.
1593
+ sig { returns(String) }
1594
+ attr_accessor :id
1595
+ # The quantity of the line item being purchased.
1596
+ sig { returns(T.nilable(Integer)) }
1597
+ attr_accessor :quantity
1598
+ sig {
1599
+ params(adjustable_quantity: T.nilable(::Stripe::PaymentLink::UpdateParams::LineItem::AdjustableQuantity), id: String, quantity: T.nilable(Integer)).void
1600
+ }
1601
+ def initialize(adjustable_quantity: nil, id: nil, quantity: nil); end
1602
+ end
1603
+ class PaymentIntentData < Stripe::RequestParams
1604
+ # An arbitrary string attached to the object. Often useful for displaying to users.
1605
+ sig { returns(T.nilable(T.nilable(String))) }
1606
+ attr_accessor :description
1607
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
1608
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
1609
+ attr_accessor :metadata
1610
+ # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors).
1611
+ #
1612
+ # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead.
1613
+ sig { returns(T.nilable(T.nilable(String))) }
1614
+ attr_accessor :statement_descriptor
1615
+ # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement.
1616
+ sig { returns(T.nilable(T.nilable(String))) }
1617
+ attr_accessor :statement_descriptor_suffix
1618
+ # A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details.
1619
+ sig { returns(T.nilable(T.nilable(String))) }
1620
+ attr_accessor :transfer_group
1621
+ sig {
1622
+ params(description: T.nilable(T.nilable(String)), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), statement_descriptor: T.nilable(T.nilable(String)), statement_descriptor_suffix: T.nilable(T.nilable(String)), transfer_group: T.nilable(T.nilable(String))).void
1623
+ }
1624
+ def initialize(
1625
+ description: nil,
1626
+ metadata: nil,
1627
+ statement_descriptor: nil,
1628
+ statement_descriptor_suffix: nil,
1629
+ transfer_group: nil
1630
+ ); end
1631
+ end
1632
+ class PhoneNumberCollection < Stripe::RequestParams
1633
+ # Set to `true` to enable phone number collection.
1634
+ sig { returns(T::Boolean) }
1635
+ attr_accessor :enabled
1636
+ sig { params(enabled: T::Boolean).void }
1637
+ def initialize(enabled: nil); end
1638
+ end
1639
+ class Restrictions < Stripe::RequestParams
1640
+ class CompletedSessions < Stripe::RequestParams
1641
+ # The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met.
1642
+ sig { returns(Integer) }
1643
+ attr_accessor :limit
1644
+ sig { params(limit: Integer).void }
1645
+ def initialize(limit: nil); end
1646
+ end
1647
+ # Configuration for the `completed_sessions` restriction type.
1648
+ sig { returns(::Stripe::PaymentLink::UpdateParams::Restrictions::CompletedSessions) }
1649
+ attr_accessor :completed_sessions
1650
+ sig {
1651
+ params(completed_sessions: ::Stripe::PaymentLink::UpdateParams::Restrictions::CompletedSessions).void
1652
+ }
1653
+ def initialize(completed_sessions: nil); end
1654
+ end
1655
+ class ShippingAddressCollection < Stripe::RequestParams
1656
+ # An array of two-letter ISO country codes representing which countries Checkout should provide as options for
1657
+ # shipping locations.
1658
+ sig { returns(T::Array[String]) }
1659
+ attr_accessor :allowed_countries
1660
+ sig { params(allowed_countries: T::Array[String]).void }
1661
+ def initialize(allowed_countries: nil); end
1662
+ end
1663
+ class SubscriptionData < Stripe::RequestParams
1664
+ class InvoiceSettings < Stripe::RequestParams
1665
+ class Issuer < Stripe::RequestParams
1666
+ # The connected account being referenced when `type` is `account`.
1667
+ sig { returns(T.nilable(String)) }
1668
+ attr_accessor :account
1669
+ # Type of the account referenced in the request.
1670
+ sig { returns(String) }
1671
+ attr_accessor :type
1672
+ sig { params(account: T.nilable(String), type: String).void }
1673
+ def initialize(account: nil, type: nil); end
1674
+ end
1675
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
1676
+ sig {
1677
+ returns(T.nilable(::Stripe::PaymentLink::UpdateParams::SubscriptionData::InvoiceSettings::Issuer))
1678
+ }
1679
+ attr_accessor :issuer
1680
+ sig {
1681
+ params(issuer: T.nilable(::Stripe::PaymentLink::UpdateParams::SubscriptionData::InvoiceSettings::Issuer)).void
1682
+ }
1683
+ def initialize(issuer: nil); end
1684
+ end
1685
+ class TrialSettings < Stripe::RequestParams
1686
+ class EndBehavior < Stripe::RequestParams
1687
+ # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
1688
+ sig { returns(String) }
1689
+ attr_accessor :missing_payment_method
1690
+ sig { params(missing_payment_method: String).void }
1691
+ def initialize(missing_payment_method: nil); end
1692
+ end
1693
+ # Defines how the subscription should behave when the user's free trial ends.
1694
+ sig {
1695
+ returns(::Stripe::PaymentLink::UpdateParams::SubscriptionData::TrialSettings::EndBehavior)
1696
+ }
1697
+ attr_accessor :end_behavior
1698
+ sig {
1699
+ params(end_behavior: ::Stripe::PaymentLink::UpdateParams::SubscriptionData::TrialSettings::EndBehavior).void
1700
+ }
1701
+ def initialize(end_behavior: nil); end
1702
+ end
1703
+ # All invoices will be billed using the specified settings.
1704
+ sig {
1705
+ returns(T.nilable(::Stripe::PaymentLink::UpdateParams::SubscriptionData::InvoiceSettings))
1706
+ }
1707
+ attr_accessor :invoice_settings
1708
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
1709
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
1710
+ attr_accessor :metadata
1711
+ # Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1.
1712
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
1713
+ attr_accessor :trial_period_days
1714
+ # Settings related to subscription trials.
1715
+ sig {
1716
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::UpdateParams::SubscriptionData::TrialSettings))))
1717
+ }
1718
+ attr_accessor :trial_settings
1719
+ sig {
1720
+ params(invoice_settings: T.nilable(::Stripe::PaymentLink::UpdateParams::SubscriptionData::InvoiceSettings), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), trial_period_days: T.nilable(T.nilable(T.any(String, Integer))), trial_settings: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::UpdateParams::SubscriptionData::TrialSettings)))).void
1721
+ }
1722
+ def initialize(
1723
+ invoice_settings: nil,
1724
+ metadata: nil,
1725
+ trial_period_days: nil,
1726
+ trial_settings: nil
1727
+ ); end
1728
+ end
1729
+ class TaxIdCollection < Stripe::RequestParams
1730
+ # Enable tax ID collection during checkout. Defaults to `false`.
1731
+ sig { returns(T::Boolean) }
1732
+ attr_accessor :enabled
1733
+ # Describes whether a tax ID is required during checkout. Defaults to `never`.
1734
+ sig { returns(T.nilable(String)) }
1735
+ attr_accessor :required
1736
+ sig { params(enabled: T::Boolean, required: T.nilable(String)).void }
1737
+ def initialize(enabled: nil, required: nil); end
1738
+ end
1739
+ # Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated.
1740
+ sig { returns(T.nilable(T::Boolean)) }
1741
+ attr_accessor :active
1742
+ # Behavior after the purchase is complete.
1743
+ sig { returns(T.nilable(::Stripe::PaymentLink::UpdateParams::AfterCompletion)) }
1744
+ attr_accessor :after_completion
1745
+ # Enables user redeemable promotion codes.
1746
+ sig { returns(T.nilable(T::Boolean)) }
1747
+ attr_accessor :allow_promotion_codes
1748
+ # Configuration for automatic tax collection.
1749
+ sig { returns(T.nilable(::Stripe::PaymentLink::UpdateParams::AutomaticTax)) }
1750
+ attr_accessor :automatic_tax
1751
+ # Configuration for collecting the customer's billing address. Defaults to `auto`.
1752
+ sig { returns(T.nilable(String)) }
1753
+ attr_accessor :billing_address_collection
1754
+ # Collect additional information from your customer using custom fields. Up to 3 fields are supported.
1755
+ sig {
1756
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::PaymentLink::UpdateParams::CustomField]))))
1757
+ }
1758
+ attr_accessor :custom_fields
1759
+ # Display additional text for your customers using custom text.
1760
+ sig { returns(T.nilable(::Stripe::PaymentLink::UpdateParams::CustomText)) }
1761
+ attr_accessor :custom_text
1762
+ # Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers).
1763
+ sig { returns(T.nilable(String)) }
1764
+ attr_accessor :customer_creation
1765
+ # Specifies which fields in the response should be expanded.
1766
+ sig { returns(T.nilable(T::Array[String])) }
1767
+ attr_accessor :expand
1768
+ # The custom message to be displayed to a customer when a payment link is no longer active.
1769
+ sig { returns(T.nilable(T.nilable(String))) }
1770
+ attr_accessor :inactive_message
1771
+ # Generate a post-purchase Invoice for one-time payments.
1772
+ sig { returns(T.nilable(::Stripe::PaymentLink::UpdateParams::InvoiceCreation)) }
1773
+ attr_accessor :invoice_creation
1774
+ # The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.
1775
+ sig { returns(T.nilable(T::Array[::Stripe::PaymentLink::UpdateParams::LineItem])) }
1776
+ attr_accessor :line_items
1777
+ # 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`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link.
1778
+ sig { returns(T.nilable(T::Hash[String, String])) }
1779
+ attr_accessor :metadata
1780
+ # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
1781
+ sig { returns(T.nilable(::Stripe::PaymentLink::UpdateParams::PaymentIntentData)) }
1782
+ attr_accessor :payment_intent_data
1783
+ # Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount.
1784
+ #
1785
+ # Can only be set in `subscription` mode. Defaults to `always`.
1786
+ #
1787
+ # If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials).
1788
+ sig { returns(T.nilable(String)) }
1789
+ attr_accessor :payment_method_collection
1790
+ # The list of payment method types that customers can use. Pass an empty string to enable dynamic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
1791
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
1792
+ attr_accessor :payment_method_types
1793
+ # Controls phone number collection settings during checkout.
1794
+ #
1795
+ # We recommend that you review your privacy policy and check with your legal contacts.
1796
+ sig { returns(T.nilable(::Stripe::PaymentLink::UpdateParams::PhoneNumberCollection)) }
1797
+ attr_accessor :phone_number_collection
1798
+ # Settings that restrict the usage of a payment link.
1799
+ sig {
1800
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::UpdateParams::Restrictions))))
1801
+ }
1802
+ attr_accessor :restrictions
1803
+ # Configuration for collecting the customer's shipping address.
1804
+ sig {
1805
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::UpdateParams::ShippingAddressCollection))))
1806
+ }
1807
+ attr_accessor :shipping_address_collection
1808
+ # Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`).
1809
+ sig { returns(T.nilable(String)) }
1810
+ attr_accessor :submit_type
1811
+ # When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`.
1812
+ sig { returns(T.nilable(::Stripe::PaymentLink::UpdateParams::SubscriptionData)) }
1813
+ attr_accessor :subscription_data
1814
+ # Controls tax ID collection during checkout.
1815
+ sig { returns(T.nilable(::Stripe::PaymentLink::UpdateParams::TaxIdCollection)) }
1816
+ attr_accessor :tax_id_collection
1817
+ sig {
1818
+ params(active: T.nilable(T::Boolean), after_completion: T.nilable(::Stripe::PaymentLink::UpdateParams::AfterCompletion), allow_promotion_codes: T.nilable(T::Boolean), automatic_tax: T.nilable(::Stripe::PaymentLink::UpdateParams::AutomaticTax), billing_address_collection: T.nilable(String), custom_fields: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::PaymentLink::UpdateParams::CustomField]))), custom_text: T.nilable(::Stripe::PaymentLink::UpdateParams::CustomText), customer_creation: T.nilable(String), expand: T.nilable(T::Array[String]), inactive_message: T.nilable(T.nilable(String)), invoice_creation: T.nilable(::Stripe::PaymentLink::UpdateParams::InvoiceCreation), line_items: T.nilable(T::Array[::Stripe::PaymentLink::UpdateParams::LineItem]), metadata: T.nilable(T::Hash[String, String]), payment_intent_data: T.nilable(::Stripe::PaymentLink::UpdateParams::PaymentIntentData), payment_method_collection: T.nilable(String), payment_method_types: T.nilable(T.nilable(T.any(String, T::Array[String]))), phone_number_collection: T.nilable(::Stripe::PaymentLink::UpdateParams::PhoneNumberCollection), restrictions: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::UpdateParams::Restrictions))), shipping_address_collection: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::UpdateParams::ShippingAddressCollection))), submit_type: T.nilable(String), subscription_data: T.nilable(::Stripe::PaymentLink::UpdateParams::SubscriptionData), tax_id_collection: T.nilable(::Stripe::PaymentLink::UpdateParams::TaxIdCollection)).void
1819
+ }
1820
+ def initialize(
1821
+ active: nil,
1822
+ after_completion: nil,
1823
+ allow_promotion_codes: nil,
1824
+ automatic_tax: nil,
1825
+ billing_address_collection: nil,
1826
+ custom_fields: nil,
1827
+ custom_text: nil,
1828
+ customer_creation: nil,
1829
+ expand: nil,
1830
+ inactive_message: nil,
1831
+ invoice_creation: nil,
1832
+ line_items: nil,
1833
+ metadata: nil,
1834
+ payment_intent_data: nil,
1835
+ payment_method_collection: nil,
1836
+ payment_method_types: nil,
1837
+ phone_number_collection: nil,
1838
+ restrictions: nil,
1839
+ shipping_address_collection: nil,
1840
+ submit_type: nil,
1841
+ subscription_data: nil,
1842
+ tax_id_collection: nil
1843
+ ); end
1844
+ end
1845
+ class ListLineItemsParams < Stripe::RequestParams
1846
+ # 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.
1847
+ sig { returns(T.nilable(String)) }
1848
+ attr_accessor :ending_before
1849
+ # Specifies which fields in the response should be expanded.
1850
+ sig { returns(T.nilable(T::Array[String])) }
1851
+ attr_accessor :expand
1852
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
1853
+ sig { returns(T.nilable(Integer)) }
1854
+ attr_accessor :limit
1855
+ # 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.
1856
+ sig { returns(T.nilable(String)) }
1857
+ attr_accessor :starting_after
1858
+ sig {
1859
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
1860
+ }
1861
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
1862
+ end
1863
+ # Creates a payment link.
1864
+ sig {
1865
+ params(params: T.any(::Stripe::PaymentLink::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentLink)
1866
+ }
1867
+ def self.create(params = {}, opts = {}); end
1868
+
1869
+ # Returns a list of your payment links.
1870
+ sig {
1871
+ params(params: T.any(::Stripe::PaymentLink::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
1872
+ }
1873
+ def self.list(params = {}, opts = {}); end
1874
+
1875
+ # When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
1876
+ sig {
1877
+ params(params: T.any(::Stripe::PaymentLink::ListLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
1878
+ }
1879
+ def list_line_items(params = {}, opts = {}); end
1880
+
1881
+ # When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
1882
+ sig {
1883
+ params(payment_link: String, params: T.any(::Stripe::PaymentLink::ListLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
1884
+ }
1885
+ def self.list_line_items(payment_link, params = {}, opts = {}); end
1886
+
1887
+ # Updates a payment link.
1888
+ sig {
1889
+ params(payment_link: String, params: T.any(::Stripe::PaymentLink::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentLink)
1890
+ }
1891
+ def self.update(payment_link, params = {}, opts = {}); end
1892
+ end
1893
+ end