stripe 15.0.0 → 15.3.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 (320) hide show
  1. checksums.yaml +4 -4
  2. data/API_VERSION +1 -0
  3. data/CHANGELOG.md +129 -44
  4. data/CONTRIBUTING.md +25 -0
  5. data/Gemfile +1 -1
  6. data/OPENAPI_VERSION +1 -1
  7. data/README.md +28 -55
  8. data/VERSION +1 -1
  9. data/lib/stripe/api_operations/nested_resource.rb +35 -35
  10. data/lib/stripe/api_requestor.rb +1 -1
  11. data/lib/stripe/api_version.rb +2 -1
  12. data/lib/stripe/connection_manager.rb +1 -3
  13. data/lib/stripe/event_types.rb +1 -0
  14. data/lib/stripe/events/v1_billing_meter_error_report_triggered_event.rb +1 -1
  15. data/lib/stripe/events/v1_billing_meter_no_meter_found_event.rb +1 -1
  16. data/lib/stripe/events/v2_core_event_destination_ping_event.rb +21 -0
  17. data/lib/stripe/oauth.rb +1 -1
  18. data/lib/stripe/resources/account.rb +198 -28
  19. data/lib/stripe/resources/account_session.rb +176 -72
  20. data/lib/stripe/resources/apple_pay_domain.rb +1 -2
  21. data/lib/stripe/resources/balance.rb +42 -0
  22. data/lib/stripe/resources/balance_transaction.rb +2 -0
  23. data/lib/stripe/resources/bank_account.rb +2 -2
  24. data/lib/stripe/resources/billing_portal/session.rb +3 -3
  25. data/lib/stripe/resources/capability.rb +1 -1
  26. data/lib/stripe/resources/charge.rb +43 -20
  27. data/lib/stripe/resources/checkout/session.rb +120 -19
  28. data/lib/stripe/resources/confirmation_token.rb +119 -100
  29. data/lib/stripe/resources/country_spec.rb +1 -1
  30. data/lib/stripe/resources/coupon.rb +2 -3
  31. data/lib/stripe/resources/credit_note.rb +21 -18
  32. data/lib/stripe/resources/customer.rb +4 -6
  33. data/lib/stripe/resources/customer_session.rb +5 -5
  34. data/lib/stripe/resources/dispute.rb +2 -2
  35. data/lib/stripe/resources/event.rb +3 -1
  36. data/lib/stripe/resources/file.rb +1 -1
  37. data/lib/stripe/resources/funding_instructions.rb +1 -1
  38. data/lib/stripe/resources/identity/verification_report.rb +6 -0
  39. data/lib/stripe/resources/identity/verification_session.rb +51 -11
  40. data/lib/stripe/resources/invoice.rb +146 -32
  41. data/lib/stripe/resources/invoice_item.rb +3 -7
  42. data/lib/stripe/resources/invoice_line_item.rb +1 -1
  43. data/lib/stripe/resources/invoice_payment.rb +9 -2
  44. data/lib/stripe/resources/issuing/authorization.rb +8 -8
  45. data/lib/stripe/resources/issuing/card.rb +1 -1
  46. data/lib/stripe/resources/issuing/dispute.rb +3 -3
  47. data/lib/stripe/resources/login_link.rb +2 -1
  48. data/lib/stripe/resources/mandate.rb +3 -0
  49. data/lib/stripe/resources/payment_intent.rb +602 -325
  50. data/lib/stripe/resources/payment_method.rb +76 -117
  51. data/lib/stripe/resources/payment_method_configuration.rb +356 -2
  52. data/lib/stripe/resources/payment_method_domain.rb +15 -2
  53. data/lib/stripe/resources/payout.rb +4 -4
  54. data/lib/stripe/resources/person.rb +27 -3
  55. data/lib/stripe/resources/plan.rb +2 -3
  56. data/lib/stripe/resources/price.rb +1 -1
  57. data/lib/stripe/resources/product.rb +1 -2
  58. data/lib/stripe/resources/quote.rb +28 -3
  59. data/lib/stripe/resources/radar/value_list.rb +1 -2
  60. data/lib/stripe/resources/radar/value_list_item.rb +1 -2
  61. data/lib/stripe/resources/refund.rb +8 -1
  62. data/lib/stripe/resources/reversal.rb +1 -1
  63. data/lib/stripe/resources/review.rb +1 -1
  64. data/lib/stripe/resources/setup_attempt.rb +1 -1
  65. data/lib/stripe/resources/setup_intent.rb +414 -293
  66. data/lib/stripe/resources/source.rb +1 -1
  67. data/lib/stripe/resources/subscription.rb +149 -27
  68. data/lib/stripe/resources/subscription_item.rb +33 -0
  69. data/lib/stripe/resources/subscription_schedule.rb +141 -4
  70. data/lib/stripe/resources/tax/calculation.rb +6 -2
  71. data/lib/stripe/resources/tax/calculation_line_item.rb +2 -0
  72. data/lib/stripe/resources/tax/registration.rb +261 -1
  73. data/lib/stripe/resources/tax/transaction.rb +1 -1
  74. data/lib/stripe/resources/tax_id.rb +3 -4
  75. data/lib/stripe/resources/tax_rate.rb +2 -2
  76. data/lib/stripe/resources/terminal/configuration.rb +2 -2
  77. data/lib/stripe/resources/terminal/location.rb +2 -3
  78. data/lib/stripe/resources/terminal/reader.rb +426 -6
  79. data/lib/stripe/resources/test_helpers/test_clock.rb +1 -2
  80. data/lib/stripe/resources/token.rb +63 -2
  81. data/lib/stripe/resources/transfer.rb +1 -1
  82. data/lib/stripe/resources/treasury/financial_account.rb +5 -1
  83. data/lib/stripe/resources/v2/billing/meter_event.rb +2 -2
  84. data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +2 -2
  85. data/lib/stripe/resources/v2/billing/meter_event_session.rb +2 -2
  86. data/lib/stripe/resources/v2/event.rb +2 -2
  87. data/lib/stripe/resources/v2/event_destination.rb +2 -2
  88. data/lib/stripe/resources/webhook_endpoint.rb +1 -2
  89. data/lib/stripe/resources.rb +1 -0
  90. data/lib/stripe/services/account_external_account_service.rb +3 -4
  91. data/lib/stripe/services/account_login_link_service.rb +1 -1
  92. data/lib/stripe/services/account_person_service.rb +85 -2
  93. data/lib/stripe/services/account_service.rb +169 -20
  94. data/lib/stripe/services/account_session_service.rb +115 -47
  95. data/lib/stripe/services/apple_pay_domain_service.rb +1 -2
  96. data/lib/stripe/services/application_fee_service.rb +1 -1
  97. data/lib/stripe/services/apps_service.rb +1 -1
  98. data/lib/stripe/services/balance_service.rb +1 -1
  99. data/lib/stripe/services/billing/meter_service.rb +1 -1
  100. data/lib/stripe/services/billing_portal/session_service.rb +1 -1
  101. data/lib/stripe/services/billing_portal_service.rb +1 -1
  102. data/lib/stripe/services/billing_service.rb +1 -1
  103. data/lib/stripe/services/charge_service.rb +4 -4
  104. data/lib/stripe/services/checkout/session_service.rb +94 -15
  105. data/lib/stripe/services/checkout_service.rb +1 -1
  106. data/lib/stripe/services/climate_service.rb +1 -1
  107. data/lib/stripe/services/coupon_service.rb +1 -2
  108. data/lib/stripe/services/credit_note_preview_lines_service.rb +3 -3
  109. data/lib/stripe/services/credit_note_service.rb +14 -15
  110. data/lib/stripe/services/customer_balance_transaction_service.rb +3 -3
  111. data/lib/stripe/services/customer_cash_balance_transaction_service.rb +2 -2
  112. data/lib/stripe/services/customer_payment_method_service.rb +1 -1
  113. data/lib/stripe/services/customer_payment_source_service.rb +1 -1
  114. data/lib/stripe/services/customer_service.rb +5 -7
  115. data/lib/stripe/services/customer_session_service.rb +1 -1
  116. data/lib/stripe/services/customer_tax_id_service.rb +2 -3
  117. data/lib/stripe/services/dispute_service.rb +1 -1
  118. data/lib/stripe/services/entitlements_service.rb +1 -1
  119. data/lib/stripe/services/file_service.rb +1 -1
  120. data/lib/stripe/services/financial_connections/account_service.rb +1 -1
  121. data/lib/stripe/services/financial_connections_service.rb +1 -1
  122. data/lib/stripe/services/forwarding_service.rb +1 -1
  123. data/lib/stripe/services/identity/verification_session_service.rb +21 -5
  124. data/lib/stripe/services/identity_service.rb +1 -1
  125. data/lib/stripe/services/invoice_item_service.rb +1 -2
  126. data/lib/stripe/services/invoice_service.rb +122 -28
  127. data/lib/stripe/services/issuing/authorization_service.rb +4 -4
  128. data/lib/stripe/services/issuing/card_service.rb +1 -1
  129. data/lib/stripe/services/issuing/dispute_service.rb +2 -2
  130. data/lib/stripe/services/issuing_service.rb +1 -1
  131. data/lib/stripe/services/payment_intent_service.rb +563 -313
  132. data/lib/stripe/services/payment_link_service.rb +1 -1
  133. data/lib/stripe/services/payment_method_configuration_service.rb +254 -2
  134. data/lib/stripe/services/payment_method_domain_service.rb +1 -1
  135. data/lib/stripe/services/payment_method_service.rb +59 -105
  136. data/lib/stripe/services/payout_service.rb +2 -2
  137. data/lib/stripe/services/plan_service.rb +2 -3
  138. data/lib/stripe/services/price_service.rb +2 -2
  139. data/lib/stripe/services/product_feature_service.rb +1 -2
  140. data/lib/stripe/services/product_service.rb +3 -4
  141. data/lib/stripe/services/promotion_code_service.rb +1 -1
  142. data/lib/stripe/services/quote_service.rb +21 -4
  143. data/lib/stripe/services/radar/early_fraud_warning_service.rb +1 -1
  144. data/lib/stripe/services/radar/value_list_item_service.rb +1 -2
  145. data/lib/stripe/services/radar/value_list_service.rb +1 -2
  146. data/lib/stripe/services/radar_service.rb +1 -1
  147. data/lib/stripe/services/reporting_service.rb +1 -1
  148. data/lib/stripe/services/setup_intent_service.rb +403 -291
  149. data/lib/stripe/services/sigma_service.rb +1 -1
  150. data/lib/stripe/services/source_service.rb +2 -2
  151. data/lib/stripe/services/subscription_item_service.rb +26 -0
  152. data/lib/stripe/services/subscription_schedule_service.rb +106 -3
  153. data/lib/stripe/services/subscription_service.rb +121 -26
  154. data/lib/stripe/services/tax/calculation_service.rb +6 -2
  155. data/lib/stripe/services/tax/registration_service.rb +170 -1
  156. data/lib/stripe/services/tax/transaction_service.rb +1 -1
  157. data/lib/stripe/services/tax_id_service.rb +2 -3
  158. data/lib/stripe/services/tax_service.rb +1 -1
  159. data/lib/stripe/services/terminal/configuration_service.rb +1 -2
  160. data/lib/stripe/services/terminal/location_service.rb +2 -3
  161. data/lib/stripe/services/terminal/reader_service.rb +196 -2
  162. data/lib/stripe/services/terminal_service.rb +1 -1
  163. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +90 -91
  164. data/lib/stripe/services/test_helpers/issuing_service.rb +1 -1
  165. data/lib/stripe/services/test_helpers/terminal/reader_service.rb +43 -0
  166. data/lib/stripe/services/test_helpers/terminal_service.rb +1 -1
  167. data/lib/stripe/services/test_helpers/test_clock_service.rb +1 -2
  168. data/lib/stripe/services/test_helpers/treasury_service.rb +1 -1
  169. data/lib/stripe/services/test_helpers_service.rb +1 -1
  170. data/lib/stripe/services/token_service.rb +62 -1
  171. data/lib/stripe/services/transfer_service.rb +2 -2
  172. data/lib/stripe/services/treasury/financial_account_service.rb +6 -2
  173. data/lib/stripe/services/treasury_service.rb +1 -1
  174. data/lib/stripe/services/v1_services.rb +1 -1
  175. data/lib/stripe/services/v2/billing/meter_event_session_service.rb +1 -2
  176. data/lib/stripe/services/v2/billing_service.rb +3 -3
  177. data/lib/stripe/services/v2/core/event_destination_service.rb +17 -23
  178. data/lib/stripe/services/v2/core/event_service.rb +1 -2
  179. data/lib/stripe/services/v2/core_service.rb +1 -1
  180. data/lib/stripe/services/v2_services.rb +1 -1
  181. data/lib/stripe/services/webhook_endpoint_service.rb +1 -2
  182. data/lib/stripe/version.rb +1 -1
  183. data/lib/stripe/webhook.rb +1 -1
  184. data/rbi/stripe/resources/account.rbi +190 -35
  185. data/rbi/stripe/resources/account_session.rbi +196 -77
  186. data/rbi/stripe/resources/apple_pay_domain.rbi +1 -3
  187. data/rbi/stripe/resources/balance.rbi +55 -0
  188. data/rbi/stripe/resources/balance_transaction.rbi +3 -0
  189. data/rbi/stripe/resources/bank_account.rbi +2 -2
  190. data/rbi/stripe/resources/billing/alert.rbi +2 -2
  191. data/rbi/stripe/resources/billing_portal/session.rbi +3 -3
  192. data/rbi/stripe/resources/capability.rbi +1 -1
  193. data/rbi/stripe/resources/charge.rbi +52 -20
  194. data/rbi/stripe/resources/checkout/session.rbi +133 -24
  195. data/rbi/stripe/resources/confirmation_token.rbi +140 -115
  196. data/rbi/stripe/resources/country_spec.rbi +1 -1
  197. data/rbi/stripe/resources/coupon.rbi +2 -4
  198. data/rbi/stripe/resources/credit_note.rbi +23 -18
  199. data/rbi/stripe/resources/customer.rbi +4 -8
  200. data/rbi/stripe/resources/customer_session.rbi +5 -5
  201. data/rbi/stripe/resources/dispute.rbi +2 -2
  202. data/rbi/stripe/resources/event.rbi +4 -1
  203. data/rbi/stripe/resources/file.rbi +1 -1
  204. data/rbi/stripe/resources/identity/verification_report.rbi +9 -0
  205. data/rbi/stripe/resources/identity/verification_session.rbi +59 -12
  206. data/rbi/stripe/resources/invoice.rbi +149 -40
  207. data/rbi/stripe/resources/invoice_item.rbi +3 -8
  208. data/rbi/stripe/resources/invoice_line_item.rbi +2 -2
  209. data/rbi/stripe/resources/invoice_payment.rbi +9 -2
  210. data/rbi/stripe/resources/issuing/authorization.rbi +8 -8
  211. data/rbi/stripe/resources/issuing/card.rbi +1 -1
  212. data/rbi/stripe/resources/issuing/dispute.rbi +3 -3
  213. data/rbi/stripe/resources/login_link.rbi +2 -1
  214. data/rbi/stripe/resources/mandate.rbi +4 -0
  215. data/rbi/stripe/resources/payment_intent.rbi +637 -381
  216. data/rbi/stripe/resources/payment_method.rbi +81 -133
  217. data/rbi/stripe/resources/payment_method_configuration.rbi +400 -4
  218. data/rbi/stripe/resources/payment_method_domain.rbi +18 -2
  219. data/rbi/stripe/resources/payout.rbi +4 -4
  220. data/rbi/stripe/resources/person.rbi +33 -3
  221. data/rbi/stripe/resources/plan.rbi +2 -4
  222. data/rbi/stripe/resources/price.rbi +1 -1
  223. data/rbi/stripe/resources/product.rbi +1 -3
  224. data/rbi/stripe/resources/quote.rbi +25 -3
  225. data/rbi/stripe/resources/radar/value_list.rbi +1 -3
  226. data/rbi/stripe/resources/radar/value_list_item.rbi +1 -3
  227. data/rbi/stripe/resources/refund.rbi +8 -1
  228. data/rbi/stripe/resources/reversal.rbi +1 -1
  229. data/rbi/stripe/resources/review.rbi +1 -1
  230. data/rbi/stripe/resources/setup_attempt.rbi +1 -1
  231. data/rbi/stripe/resources/setup_intent.rbi +464 -346
  232. data/rbi/stripe/resources/source.rbi +1 -1
  233. data/rbi/stripe/resources/subscription.rbi +150 -34
  234. data/rbi/stripe/resources/subscription_item.rbi +36 -2
  235. data/rbi/stripe/resources/subscription_schedule.rbi +161 -11
  236. data/rbi/stripe/resources/tax/calculation.rbi +7 -3
  237. data/rbi/stripe/resources/tax/calculation_line_item.rbi +4 -1
  238. data/rbi/stripe/resources/tax/registration.rbi +249 -2
  239. data/rbi/stripe/resources/tax/transaction.rbi +1 -1
  240. data/rbi/stripe/resources/tax_id.rbi +3 -5
  241. data/rbi/stripe/resources/tax_rate.rbi +2 -2
  242. data/rbi/stripe/resources/terminal/configuration.rbi +2 -3
  243. data/rbi/stripe/resources/terminal/location.rbi +4 -6
  244. data/rbi/stripe/resources/terminal/reader.rbi +415 -8
  245. data/rbi/stripe/resources/test_helpers/test_clock.rbi +1 -3
  246. data/rbi/stripe/resources/token.rbi +70 -4
  247. data/rbi/stripe/resources/transfer.rbi +1 -1
  248. data/rbi/stripe/resources/treasury/financial_account.rbi +6 -2
  249. data/rbi/stripe/resources/v2/billing/meter_event.rbi +3 -3
  250. data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +3 -3
  251. data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +3 -3
  252. data/rbi/stripe/resources/v2/event.rbi +3 -3
  253. data/rbi/stripe/resources/v2/event_destination.rbi +3 -3
  254. data/rbi/stripe/resources/webhook_endpoint.rbi +1 -3
  255. data/rbi/stripe/services/account_external_account_service.rbi +3 -5
  256. data/rbi/stripe/services/account_login_link_service.rbi +1 -1
  257. data/rbi/stripe/services/account_person_service.rbi +93 -5
  258. data/rbi/stripe/services/account_service.rbi +166 -28
  259. data/rbi/stripe/services/account_session_service.rbi +126 -52
  260. data/rbi/stripe/services/apple_pay_domain_service.rbi +1 -3
  261. data/rbi/stripe/services/balance_service.rbi +1 -1
  262. data/rbi/stripe/services/billing/alert_service.rbi +2 -2
  263. data/rbi/stripe/services/billing_portal/session_service.rbi +1 -1
  264. data/rbi/stripe/services/charge_service.rbi +4 -4
  265. data/rbi/stripe/services/checkout/session_service.rbi +104 -19
  266. data/rbi/stripe/services/coupon_service.rbi +1 -3
  267. data/rbi/stripe/services/credit_note_preview_lines_service.rbi +3 -3
  268. data/rbi/stripe/services/credit_note_service.rbi +13 -14
  269. data/rbi/stripe/services/customer_balance_transaction_service.rbi +3 -3
  270. data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +2 -2
  271. data/rbi/stripe/services/customer_payment_method_service.rbi +1 -1
  272. data/rbi/stripe/services/customer_payment_source_service.rbi +1 -1
  273. data/rbi/stripe/services/customer_service.rbi +4 -8
  274. data/rbi/stripe/services/customer_session_service.rbi +1 -1
  275. data/rbi/stripe/services/customer_tax_id_service.rbi +2 -4
  276. data/rbi/stripe/services/dispute_service.rbi +1 -1
  277. data/rbi/stripe/services/file_service.rbi +1 -1
  278. data/rbi/stripe/services/identity/verification_session_service.rbi +22 -6
  279. data/rbi/stripe/services/invoice_item_service.rbi +1 -3
  280. data/rbi/stripe/services/invoice_service.rbi +126 -35
  281. data/rbi/stripe/services/issuing/authorization_service.rbi +4 -4
  282. data/rbi/stripe/services/issuing/card_service.rbi +1 -1
  283. data/rbi/stripe/services/issuing/dispute_service.rbi +2 -2
  284. data/rbi/stripe/services/payment_intent_service.rbi +599 -369
  285. data/rbi/stripe/services/payment_method_configuration_service.rbi +280 -4
  286. data/rbi/stripe/services/payment_method_domain_service.rbi +1 -1
  287. data/rbi/stripe/services/payment_method_service.rbi +62 -121
  288. data/rbi/stripe/services/payout_service.rbi +2 -2
  289. data/rbi/stripe/services/plan_service.rbi +2 -4
  290. data/rbi/stripe/services/price_service.rbi +2 -2
  291. data/rbi/stripe/services/product_feature_service.rbi +1 -3
  292. data/rbi/stripe/services/product_service.rbi +2 -4
  293. data/rbi/stripe/services/promotion_code_service.rbi +1 -1
  294. data/rbi/stripe/services/quote_service.rbi +16 -3
  295. data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +1 -1
  296. data/rbi/stripe/services/radar/value_list_item_service.rbi +1 -3
  297. data/rbi/stripe/services/radar/value_list_service.rbi +1 -3
  298. data/rbi/stripe/services/setup_intent_service.rbi +457 -344
  299. data/rbi/stripe/services/source_service.rbi +1 -1
  300. data/rbi/stripe/services/subscription_item_service.rbi +28 -2
  301. data/rbi/stripe/services/subscription_schedule_service.rbi +119 -10
  302. data/rbi/stripe/services/subscription_service.rbi +121 -33
  303. data/rbi/stripe/services/tax/calculation_service.rbi +6 -2
  304. data/rbi/stripe/services/tax/registration_service.rbi +171 -2
  305. data/rbi/stripe/services/tax_id_service.rbi +2 -4
  306. data/rbi/stripe/services/terminal/configuration_service.rbi +1 -3
  307. data/rbi/stripe/services/terminal/location_service.rbi +4 -6
  308. data/rbi/stripe/services/terminal/reader_service.rbi +200 -4
  309. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +106 -106
  310. data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +31 -0
  311. data/rbi/stripe/services/test_helpers/test_clock_service.rbi +1 -3
  312. data/rbi/stripe/services/token_service.rbi +71 -3
  313. data/rbi/stripe/services/transfer_service.rbi +1 -1
  314. data/rbi/stripe/services/treasury/financial_account_service.rbi +6 -2
  315. data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +1 -3
  316. data/rbi/stripe/services/v2/billing_service.rbi +1 -1
  317. data/rbi/stripe/services/v2/core/event_destination_service.rbi +14 -22
  318. data/rbi/stripe/services/v2/core/event_service.rbi +1 -3
  319. data/rbi/stripe/services/webhook_endpoint_service.rbi +1 -3
  320. metadata +5 -2
