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