@@ -36,8 +36,7 @@ module Stripe
36
36
  attr_reader :verified_name
37
37
  end
38
38
 
39
- class DeleteParams < Stripe::RequestParams
40
- end
39
+ class DeleteParams < Stripe::RequestParams; end
41
40
 
42
41
  class ListParams < Stripe::RequestParams
43
42
  class Owner < Stripe::RequestParams
@@ -93,7 +92,7 @@ module Stripe
93
92
  attr_accessor :expand
94
93
  # The account or customer the tax ID belongs to. Defaults to `owner[type]=self`.
95
94
  attr_accessor :owner
96
- # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`
95
+ # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`
97
96
  attr_accessor :type
98
97
  # Value of the tax ID.
99
98
  attr_accessor :value
@@ -119,7 +118,7 @@ module Stripe
119
118
  attr_reader :object
120
119
  # The account or customer the tax ID belongs to.
121
120
  attr_reader :owner
122
- # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`. Note that some legacy tax IDs have type `unknown`
121
+ # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`. Note that some legacy tax IDs have type `unknown`
123
122
  attr_reader :type
124
123
  # Value of the tax ID.
125
124
  attr_reader :value
@@ -2,9 +2,9 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
- # Tax rates can be applied to [invoices](https://stripe.com/invoicing/taxes/tax-rates), [subscriptions](https://stripe.com/billing/taxes/tax-rates) and [Checkout Sessions](https://stripe.com/payments/checkout/use-manual-tax-rates) to collect tax.
5
+ # Tax rates can be applied to [invoices](https://docs.stripe.com/invoicing/taxes/tax-rates), [subscriptions](https://docs.stripe.com/billing/taxes/tax-rates) and [Checkout Sessions](https://docs.stripe.com/payments/checkout/use-manual-tax-rates) to collect tax.
6
6
  #
7
- # Related guide: [Tax rates](https://stripe.com/billing/taxes/tax-rates)
7
+ # Related guide: [Tax rates](https://docs.stripe.com/billing/taxes/tax-rates)
8
8
  class TaxRate < APIResource
9
9
  extend Stripe::APIOperations::Create
10
10
  extend Stripe::APIOperations::List
@@ -4,6 +4,7 @@
4
4
  module Stripe
5
5
  module Terminal
6
6
  # A Configurations object represents how features should be configured for terminal readers.
7
+ # For information about how to use it, see the [Terminal configurations documentation](https://docs.stripe.com/terminal/fleet/configurations-overview).
7
8
  class Configuration < APIResource
8
9
  extend Stripe::APIOperations::Create
9
10
  include Stripe::APIOperations::Delete
@@ -261,8 +262,7 @@ module Stripe
261
262
  attr_reader :type
262
263
  end
263
264
 
264
- class DeleteParams < Stripe::RequestParams
265
- end
265
+ class DeleteParams < Stripe::RequestParams; end
266
266
 
267
267
  class UpdateParams < Stripe::RequestParams
268
268
  class BbposWiseposE < Stripe::RequestParams
@@ -32,8 +32,7 @@ module Stripe
32
32
  attr_reader :state
33
33
  end
34
34
 
35
- class DeleteParams < Stripe::RequestParams
36
- end
35
+ class DeleteParams < Stripe::RequestParams; end
37
36
 
38
37
  class UpdateParams < Stripe::RequestParams
39
38
  class Address < Stripe::RequestParams
@@ -184,7 +183,7 @@ module Stripe
184
183
  attr_reader :deleted
185
184
 
186
185
  # Creates a new Location object.
187
- # For further details, including which address fields are required in each country, see the [Manage locations](https://stripe.com/docs/terminal/fleet/locations) guide.
186
+ # For further details, including which address fields are required in each country, see the [Manage locations](https://docs.stripe.com/docs/terminal/fleet/locations) guide.
188
187
  def self.create(params = {}, opts = {})
189
188
  request_stripe_object(
190
189
  method: :post,
@@ -18,14 +18,146 @@ module Stripe
18
18
  end
19
19
 
20
20
  class Action < Stripe::StripeObject
21
+ class CollectInputs < Stripe::StripeObject
22
+ class Input < Stripe::StripeObject
23
+ class CustomText < Stripe::StripeObject
24
+ # Customize the default description for this input
25
+ attr_reader :description
26
+ # Customize the default label for this input's skip button
27
+ attr_reader :skip_button
28
+ # Customize the default label for this input's submit button
29
+ attr_reader :submit_button
30
+ # Customize the default title for this input
31
+ attr_reader :title
32
+ end
33
+
34
+ class Email < Stripe::StripeObject
35
+ # The collected email address
36
+ attr_reader :value
37
+ end
38
+
39
+ class Numeric < Stripe::StripeObject
40
+ # The collected number
41
+ attr_reader :value
42
+ end
43
+
44
+ class Phone < Stripe::StripeObject
45
+ # The collected phone number
46
+ attr_reader :value
47
+ end
48
+
49
+ class Selection < Stripe::StripeObject
50
+ class Choice < Stripe::StripeObject
51
+ # The id to be selected
52
+ attr_reader :id
53
+ # The button style for the choice
54
+ attr_reader :style
55
+ # The text to be selected
56
+ attr_reader :text
57
+ end
58
+ # List of possible choices to be selected
59
+ attr_reader :choices
60
+ # The id of the selected choice
61
+ attr_reader :id
62
+ # The text of the selected choice
63
+ attr_reader :text
64
+ end
65
+
66
+ class Signature < Stripe::StripeObject
67
+ # The File ID of a collected signature image
68
+ attr_reader :value
69
+ end
70
+
71
+ class Text < Stripe::StripeObject
72
+ # The collected text value
73
+ attr_reader :value
74
+ end
75
+
76
+ class Toggle < Stripe::StripeObject
77
+ # The toggle's default value
78
+ attr_reader :default_value
79
+ # The toggle's description text
80
+ attr_reader :description
81
+ # The toggle's title text
82
+ attr_reader :title
83
+ # The toggle's collected value
84
+ attr_reader :value
85
+ end
86
+ # Default text of input being collected.
87
+ attr_reader :custom_text
88
+ # Information about a email being collected using a reader
89
+ attr_reader :email
90
+ # Information about a number being collected using a reader
91
+ attr_reader :numeric
92
+ # Information about a phone number being collected using a reader
93
+ attr_reader :phone
94
+ # Indicate that this input is required, disabling the skip button.
95
+ attr_reader :required
96
+ # Information about a selection being collected using a reader
97
+ attr_reader :selection
98
+ # Information about a signature being collected using a reader
99
+ attr_reader :signature
100
+ # Indicate that this input was skipped by the user.
101
+ attr_reader :skipped
102
+ # Information about text being collected using a reader
103
+ attr_reader :text
104
+ # List of toggles being collected. Values are present if collection is complete.
105
+ attr_reader :toggles
106
+ # Type of input being collected.
107
+ attr_reader :type
108
+ end
109
+ # List of inputs to be collected.
110
+ attr_reader :inputs
111
+ # 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.
112
+ attr_reader :metadata
113
+ end
114
+
115
+ class CollectPaymentMethod < Stripe::StripeObject
116
+ class CollectConfig < Stripe::StripeObject
117
+ class Tipping < Stripe::StripeObject
118
+ # Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency).
119
+ attr_reader :amount_eligible
120
+ end
121
+ # Enable customer-initiated cancellation when processing this payment.
122
+ attr_reader :enable_customer_cancellation
123
+ # Override showing a tipping selection screen on this transaction.
124
+ attr_reader :skip_tipping
125
+ # Represents a per-transaction tipping configuration
126
+ attr_reader :tipping
127
+ end
128
+ # Represents a per-transaction override of a reader configuration
129
+ attr_reader :collect_config
130
+ # Most recent PaymentIntent processed by the reader.
131
+ attr_reader :payment_intent
132
+ # PaymentMethod objects represent your customer's payment instruments.
133
+ # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to
134
+ # Customer objects to store instrument details for future payments.
135
+ #
136
+ # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios).
137
+ attr_reader :payment_method
138
+ end
139
+
140
+ class ConfirmPaymentIntent < Stripe::StripeObject
141
+ class ConfirmConfig < Stripe::StripeObject
142
+ # If the customer doesn't abandon authenticating the payment, they're redirected to this URL after completion.
143
+ attr_reader :return_url
144
+ end
145
+ # Represents a per-transaction override of a reader configuration
146
+ attr_reader :confirm_config
147
+ # Most recent PaymentIntent processed by the reader.
148
+ attr_reader :payment_intent
149
+ end
150
+
21
151
  class ProcessPaymentIntent < Stripe::StripeObject
22
152
  class ProcessConfig < Stripe::StripeObject
23
153
  class Tipping < Stripe::StripeObject
24
154
  # Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency).
25
155
  attr_reader :amount_eligible
26
156
  end
27
- # Enable customer initiated cancellation when processing this payment.
157
+ # Enable customer-initiated cancellation when processing this payment.
28
158
  attr_reader :enable_customer_cancellation
159
+ # If the customer doesn't abandon authenticating the payment, they're redirected to this URL after completion.
160
+ attr_reader :return_url
29
161
  # Override showing a tipping selection screen on this transaction.
30
162
  attr_reader :skip_tipping
31
163
  # Represents a per-transaction tipping configuration
@@ -39,7 +171,7 @@ module Stripe
39
171
 
40
172
  class ProcessSetupIntent < Stripe::StripeObject
41
173
  class ProcessConfig < Stripe::StripeObject
42
- # Enable customer initiated cancellation when processing this SetupIntent.
174
+ # Enable customer-initiated cancellation when processing this SetupIntent.
43
175
  attr_reader :enable_customer_cancellation
44
176
  end
45
177
  # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod.
@@ -52,7 +184,7 @@ module Stripe
52
184
 
53
185
  class RefundPayment < Stripe::StripeObject
54
186
  class RefundPaymentConfig < Stripe::StripeObject
55
- # Enable customer initiated cancellation when refunding this payment.
187
+ # Enable customer-initiated cancellation when refunding this payment.
56
188
  attr_reader :enable_customer_cancellation
57
189
  end
58
190
  # The amount being refunded.
@@ -99,6 +231,12 @@ module Stripe
99
231
  # Type of information to be displayed by the reader.
100
232
  attr_reader :type
101
233
  end
234
+ # Represents a reader action to collect customer inputs
235
+ attr_reader :collect_inputs
236
+ # Represents a reader action to collect a payment method
237
+ attr_reader :collect_payment_method
238
+ # Represents a reader action to confirm a payment
239
+ attr_reader :confirm_payment_intent
102
240
  # Failure code, only set if status is `failed`.
103
241
  attr_reader :failure_code
104
242
  # Detailed failure message, only set if status is `failed`.
@@ -117,8 +255,7 @@ module Stripe
117
255
  attr_reader :type
118
256
  end
119
257
 
120
- class DeleteParams < Stripe::RequestParams
121
- end
258
+ class DeleteParams < Stripe::RequestParams; end
122
259
 
123
260
  class UpdateParams < Stripe::RequestParams
124
261
  # Specifies which fields in the response should be expanded.
@@ -210,6 +347,164 @@ module Stripe
210
347
  end
211
348
  end
212
349
 
350
+ class CollectInputsParams < Stripe::RequestParams
351
+ class Input < Stripe::RequestParams
352
+ class CustomText < Stripe::RequestParams
353
+ # The description which will be displayed when collecting this input
354
+ attr_accessor :description
355
+ # The skip button text
356
+ attr_accessor :skip_button
357
+ # The submit button text
358
+ attr_accessor :submit_button
359
+ # The title which will be displayed when collecting this input
360
+ attr_accessor :title
361
+
362
+ def initialize(description: nil, skip_button: nil, submit_button: nil, title: nil)
363
+ @description = description
364
+ @skip_button = skip_button
365
+ @submit_button = submit_button
366
+ @title = title
367
+ end
368
+ end
369
+
370
+ class Selection < Stripe::RequestParams
371
+ class Choice < Stripe::RequestParams
372
+ # The unique identifier for this choice
373
+ attr_accessor :id
374
+ # The style of the button which will be shown for this choice
375
+ attr_accessor :style
376
+ # The text which will be shown on the button for this choice
377
+ attr_accessor :text
378
+
379
+ def initialize(id: nil, style: nil, text: nil)
380
+ @id = id
381
+ @style = style
382
+ @text = text
383
+ end
384
+ end
385
+ # List of choices for the `selection` input
386
+ attr_accessor :choices
387
+
388
+ def initialize(choices: nil)
389
+ @choices = choices
390
+ end
391
+ end
392
+
393
+ class Toggle < Stripe::RequestParams
394
+ # The default value of the toggle
395
+ attr_accessor :default_value
396
+ # The description which will be displayed for the toggle
397
+ attr_accessor :description
398
+ # The title which will be displayed for the toggle
399
+ attr_accessor :title
400
+
401
+ def initialize(default_value: nil, description: nil, title: nil)
402
+ @default_value = default_value
403
+ @description = description
404
+ @title = title
405
+ end
406
+ end
407
+ # Customize the text which will be displayed while collecting this input
408
+ attr_accessor :custom_text
409
+ # Indicate that this input is required, disabling the skip button
410
+ attr_accessor :required
411
+ # Options for the `selection` input
412
+ attr_accessor :selection
413
+ # List of toggles to be displayed and customization for the toggles
414
+ attr_accessor :toggles
415
+ # The type of input to collect
416
+ attr_accessor :type
417
+
418
+ def initialize(custom_text: nil, required: nil, selection: nil, toggles: nil, type: nil)
419
+ @custom_text = custom_text
420
+ @required = required
421
+ @selection = selection
422
+ @toggles = toggles
423
+ @type = type
424
+ end
425
+ end
426
+ # Specifies which fields in the response should be expanded.
427
+ attr_accessor :expand
428
+ # List of inputs to be collected using the Reader
429
+ attr_accessor :inputs
430
+ # 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`.
431
+ attr_accessor :metadata
432
+
433
+ def initialize(expand: nil, inputs: nil, metadata: nil)
434
+ @expand = expand
435
+ @inputs = inputs
436
+ @metadata = metadata
437
+ end
438
+ end
439
+
440
+ class CollectPaymentMethodParams < Stripe::RequestParams
441
+ class CollectConfig < Stripe::RequestParams
442
+ class Tipping < Stripe::RequestParams
443
+ # Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency).
444
+ attr_accessor :amount_eligible
445
+
446
+ def initialize(amount_eligible: nil)
447
+ @amount_eligible = amount_eligible
448
+ end
449
+ end
450
+ # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow.
451
+ attr_accessor :allow_redisplay
452
+ # Enables cancel button on transaction screens.
453
+ attr_accessor :enable_customer_cancellation
454
+ # Override showing a tipping selection screen on this transaction.
455
+ attr_accessor :skip_tipping
456
+ # Tipping configuration for this transaction.
457
+ attr_accessor :tipping
458
+
459
+ def initialize(
460
+ allow_redisplay: nil,
461
+ enable_customer_cancellation: nil,
462
+ skip_tipping: nil,
463
+ tipping: nil
464
+ )
465
+ @allow_redisplay = allow_redisplay
466
+ @enable_customer_cancellation = enable_customer_cancellation
467
+ @skip_tipping = skip_tipping
468
+ @tipping = tipping
469
+ end
470
+ end
471
+ # Configuration overrides.
472
+ attr_accessor :collect_config
473
+ # Specifies which fields in the response should be expanded.
474
+ attr_accessor :expand
475
+ # PaymentIntent ID.
476
+ attr_accessor :payment_intent
477
+
478
+ def initialize(collect_config: nil, expand: nil, payment_intent: nil)
479
+ @collect_config = collect_config
480
+ @expand = expand
481
+ @payment_intent = payment_intent
482
+ end
483
+ end
484
+
485
+ class ConfirmPaymentIntentParams < Stripe::RequestParams
486
+ class ConfirmConfig < Stripe::RequestParams
487
+ # The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme.
488
+ attr_accessor :return_url
489
+
490
+ def initialize(return_url: nil)
491
+ @return_url = return_url
492
+ end
493
+ end
494
+ # Configuration overrides.
495
+ attr_accessor :confirm_config
496
+ # Specifies which fields in the response should be expanded.
497
+ attr_accessor :expand
498
+ # PaymentIntent ID.
499
+ attr_accessor :payment_intent
500
+
501
+ def initialize(confirm_config: nil, expand: nil, payment_intent: nil)
502
+ @confirm_config = confirm_config
503
+ @expand = expand
504
+ @payment_intent = payment_intent
505
+ end
506
+ end
507
+
213
508
  class ProcessPaymentIntentParams < Stripe::RequestParams
214
509
  class ProcessConfig < Stripe::RequestParams
215
510
  class Tipping < Stripe::RequestParams
@@ -224,6 +519,8 @@ module Stripe
224
519
  attr_accessor :allow_redisplay
225
520
  # Enables cancel button on transaction screens.
226
521
  attr_accessor :enable_customer_cancellation
522
+ # The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme.
523
+ attr_accessor :return_url
227
524
  # Override showing a tipping selection screen on this transaction.
228
525
  attr_accessor :skip_tipping
229
526
  # Tipping configuration for this transaction.
@@ -232,11 +529,13 @@ module Stripe
232
529
  def initialize(
233
530
  allow_redisplay: nil,
234
531
  enable_customer_cancellation: nil,
532
+ return_url: nil,
235
533
  skip_tipping: nil,
236
534
  tipping: nil
237
535
  )
238
536
  @allow_redisplay = allow_redisplay
239
537
  @enable_customer_cancellation = enable_customer_cancellation
538
+ @return_url = return_url
240
539
  @skip_tipping = skip_tipping
241
540
  @tipping = tipping
242
541
  end
@@ -417,11 +716,32 @@ module Stripe
417
716
  @type = type
418
717
  end
419
718
  end
719
+
720
+ class SucceedInputCollectionParams < Stripe::RequestParams
721
+ # Specifies which fields in the response should be expanded.
722
+ attr_accessor :expand
723
+ # This parameter defines the skip behavior for input collection.
724
+ attr_accessor :skip_non_required_inputs
725
+
726
+ def initialize(expand: nil, skip_non_required_inputs: nil)
727
+ @expand = expand
728
+ @skip_non_required_inputs = skip_non_required_inputs
729
+ end
730
+ end
731
+
732
+ class TimeoutInputCollectionParams < Stripe::RequestParams
733
+ # Specifies which fields in the response should be expanded.
734
+ attr_accessor :expand
735
+
736
+ def initialize(expand: nil)
737
+ @expand = expand
738
+ end
739
+ end
420
740
  # The most recent action performed by the reader.
421
741
  attr_reader :action
422
742
  # The current software version of the reader.
423
743
  attr_reader :device_sw_version
424
- # Type of reader, one of `bbpos_wisepad3`, `stripe_m2`, `stripe_s700`, `bbpos_chipper2x`, `bbpos_wisepos_e`, `verifone_P400`, `simulated_wisepos_e`, or `mobile_phone_reader`.
744
+ # Device type of the reader.
425
745
  attr_reader :device_type
426
746
  # Unique identifier for the object.
427
747
  attr_reader :id
@@ -464,6 +784,66 @@ module Stripe
464
784
  )
465
785
  end
466
786
 
787
+ # Initiates an input collection flow on a Reader.
788
+ def collect_inputs(params = {}, opts = {})
789
+ request_stripe_object(
790
+ method: :post,
791
+ path: format("/v1/terminal/readers/%<reader>s/collect_inputs", { reader: CGI.escape(self["id"]) }),
792
+ params: params,
793
+ opts: opts
794
+ )
795
+ end
796
+
797
+ # Initiates an input collection flow on a Reader.
798
+ def self.collect_inputs(reader, params = {}, opts = {})
799
+ request_stripe_object(
800
+ method: :post,
801
+ path: format("/v1/terminal/readers/%<reader>s/collect_inputs", { reader: CGI.escape(reader) }),
802
+ params: params,
803
+ opts: opts
804
+ )
805
+ end
806
+
807
+ # Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation.
808
+ def collect_payment_method(params = {}, opts = {})
809
+ request_stripe_object(
810
+ method: :post,
811
+ path: format("/v1/terminal/readers/%<reader>s/collect_payment_method", { reader: CGI.escape(self["id"]) }),
812
+ params: params,
813
+ opts: opts
814
+ )
815
+ end
816
+
817
+ # Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation.
818
+ def self.collect_payment_method(reader, params = {}, opts = {})
819
+ request_stripe_object(
820
+ method: :post,
821
+ path: format("/v1/terminal/readers/%<reader>s/collect_payment_method", { reader: CGI.escape(reader) }),
822
+ params: params,
823
+ opts: opts
824
+ )
825
+ end
826
+
827
+ # Finalizes a payment on a Reader.
828
+ def confirm_payment_intent(params = {}, opts = {})
829
+ request_stripe_object(
830
+ method: :post,
831
+ path: format("/v1/terminal/readers/%<reader>s/confirm_payment_intent", { reader: CGI.escape(self["id"]) }),
832
+ params: params,
833
+ opts: opts
834
+ )
835
+ end
836
+
837
+ # Finalizes a payment on a Reader.
838
+ def self.confirm_payment_intent(reader, params = {}, opts = {})
839
+ request_stripe_object(
840
+ method: :post,
841
+ path: format("/v1/terminal/readers/%<reader>s/confirm_payment_intent", { reader: CGI.escape(reader) }),
842
+ params: params,
843
+ opts: opts
844
+ )
845
+ end
846
+
467
847
  # Creates a new Reader object.
468
848
  def self.create(params = {}, opts = {})
469
849
  request_stripe_object(
@@ -623,6 +1003,46 @@ module Stripe
623
1003
  opts: opts
624
1004
  )
625
1005
  end
1006
+
1007
+ # Use this endpoint to trigger a successful input collection on a simulated reader.
1008
+ def self.succeed_input_collection(reader, params = {}, opts = {})
1009
+ request_stripe_object(
1010
+ method: :post,
1011
+ path: format("/v1/test_helpers/terminal/readers/%<reader>s/succeed_input_collection", { reader: CGI.escape(reader) }),
1012
+ params: params,
1013
+ opts: opts
1014
+ )
1015
+ end
1016
+
1017
+ # Use this endpoint to trigger a successful input collection on a simulated reader.
1018
+ def succeed_input_collection(params = {}, opts = {})
1019
+ @resource.request_stripe_object(
1020
+ method: :post,
1021
+ path: format("/v1/test_helpers/terminal/readers/%<reader>s/succeed_input_collection", { reader: CGI.escape(@resource["id"]) }),
1022
+ params: params,
1023
+ opts: opts
1024
+ )
1025
+ end
1026
+
1027
+ # Use this endpoint to complete an input collection with a timeout error on a simulated reader.
1028
+ def self.timeout_input_collection(reader, params = {}, opts = {})
1029
+ request_stripe_object(
1030
+ method: :post,
1031
+ path: format("/v1/test_helpers/terminal/readers/%<reader>s/timeout_input_collection", { reader: CGI.escape(reader) }),
1032
+ params: params,
1033
+ opts: opts
1034
+ )
1035
+ end
1036
+
1037
+ # Use this endpoint to complete an input collection with a timeout error on a simulated reader.
1038
+ def timeout_input_collection(params = {}, opts = {})
1039
+ @resource.request_stripe_object(
1040
+ method: :post,
1041
+ path: format("/v1/test_helpers/terminal/readers/%<reader>s/timeout_input_collection", { reader: CGI.escape(@resource["id"]) }),
1042
+ params: params,
1043
+ opts: opts
1044
+ )
1045
+ end
626
1046
  end
627
1047
  end
628
1048
  end
@@ -25,8 +25,7 @@ module Stripe
25
25
  attr_reader :advancing
26
26
  end
27
27
 
28
- class DeleteParams < Stripe::RequestParams
29
- end
28
+ class DeleteParams < Stripe::RequestParams; end
30
29
 
31
30
  class ListParams < Stripe::RequestParams
32
31
  # 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.